Jump to content

Playing around with the new SSS inside the Principled Shader in Houdini 16, looking for some feedback on what I can do to improve this


axalon

Recommended Posts

Quick update: switched over to Skin Shader Core, piped in a texture node into the diffuse color and got the following result:

 

6aiS9QX.jpg

 

Which looks more accurate however I can't seem to find where to put the displacement/bump map in Skin Shader Core

Link to comment
Share on other sites

This is H16.

To add Displacements you have to build this in to the Core shaders. Core shaders only do surface shading.

If you want to add a texture displacement, use displacetyexture VOP.

To build a single non-mixing shader, you add two output VOPs one of type surface and one of type displacement after the skinshadercore and displacetyexture.

Add a Collect VOP and wire in the two outputs.

You also have to add a Properties VOP. RMB (RightMouseButton) on the properties and choose Edit Render Properties. In the dialog that pops up, in the render property list, in the bottom search field type displace.

Then find the Mantra > Render and choose all the render properties as in the snapshot image.

See the attached Houdini scene file for a working skinshadercore with displacements in /mat.

 

add_displacements_to_skinshader.jpg

skinshader_with_displace.hiplc

  • Like 4
Link to comment
Share on other sites

  • 10 months later...

@old school Hi Jeff,

I remember since I tried SitoA (Arnold for SOftimage) that the skin shader had a lot more controls for the primary and secondary specular, among which an IOR.

Is this unnecessary in the shader implementation for PBR or there's a way to better control the Skin Shader Core's specular? I'm thinking the reason @axalon's tests look a bit off (seen here as well) is because of the loose ctrl over speculars. I'll contact someone over SI forums to see if I can procure a printscreen with the latest Skin shader in Arnold 5.

Link to comment
Share on other sites

I probably shouldn't wait for an Arnold shader image. Here's Mentalray's skin shader. From what I've read in the docs, Edge Factor seems to be IOR

edit: seems not waiting was a good call, 'cause upon further digging, it seems that they've removed the skin shader in Arnold 5.

skin_misss.jpg

Edited by McNistor
Link to comment
Share on other sites

1 hour ago, McNistor said:

I probably shouldn't wait for an Arnold shader image. Here's Mentalray's skin shader. From what I've read in the docs, Edge Factor seems to be IOR

edit: seems not waiting was a good call, 'cause upon further digging, it seems that they've removed the skin shader in Arnold 5.

 

Hello McNistor,

just a few thoughts:

'edge factor' in Mental Ray's fast skin (and default reflection falloff in all variances of MIA) could be a kind of very simplified Fresnel effect, precisely number 5 is exponent of dot product of shading normal and negated eye direction. In H, that could be 'normal falloff' node with mentioned exponent of 5 (or a bit more or less), plugged into 'fit range' node, where 'destination min' and 'destination max' are facing - edge weight, all that used to fade the reflection. That's simplified but gives a cleaner control over reflection weights than 'true' Fresnel. With unmodified 'fit range', it's zero at facing and one at edge.

