Now version pushed with major skin shader improvement! Still the same link: link no longer relevant
https://media.discordapp.net/attachment ... /image.png
https://media.discordapp.net/attachment ... /image.png
https://media.discordapp.net/attachment ... /image.png
https://media.discordapp.net/attachment ... /image.png
https://media.discordapp.net/attachment ... /image.png
https://media.discordapp.net/attachment ... /image.png
https://media.discordapp.net/attachment ... /image.png
https://media.discordapp.net/attachment ... 723695.png
https://media.discordapp.net/attachment ... 017748.png
https://media.discordapp.net/attachment ... /image.png
https://media.discordapp.net/attachment ... /image.png
https://media.discordapp.net/attachment ... /image.png
Good subsurface is key to anything alive looking. There is a lot of things going on here. The fancy subsurface models used by UE and Unity's HDR pipeline* is doing things I haven't figured out how to do in the X4 engine, or that I might in fact not have the needed access to be able to do. So I had to approach the same concepts differently.
When Egosoft recently updated all HDR pipeline, they upped the bit depth of a lot of buffers, that actually doesn't need it for HDR lighting - but it allows me to use "fat buffer" techniques and do things like bit packing sub surface pre scattered normals from the base pass in the same pixels that also stores the base color, giving me more diverse data to run the lighting code on. This also allows me to implement it on the forward rendered parts of the game, if I need to!
To fake the scattered color I calculate relative skin brightness - what light is not absorbed - and then combined with some relative view angle math - I use that to resample the skin textures pre blurred. With that bias I can further refine the pre scattered normals in the base pass. In short, dark skin, dark freckles, red blemishes, scars, moles, etc will absorb more light and leave less to scatter, just like the fancy models does. So while I can't add a fancy post lighting separate scatter pass, I can instead pre scatter, a bit better actually, than the old school "pre-integrated" approaches, that XR used, that caused the strong red rim glow it often had on characters.
There is available texture channels to further refine this, but I currently haven't done that yet! So it would be possible to make thin things like ears and noses or the pointiest of Teladi scales have more and the thin skin with the skull right underneath have less of the effect. This is what you would call less or more extinction of the scattering. This requires going through all the textures though! I may try to parse some RenderDoc captured character meshes into obj files, so I can bake some accurate thickness maps for this.
In addition to scattering and absorption, there is also multi layer reflections going on here, with energy conservations built into it. This effectively scatters the reflections more as the light goes through the skin. Think of it like this, the surface is smooth, with sharp reflections - like greasy skin - but a lot of light makes it through the surface down to the deeper less smooth and more opaque layers, so you get a less shiny wider scattered reflection response from the remaining light. This is extra icing on the cake of realism
Currently all subsurface responses are identical. I have done some tests of different species profiles. I'll looking into bit packing some more data to refine this on a race basis. On that note, do we have access to the material definitions of characters at all, or is that currently also locked in the black box .xac files?
Subsurface species test setup
https://www.shadertoy.com/view/DtcXRM
*
https://advances.realtimerendering.com/ ... 202018.pdf