misss tests


#641

can u plz post a shot of your shader settings and network,
great job.


#642

For tweaking the sss settings I would stick to Mater Zaps excellent tutorial http://www.lamrug.org/resources/doc/sss-skin-tutorial.pdf

The only things I did differently was to use a ramp to offset the overall redness that occurs from the subdermal scatter…oh and I had a pretty high value for the diffuse weight too. Using a ramp in the subdermal works good as well. Just use a warm color instead of the light blue color I used in the overall color ramp shader. I’m not using reflectivity on this model so it would probably look bad if lit by HDRI? I was using a run of the mill 3 light set up in this test.


#643

thank you kindly.


#644

This is simple and great goldenarm.
I remember when using ramp shader in the past
that mental ray didnt like it much, but in this basic
combination might just work. I must try it.


#645

thank you goldenarm for the explanation and for the ramp tip :thumbsup:


#646

For some of who tried applying the shader to just faces of the gemoetry and didtn work, now we know that it has to be on the entire object rather than just faces
I’m woundering why is that
thanks


#647

Hmm, are you sure?
I’m pretty sure you can apply it to faces, as I seem to recall doing just that a while ago.
I did a test a while back where I applied it to two different sets of faces on the same object.
I set it up to share a light map.
I also tried it to not share the light map, though I think most would prefer sharing.

Are you using the helper mel scripts to ensure your connections are hooked up correctly?


#648

It’s probably the light links. Either set your light link mode to 2 (no dependency) in the shader, or link your geometry explicitly via the light linker (and ‘Export Light Linker’ ON in the renderglobals> Translation> Customization, though this might kill DAG export performance with certain heavy scenes, so you usually want to be it OFF)


#649

thanks for the reply

