Long way round/Scourge of the Black Baron missions

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: another_commander, winston

User avatar
Cholmondely
Archivist
Archivist
Posts: 4997
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Long way round/Scourge of the Black Baron missions

Post by Cholmondely »

Batrachian Bubble Baths.

I bugged cim about this who replied as following:
cim wrote: Wed Apr 13, 2022 4:05 pm
If you use the Smivs approach of hijacking the Trumbles code, no.

What I'd do instead - and I really can't remember the details of how, so read this as "what I several years ago would have done instead" - is as follows:
1) Set up a visual effect object with a simple cubic model with a nominal size of 2km.
2) Use a frame callback to ensure that this object is always at the same position as the player ship (which will therefore ensure, because of its size, that it's always "visible")
3) Stick a custom shader on it so that rather than being drawn in worldspace it ends up being drawn in HUDspace [1]; make that shader draw an increasing number of soap bubbles by binding in the https://wiki.alioth.net/index.php/Oolit ... #shader.2A generic shader* uniforms and updating them in the frame callback.

Actually *writing* the shader to display the soap bubbles is non-trivial - but don't forget you can stick a fair bit of data for it into the object's texture file in a convenient format!

[1] The hyperspace jump shader in SOTL or BGS works in a similar way if you want a reference for this bit. I *think* without checking that the Vertex shader is the one that handles the transformation to HUDspace, and then once you've effectively got a HUD-sized canvas to play with, you'd use the Fragment shader to write that.
Am I correct in presuming that this little project would indeed constitute a major pain in the unmentionables?
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4644
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Long way round/Scourge of the Black Baron missions

Post by phkb »

Cholmondely wrote: Sat Apr 23, 2022 10:09 pm
Am I correct in presuming that this little project would indeed constitute a major pain in the unmentionables?
If the goal is to display some custom text via the shader (to simulate some form of ship-to-ship conversation) - yeah, a bit of a pain. At a guess, you'd have to put all the text into images, rather than as lines in missiontext.plist, to essentially put it into the same "language" as the shader is expecting. And then, you'd have to turn off the normal HUD while displaying the images so that it doesn't interfere, because who knows what HUD is in play and what MFD's are in use. Turning off the HUD is easy to do, but as a pilot it would be disconcerting to have everything disappear suddenly without warning.

And having the skills to put a shader like that together is certainly beyond me!
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4644
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Long way round/Scourge of the Black Baron missions

Post by phkb »

Having said all that...CCL has an "Overlay" feature that allows for images to be displayed inflight. I'll have a poke around inside that to see if it's easy to tweak.
Post Reply