So, had an awesome conversation with BitVenom where he imparted way more information than I could possibly hope to remember (curse my not recording the convo!)
Essentially, custom shaders are not only possible, he set up a system that makes it easy for us to do so.
Creating a custom shader is pretty damn easy. I’m a total noob at shader stuff, so he had to give me a crash course.
GBX is going to be updating the list on the left (hod_alias.manifest) - we modders get to use the list on the right (mod_alias.manifest) so our custom shaders don’t get broken by GBX updates.
You can override shader paramaters using markers in the 3dsMax file. Meaning you don’t have to write a one-off shader for a given ship, you can tweak an existing one.
Parallax shaders - possible, but expensive, why GBX chose not to implement them.
Add this string “-allowProgramReloads 1” to your HomeworldRM.exe shortcut to allow editing of your shader files while you have the game running. You also have to edit sob_share_ship.imp and uncomment the “debugReload” line and change the interval to suit.
If you create a custom shader, you’ll have to add it to SHADERS.MAP so Hodor can understand it. FYSA: GBX updates will overwrite this file.
Graphics menu options are not hardcoded. They populate from the shader code. For example the shadow options:
Shaders have a concept of time now - I’m not entirely clear on this one. HWR can also use geometry shaders (tesselation).
Bitvenom recommends sticking to a custom namespace when creating custom shaders (ie sob_brick_ship).
Edit 3/12: Realized I forgot to put up the comparison photos BV requested.
More stuff here, I think I played a whole MP game with the modified shaders as the ships didn’t seem as shiny as usual. Much to Bitvenom’s consternation I am sure, I am not as good at discerning visible alterations and details as I need to be.
https://www.flickr.com/photos/sastrei87/sets/72157651294786325/
Edit: I’ve thought of a possible use case for the new shader flexibility we have*, and I’ve thought of a few shaders that would make good candidates for early experiments. What can y’all think of?
Babylon 5 - Shadow ship skins
Star Trek - Romulan/Klingon cloaking
Starcraft - Protoss cloaking
cel-shaded look
What other ones can y’all think of?
*possible use case: the ships in my mod have a variety of default color schemes. However, many people would no doubt prefer a uniform set of team colors. Instead of two separate mods, it sounds like it should be possible to set which texture channels or shader is being used via the Graphic Options menu, and doing a behind the scenes switch of shaders to use a different set of textures (from predefined colors to textures compatible with team colors).
Additionally, it should be possible, if I understood correctly, to swap out whether ships would be plastic and glossy looking, or metallic and painted, again, by setting it up so you can access it via the Graphic Options menu.
-Stefan-