Monday, January 23, 2012

3Delight for Maya | Subsurface Scattering

You want some subsurface scattering using mental ray shaders but rendering with 3delight? Sure, no problem:




In this scene, I have a spotlight casting raytraced shadows and a poly object (helix).


Rendered looks this way


Now, let's create the misss* shader. For this tutorial I'll test 5 different versions (misss_fast_shader, misss_fast_shader_x1, misss_fast_shader_x_passes, misss_fast_simple_maya, misss_fast_skin_maya) and then you can decide on which one to use.


First, misss_fast_shader1:


Well, it doesn't look like there is subsurface scattering at all. That's because there are some attributes needed for subsurface to work (3DelightForMaya-UserManual.pdf, page 37). To add those attributes, select your object and in the assignment panel click on the checker icon to add a new Geometry Attributes Node. From the Add/Remove Attributes menu, select Subsurface Scattering -> All. Set "sss" as the Subsurface Group name (or anything you want).


Let's render again


Ok, there is something now. You can modify front and back scatter color as well as its weight but you can't control the radius here. If you kept reading on the manual, you'll know why. Anyway, select your object and open its delightGeoAttribs node. Set 'Coefficient Scale' to 0.5 and render again


See?

Now let's try the other shaders. This time, misss_fast_shader_x1


Looks gray and there's a message in the terminal window (or maya output window) complaining about a shader that 3delight couldn't find. 3Delight for Maya provides header files in the `$DELIGHT/maya/rsl' directory; these header files are used for translating the Hypershade nodes to RenderMan shading language source code and there's no header file for misss_fast_shader_x1 and misss_fast_shader_x_passes. You can still use any of the other shaders, write your own, complement the missing files or let know support about those files.

Now, misss_fast_simple_maya


And finally, misss_fast_skin_maya


Another one with misss_fast_skin_maya with diffuse weight set to 0 and new random epidermal, subdermal and back scatter weights.

This, as you can see, is pretty basic. You may want to know how to render separated passes, how to connect texture maps and how to use them properly to get skin renders, why you get bright lines sometimes and how to deal with them, how to use global illumination, how to get subsurface using point clouds... or you may not.

In any case, the 3delight forum can give you some hints, since this has been asked before.

Here is a small animation using ncloth and fast skin shader:

2 comments:

Anonymous said...

Thanks for this little introduction!
Everything work's perfectly but my only problem is to know how and if i can bake the sss within the ptc generated with the gi tab.I try to found a answer in the 3delight forum but no luck for the moment :(
Anyway thanks for your great blog, and for sharing all this information !
sorry for my english

Unknown said...

Well, yeah, that's not possible (without modification), I'll see if I can post about that on the next post.

But I'll start by saying: you can render sss *from* point clouds. Take a look here to generate sss using point clouds: http://www.3delight.com/en/modules/PunBB/viewtopic.php?id=3233

Maybe you should ask about baking sss using the gi tab, support there is really open.