Utilizing Transmission Maps to Speed-up Subsurface Scattering in Terragen

Started by WAS, January 12, 2020, 04:32:39 PM

Previous topic - Next topic

WAS

Subsurface_Transmission_Only.jpg
Transmission Map SSS Only

Using a transmission map can heavily reduce render times, and give a more realistic skin approach to Terragen. While a lot of SSS examples that are free that I can find don't utilize them, I did find one which allowed me to play with this approach used in other engines with transmission maps.

Screenshot_60.jpg
Node Network Setup

By creating a Colour Adjust shader and editing the Transmission map to taste we can create a balance between hard, non-transparent surfaces, and surfaces that should be utilizing light transport. Additionally a "fine" mid-tone between the two shaders in these hard areas can still give the look of SSS while retaining a hard looking surface and crisp textures.

Subsurface_Transmission_Map.jpg
Transmission Map Projection

The final result with a mix between a Subsurface Scattering surface, and hard surfaces, I think the quality and realism of human skin can be improved and cut back on the waxyness, as well as greatly optimizing speed. This would probably help with the amount of scattered light pixels in scenes too.

Here is a final comparison of Subsurface Scattering only with no tramission map, vs a mix of solid shader and subsurface scattering by a transmission map.

Subsurface_Solid_Mix__AA3_54s.jpg
Render time: 54s

Versus Subsurface Scattering Only (no transmission map or solid shaders)

Subsurface_Only__AA3_2m_12s.jpg
Render time: 2m 12s

WAS

Just a note, I did not balance my transmission mixer well, and this was mainly quickly done as I was curious about texture sharpness and speed. The model isn't very usable, just the only one I could find with a transmission map, and being human at the time. It could be better balanced to allow more SSS or less, really depending on what you want.

Update: Attached speed test with AA6, and quality looks rather good minus dark area on the lip.  I wish I had a better test subject with TIFF images rather than compressed jpg.

WAS

Using Emily. She didn't have a transmission map, just a surface scatter map, but it was easily modified, though probably could have had some areas blurred better. I inverted the map in PS instead of TG.

AA6, and I'm still very impressed with the render times being basically cut in half for the same effect plus some sharper texture surfaces. It's easier to get more SSS effect too by backing up the black point of your transmission map.

I had a lot of trouble with this model it was very rough, the EXR maps were breaking in couple programs I tried, and had no programs to remove the eyes, so Thanks to Kadri for help there.

Dune

To be honest, it's hard to see the SSS quality in these examples, looking at the nose wings light transmission for example. Maybe with more backlit features, you can see it better in ears.
I believe Hannes did something like this a few years back, painting a new map, and having some luminosity to fake SSS in lighter parts (like ears and nose wings). I do like your efforts, as real SSS is indeed very slow (still), and a faster method that would give 'reasonable' results would be good to have around.

WAS

Quote from: Dune on January 13, 2020, 02:02:44 AMTo be honest, it's hard to see the SSS quality in these examples, looking at the nose wings light transmission for example. Maybe with more backlit features, you can see it better in ears.
I believe Hannes did something like this a few years back, painting a new map, and having some luminosity to fake SSS in lighter parts (like ears and nose wings). I do like your efforts, as real SSS is indeed very slow (still), and a faster method that would give 'reasonable' results would be good to have around.

This is real SSS Dune. It's in fact utilizing more or less the same methods these examples are suppose to use (and masks they come with), a mask that maps what is actually suppose to be SSS (transmission maps). Even in their examples, the SSS is exaggerated so you can see it clearly, but that's not realistic. For example the sun behind the object is only set to 1, not 5, so it shouldn't be a blazing red effect. Transmission maps are nothing new, and what's used in other engines.

SSS should not be a solid SSS effect across the whole model for human flesh. That's not realistic. It's surreal.

Additionally, having a good model dramatically helps. Emily and the prior are both broken from removing assets of the model.

WAS

Here's a better "clown" example for you. Texture removed so you can clearly see the effect. The transmission mixer is used to mix between SSS and a solid white texture. There's plenty of SSS, and it's far more realistic.

Added a exaggerated Santa clause up in the North Pole for you too... xD

Decay depth is probably too shallow. This head model was real scale and rest were like 20m and just copy pasted the shaders and adjusted from there quickly. Than again, light shouldn't be going too far with shallow chek, and hard cartilage of the node.

Increased decay, not so great with such thin ears. Start getting glassy.

WAS

This image from Character Creator 3 shows a "proper" map of areas that should have SSS, and areas that shouldn't.

You'd set the intensity for those areas, and it would bake out your transmission map.

Again, example is exaggerated. So much so she looks like a hollow doll. Rubber/waxy/plasticy skin with too much transmission.

Dune

Clear allright. Looks like actually all extruding areas need more SSS (from the map).

KyL

Really interesting experiments WAS.

This is totally something much needed to improve skin's realism. I am wondering how would this compare to putting an actual skull model inside the head? This should influence the scatter decay in a more correct fashion.
If it does, we could bake the occlusion of the skull onto the face to create a true "flesh" mask to modulate the subsurface effect. ::)

WAS

Quote from: KyL on January 13, 2020, 09:40:23 AMReally interesting experiments WAS.

This is totally something much needed to improve skin's realism. I am wondering how would this compare to putting an actual skull model inside the head? This should influence the scatter decay in a more correct fashion.
If it does, we could bake the occlusion of the skull onto the face to create a true "flesh" mask to modulate the subsurface effect. ::)
KyL I've actually wanted to try that for a long time. So the thin areas simply don't scatter like a rubber doll all the way into the skull. 

I'm not sure I know if any good skulls to use off top.of my head. I have one but it's a really early human skull

WAS

I re-worked the map to include the areas that were missing last night. Looks much better besides the inside mouth and eyes showing through when ramping up the decay distance to a more suitable scale. I wonder if they're separate parts i can delete in Blender. I know Emily had a solid object for OBJ format.

Did a MPD 0.5 AA7 render over night. I also backed up the Black Point for a tiny bit of SSS showing through overall. The sharp textures and time is what I'm really after while retaining the effect where it should be.

Was going to fish the seam issue on these texturess but meh, no reason.

Edit: I'm still shocked by how fast the quick renders at AA3 render. That last one with no textures rendered in just under 2 minutes, and the noise cut out is astonishing imo. Fairly certain when I first tried Hanne's shaders on Emily (with eyes) it took over 12 hours at not even 2000x2000.


WAS

Thank you Kadri.

I notice a lot of these examples use SSS right up the bridge of the nose whole length, where your nose bone is. That can't be realistic.

WAS

Utilizing a inverted transmission map as a semi-transparency mask for a Default Shader utilizing the Albedo and Transparency at 10 with a flesh tone. Similar to what Hannes tried, except using glass and semi-transparency to kill the fake effect where it doesn't belong with a smooth transition. Whole lot less "red" contamination from the SSS flesh tone.

Standard render MPD 0.5 AA3

Now curious if same glass semi-transparency method can speedup or slow SSS method.