i don think it’s the light linker ( i tried that, unless Im wrong :wink:
here is a sample file to illustrate my point
the face has SSS exept the eyelaches… render = no scatter
apply the shader to the entire face and render = scatter


#650

Well, I turned the light link mode to 2 (both in the misss and in the lightmap shader), and it worked.


#651

ahhh the trick is to do it for both
my apology and thanks
:thumbsup:


#652

Hi to all I have a few questions to Master Zap about his shader I don’t know are these questions interesting to all but I will ask them.How exactly the shader calculates the indirect diffuse from the final gathering in MR is there a way to use other way of HDR lit with the shader for example bent normals or something else without final gathering
My second question is can you reveal how do you calculate the SSS the front sss,middle sss and back scattering passes
and my last question can you advice us for links and researches about the methods that you used for creating such wonderful shader
thank you for the patience it is boring to read such long text …


#653

Which version of Maya are we talking? This sounds like something mental ray 3.3 (Maya 6) could have done but mental ray 3.4 (Maya 6.5) should not do.

The problem is lightmapping during multi-host rendering, which has issues under mental ray 3.3 (i.e. it only works if you have a single object per lightmap, but a displaced object is broken by mental ray into multiple objects…)

/Z


#654

Sorry for being away from the thread. Busy. SigGRAPH coming up. Yes, I’ll be there.

Well, that’s simply how the shader works… it needs to separate the “outside” and the “inside” of the object in the sense that the way the normals are facing are assumed to be the “outside” of the emulated solid object, and the opposite direction (away from the normals) is going “into” the solid object (say, skin, flesh, etc) being emulated.

This is one of the reasons it works so well with un-closed objects that aren’t truly “solid” (i.e. a head where you havn’t modelled anything at all below the neck), because it is not taking it’s cues for what is “in” and “out” by the geometry, but simply from the surface normal.

Clear as mud, I hope? :wink:

Very nice indeed! Like it! A lot!

The indirect lighting is gathered by the lightmapping phase, and only if the “indirect” parameter is on in the lightmapping shader.

If you want to do some other kind of indirect lighting, this works too (and I do this myself a lot). You can map any shader to the “ambient” slot of both the surface and lightmap shaders. This shaders contribution will then be treated as extra light.

And this additional light will also be scattered (if it is linked to the lightmap shader, not if it’s not).

Case in point; I routinely use ambient occlusion myself rather than final gathering. So I map the ambient occluson shader with an appropriate color or map in it’s “bright” slot to the “ambient” slot of both the lightmap and surface shaders, and this will take care of my lighting.

The dancing hulk here is done in this way (plus some additional point lights)

My second question is can you reveal how do you calculate the SSS the front sss,middle sss and back scattering passes

My answer would have to be “not really, no”. I’m afraid I do not have the liberty to divulge the internal details, even if I would want to.

and my last question can you advice us for links and researches about the methods that you used for creating such wonderful shader

Actually, I used two spherical devices mounted to the front of my skull called “eyes”, and then slapped together something I thought would look nifty. I’m not big on research, papers, formulas and stuff. Like I say if someone shows me a lot of that squiggly stuff on some research paper; “I’m a magician, not a mathematician”.

Doesn’t mean it doesn’t interest me, but the research tend to be focused on physical accuracy, and I’m more into “the ancient chinese art of Chi-Ting”. :wink:

I use my eyes, I tweak twiddle and I get a result. I put my finger to the wind, multiply by pi, take the square root of something that looks like it’s begging to have the square root taken out of it, add a fudge factor, and bing, there it is… more or less.

thank you for the patience it is boring to read such long text …
Thank you for the long wait for a reply :wink:

/Z


#655

If the shader I plug into the ‘ambient’ slot of the lightmap is contributing to the finalgathering (like any standard lambert etc.), wouldnt that defeat the purpose of switching off the ‘indirect lighting’ switch?

And I always asked myself if the lightmap sampling shader (i.e. usually the misss_lambert_gamma) shouldnt hold the texture I use for the regular surface shader in it’s diffuse? Or would it be incorrect (well, sort of…), because it’s output is already being wired with the sss shader’s textures? I’m getting interesting results this way however… :wink:


#656

No, it is not contributing to “finalgathering”. It is directly used as “additional irradiance”.

You could use both, but in most practical cases you use either the “indirect” switch (i.e. your indirect light comes from finalgathering or photons) or you supply “your own” additional light through the “ambient” slot via some shader (most probably the ambient occlusion shader).

The point is that the lightmapping treats anything coming in through the “ambient” slot as it would treat any other irradiance hitting that point.

And I always asked myself if the lightmap sampling shader (i.e. usually the misss_lambert_gamma) shouldnt hold the texture I use for the regular surface shader in it’s diffuse? Or would it be incorrect (well, sort of…), because it’s output is already being wired with the sss shader’s textures? I’m getting interesting results this way however… :wink:

Mostly the latter; the lightmapping is about gathering irradiance, wich is then scattered and then filtered through the various color parameters (i.e. textures) of the surface shader.

Should the incoming irradiance be filtered by the color texture when going into the skin/object? Well this depends on what the color texture is, what it represents. Perhaps that big dark freckle on your skin is actually blocking light going into the skin as well? If so, yes, you can put this into the diffuse of the lightmap sampling shader. You are not commiting a sin by doing so :wink:

The risk you run, however, is a lot of double-textureing which mucks about with your color. It’s like some people put the same color texture both in overall_diffuse and many or even all the other slots. Doing so is redundant and really only results in you using your texture “squared”, i.e. your texture gets multiplied by your texture, which makes it darker, more saturated, and throws it’s color balance off. Which may look cool in some cases, but is often not what one desires.

/Z


#657

how can apply bump mupping on my sss shader? I’ve seen some material for the bump on maya’s mental ray, how can i use it?


#658

Thanks a thousands, Zap, for taking the time answering our questions. I’ve got another one though: Is the blending mode that happens for the sss over the diffuse a ‘screen’ one? Like result = {(invertdiffuse) * (invertsss)} * invert?


#659

If “screen_composit” is “on”, yes. Otherwise, it’s an add.

/Z


#660

Hey guys, very interesting thread, I’ve been learning maya rendering lately, I’m trying to do SSS and multidisplacement at the same time with the fast simple SSS, which is going ok sor far, but the image shown above reveals undersampling, which I don’t seem to get rid of, I thought it had something to do with the lightmap, but master Zap said it was not related to the lightmap sampling, so my question is how do I sample such a scene correctly, what do I have to look at?

THX, great shader !!