For subsurface shaders introduced in H 16 (honestly I don't know what is included in Principled thing), I'd definitively go to 16.5. Ones in 16 are utilizing indirect rays (while in 16.5 this switched back to direct) - so, I'm afraid, everything you'll be able to get with 16.0 versions, could be a long forum thread about long render times, fireflies and such.

Unfortunately, there is no control over reflection color and face-edge weighting in H Skin shader, which makes it close-to-unusable. Why is that, I have no idea. PBR story should not be excuse for such brutal approach, IMO. IOR/Fresnel is present, but without precise facing/edge weighting control.

Regarding Mental Ray's fast skin, 'subsurface' is actually based on wild approximations, it's baked diffuse shading to vertices and blurred later, that's why there's need for three layers. Anyway, author had a great artistic talent to get a good look out of all that. One important 'artistic' element is under 'advanced' tab, it is screen blending of layers, not plain additive, which helps to avoid 'burning' with strong lighting.

That's in short. Last few months I've played a lot with this subject , basically I was able to get what I wanted. However, solution probably is not suitable for sharing all around. Anyway, it's possible to re-create a 'Master Zap's style' of shader components mixing in H. If anyone wants this, I'll be happy to help.

 

Edited by amm
Link to comment
Share on other sites

@amm Hey,

Quote

Regarding Mental Ray's fast skin, 'subsurface' is actually based on wild approximations, it's baked diffuse shading to vertices and blurred later, that's why there's need for three layers. Anyway, author had a great artistic talent to get a good look out of all that. One important 'artistic' element is under 'advanced' tab, it is screen blending of layers, not plain additive, which helps to avoid 'burning' with strong lighting.

Yeah, I know some of those settings in the mi_fast_skin are wild approximations, it is the renderer's philosophy after all, I've posted that just to help my case, that there should be a bit more control in the SkinShaderCore (SSC).

Quote

In H, that could be 'normal falloff' node with mentioned exponent of 5 (or a bit more or less), plugged into 'fit range' node, where 'destination min' and 'destination max' are facing - edge weight, all that used to fade the reflection. That's simplified but gives a cleaner control over reflection weights than 'true' Fresnel. With unmodified 'fit range', it's zero at facing and one at edge.

And the falloff plugged in where exactly in the SSC? Or were you talking about how to control that aspect in general?

Quote

For subsurface shaders introduced in H 16 (honestly I don't know what is included in Principled thing), I'd definitively go to 16.5. Ones in 16 are utilizing indirect rays (while in 16.5 this switched back to direct) - so, I'm afraid, everything you'll be able to get with 16.0 versions, could be a long forum thread about long render times, fireflies and such.

I'm on 16.5, so no issue there.

Quote

If anyone wants this, I'll be happy to help.

That would be immensely appreciated from my part. I've just went full Mantra (new year resolution) and I've got a lot to catch up, so any leg-up is welcome. I'm optimistic about this project, as I see a lot of similarities with MR with its granular approach about creating shader trees and I'm also sure that SESI won't abandon Mantra like M-ray was by Mental images and then Nvidia.

Edited by McNistor
Link to comment
Share on other sites

So here's attempt

First of all, this is not an universal skin shader, exact replica or anything like that, I just tried to put some typical 'contemporary' methods into network. It is a mix of PBR Diffuse, PBR Single Scatter ( introduced in 16.5), and two PBR Reflections. It should showing what is possible to do, feel free to experiment with nodes inside shader network.

There's just one subsurface scattering shader in mix. Houdini PBR Single Scatter has all map-able attributes, like scattering distance or attenuation color (while in old Mental Ray's Fast Skin, blurring radius is not) - things like exaggerated back scatter around ears or variances in attenuation color, are performed by simple trick: point color is used as mask for modulation. One SSS shader should be much faster to render than three, obviously.


So at the end of the day, only typical Mental Ray's Fast Skin feature is screen blending of layers. I added switches between screen blend and plain additive.

Important parameters:

- Diffuse and SSS tint: that's 'modern' method, to multiply diffuse and SSS texture by complementary color, diffuse in light blue, SSS in orange. Overall is nearly the same as original color of texture, while complementary colors are there to get stronger diffuse - SSS difference.

- Diffuse and SSS power: actually a gamma value, 1 is original, more than 1 is exaggerated darker color.

- Diffuse and SSS Weights: for more of 'old paintings' style, feel free to raise the SSS weight.

- Screen blending, Diffuse vs SSS, Reflections vs Diffuse and SSS: feel free to disable them just to see what happens. Nice side effect of screen blend is clumping of maximum direct lighting ( inside shader I set this to 1.25), making it easier to sample by Mantra.

- Two reflections, first is wide, it acts more like additional diffuse shading. Second is sharp, intentionally disabled at edges. Bu some convention, shading model is set to Phong, as Phong does not fade the wide reflections  (contrary to  GGX) - so somehow Phong fits better, here. Any reflection parameter is a subject for tweaking, except maybe just one: in case of skin, it's always blueish tone, AFAIK that's natural effect of exaggerating the complementary reflection color in case of scattering media, something not automatically set by layered shading used in renderers like Mantra.

Regarding wikihuman files, I've reduced resolution of bitmaps to make a smaller download, also I've used only three maps: diffuse color, specular color, and main displacement.

Get files (around 30 Mb) there.

 

wikihuman.jpg

  • Like 1
  • Thanks 2
Link to comment
Share on other sites

  • 1 year later...

Hello Anto,

Thank you very much for this file, it renders pretty fast i've never seen such speed vs result.
I've downloaded your precious reference files, and tried to anderstand what happened into your shader. (img1)

skinShader.thumb.jpg.8c26169240c16f5b33d12c455c3ba0f3.jpg
 

 

 

 

 

AntoShader.thumb.JPG.f89df6edda4e6c9f4419ae3685044efb.JPG


i've rearrange your nodes (img2) for anderstanding purposes but still some calculations happening are hard to follow,
i've added a texture to control Cd for scattering, some displacements, Normals everywhere i can, and parameters for color correct the diffuse and the scattering texture.





Challenge-1-05-02_0000.thumb.jpg.e7482815e556b44c3339cee7839ff9e6.jpg

img3 is the render comped in fusion with caustics for the eyes and there's your scattering Cd attribute called from nowhere as i rendered without adding the proper texture for scattering (my bad)




I've come to the wikihuman website trying to find "papers" about this "contemporary" approach for skin shading : with no luck, do you have a link to further information about that ?
i need a global approach on calculations to anderstand what is divide by what for what purpose and what is mixed with what for which intentions,
explaining the complete process would take too much of your time that's why  ;)


internal_calculation.JPG.c45793e72c5697da03f5b36004b45c85.JPG

The main calculation area i don't anderstand is this one : img6
it is used in the mix of Diffuse with SSS and in the mix of Diffuse+SSS with Reflexion but what is it doing and why ? 





I come from this approach from within Octane Render (img4) with 3 SSS and 2 reflexions :  is it the approach that's not relevant anymore ? i mean not the "contemporary" way to do it ?

skin_octane-shader.thumb.jpg.674bb4975682ef950b043b3edd2287f4.jpg




PHASE :
How did you get to -0.1 float number in the phase ?
here is a diagram i've found from Unity forum (img5)   seems the phase needs to be splitted to positive for the first sss and negative to the second one (or '+ + - ' in the case of 3 sss components)

5ca46793ee018_1_PC3A1gina_2_Imagen_0006.jpg.87c8a5e884b206f765ba25ca36e8fcfb.jpg



Thank you very much for all : this precious file and all the informations you provided so far, 
Best,

arno.

Link to comment
Share on other sites

  • 2 weeks later...
On 4/3/2019 at 10:15 AM, lepetitnono said:

The main calculation area i don't anderstand is this one : img6
it is used in the mix of Diffuse with SSS and in the mix of Diffuse+SSS with Reflexion but what is it doing and why ? 

Hello,

sorry for late answer. Thing in img6 is a bit modified screen blending, widely used in compositing software, Photoshop and such. This one is a bit modified, to allow the result to go over RGB 1, here the maximum is 'pedestal' value. Of course this is completely arbitrary approach, there's nothing physically plausible, however as far as I know, default 'energy conservation' in Mantra shaders doesn't looking much smarter, I think this is clamp of everything to max of diffuse result, or something like (at least in times of H 16, don't know what happened later). Screen blending as mixing mode,  is inspired by old, quick Mental Ray shaders from 2006 or so, well known Fast SSS. What screen blending is doing in practice, is a provided 'pedestal' as maximum, even with insane strong light, let's say lighting coming from extraterrestrial ship. It won't burnt into yellow or red, it will stay exactly at  'pedestal'. That's only smart part here, I'd say.

Color used for SSS (thing coming from nowhere) is just a variance of skin color, slightly more saturated, so nothing important about that. Just wanted to have a bit extra control. The rest, like putting some results into Ce, is a bit of desperate trial to skip 'not so mixable' F.

Regarding SSS functions, phase or so, what's provided by Mantra shader, probably pbrsss, that's what you have here, all the rest is mixing.

Edited by amm
Link to comment
Share on other sites

Thanks a lot @amm !   it's more clear now ;)


The results i got so far with this shader : downside of the nose the shadow to up upper lips is not having enough saturation, like we would get in a real shot : a bit redish. 
The shadow is looking like a diffuse shadow without sss.
Is there a workaround ? or did i missed something in the shader params ?

So i did a try with a new shader : "full sss" : test with both pathtraced and raytraced sss and this shadow looks natural but render times are going insanelly longer than the shader you provided
(if i remember it goes from 15 mn with your shader to 6h30mn with the one i tried > yes : no comment).

Challenge-1-10-01_6sples-6h30mn.0000.jpg

I guess there is no solution that would be both looking real and fast to render.

By the way : do you know the difference between raytraced and pathtraced sss : i tried to anderstand the difference (google) but couldn't get a clear explanation of that.
From what i've seen, in the tests i did,  the raytraced sss is giving back uniforme saturated transmission color and pathtraced are givin both a more controlled saturated transmission and a more feeling "like real"  transmission to "deepness" or scattering,
it feels a bit like the difference between a 16bit to a linear 32bit image but according to sss. Sorry for the lack of explanation /

 

Edited by lepetitnono
Link to comment
Share on other sites

On 4/23/2019 at 4:16 PM, lepetitnono said:


So i did a try with a new shader : "full sss" : test with both pathtraced and raytraced sss and this shadow looks natural but render times are going insanelly longer than the shader you provided
(if i remember it goes from 15 mn with your shader to 6h30mn with the one i tried > yes : no comment).

I guess there is no solution that would be both looking real and fast to render.

By the way : do you know the difference between raytraced and pathtraced sss : i tried to anderstand the difference (google) but couldn't get a clear explanation of that.
From what i've seen, in the tests i did,  the raytraced sss is giving back uniforme saturated transmission color and pathtraced are givin both a more controlled saturated transmission and a more feeling "like real"  transmission to "deepness" or scattering,
it feels a bit like the difference between a 16bit to a linear 32bit image but according to sss. Sorry for the lack of explanation /

 

Speed in my shader mix (well, relative speed) belongs to single scatter, that's all about. Of course that's always faster than multi scatter. Regarding ray-tracing vs path-tracing differencein Mantra subsurface shader, according to docs , difference is technical, which method is used to get the scattering effect. 

About shadows, there's nothing special in that network. Theoretically one could add colored shadows instead of plain opaques, but, I'm afraid this could create yet another level of dis-balance, perhaps you'll get what you want in one area and something undesired in another. Just personally, I'd try to go without any diffuse, using only SSS and reflections, however that (usually) makes harder to get displacements and (possibly) takes more to render (to remove the noise).

Link to comment
Share on other sites

Hello,

Thanks for your reply @amm
i 'll have a look at no diffuse with attribute to control weight in my next spare time.

I had read the doc about pathtracing sss (thanks for the link ;) ) and still could not anderstand : 
but i've found this video to be a good explanation of the different tracing options available for subsurfacing
https://www.youtube.com/watch?v=Z4xwrvSdbiI
This is regarding RenderMan 21-22 (see super diagrams from 16:30), you see Renderman options "seems" on top of the dev road,
and i've dropped to sidefx a demand so to implement this Renderman 22 "new algo" :  to the sss arsenal of Mantra.
You can add your +1 in reply to sustain this over sidefx forum here : https://www.sidefx.com/forum/topic/62376/  if you want it.

The pdf about this new development is here : http://graphics.pixar.com/library/PathTracedSubsurface/paper.pdf

Hopefully Sidefx will put this in Mantra in the future ;)


++

Link to comment
Share on other sites

On 4/28/2019 at 1:36 PM, lepetitnono said:


I had read the doc about pathtracing sss (thanks for the link ;) ) and still could not anderstand : 
but i've found this video to be a good explanation of the different tracing options available for subsurfacing
https://www.youtube.com/watch?v=Z4xwrvSdbiI

++

I believe (could be wrong) the important word in docs is volume ''Simulate subsurface scattering by path tracing through it as a volume''.  In other word, tricky part in any subsurface shader is, how to get the distances from hit point to let's say exit point, that's where usual ray tracing refraction models are not the best, especially for small parts on human body like nostrils or ears. So, Mantra path tracing sss tries to bypass the problem by using volume as much more realistic media.

Regrading pixar's solutions, have to admit I'm not a big fan of that cuisine. In past, had chance to try a good number of Renderman shaders, hair and skin (with 3delight). Always been an negative impression of really fragile constructions, also a really free interpretations of 'realistic' models. After all, they were courageous enough to put the word 'photorealistic' in name of renderer, when literally nothing was photorealistic. That is, just personally, I'd be looking for solutions already approved by wider audience, freelancers and studios, like V-Ray, Cycles or Arnold. 

Link to comment
Share on other sites

Hello @amm    thanks for your feedback,    so as you mentioned before i'm right where you stated  : single scatter ...
while waiting for better computational force like 256 cores on a single cpu or a killer new algo that would took a volume without actually calculating a volume (who knows !) may be some sort of nulls to reference on the geo where noze eyes ears lips frontier are and then compute another map from that
okay that's the scatter map !!     well then there's no other answers than single scatter !   or singles scatters
thank you @amm    /   ++   ;)
 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...