2008-04-24

Beauty isn't only Skin Deep: combining fast SSS with mia_material (A&D)

UPDATE 2008-06-27: The file is now updated to support also support displacement in a new 'SSS Fast Skin+ (w. Disp)' material



The image on the right is by Jonas Thörnqvist, an increadibly talented 3d Artist, and it is created using the mental ray skin shader.

Seeing some recent work from Jonas reminded me that I made some promises back in the day in this blog about tips on how to combine the "fast SSS skin" shader with the nice glossy reflective capabilities of the mia_material (i.e. "Arch&Design" in 3ds Max speak).

The trick w. the skin shader is that it uses light mapping. So the "material" that uses it must connect both a "surface shader" (the one which creates the actual shading) and a "lightmapping shader" (which is what pre-bakes the irradiance to scatter).

This is a tad tricky to do manually, and for this reason the skin shader is supplied as what is called in mental ray parlance a "material phenomenon". Well, suffice to say... it does all the magic for you! You don't need to think.

However, in some applications (notably Maya) this is different, and the skin shader comes shipped as a separate light mapping node and shader node, and there are scripts set up to combine them. Similarily for XSI, there exists a "split" solution already.

But the poor Max users are left behind. Like tears in the rain.

This is because a "material phenomenon" can't easily be combined with other things... coz it's a "whole complete package". And due to the peculiar requirements of the skin shader, it will not work if it is a "child" of some other material (like a Blend material in 3ds Max, or similar). So it's a wee bit hard to do from the UI.

However, what is not hard to do, is to actually write a different Phenomenon! As a matter of fact it is so simple, that I thought people would hop about doing exactly that left right and center. And indeed, Jonas, mentioned above, done exactly that. Which is why his renders are so cool.

It so happens I've had a modified version of the skin phenomena cluttering my harddisk for some time now... I just havn't gotten around to posting it before.

So, without further ado, here it is. It's experimental. It's unofficial. It's unsupported. If it makes your computer explode, so be it. Don't say I didn't warn you. Making no promises it even works. Etc.

Take the file skinplus.mi and save in your 3ds Max mental ray shader include autoload directory, i.e. it's generally something like:

c:\Program Files\Autodesk\3ds Max ????\mentalray\shaders_autoload\include\

Just put the file there, start Max, and you'll have a new "SSS Fast Skin+" and a "SSS Fast Skin+ (w. Disp)" among your materials. From there on it should be fairly self-explanatory. I hope.

Have fun.

/Z


Jonas "Incredible Hulk"

Labels: , , , ,

23 Comments:

Blogger awakening said...

can i use this for maya?thanks :D

Thu Apr 24, 07:44:00 PM CEST  
Blogger Master Zap said...

*This* phenomena? Not sure it it works in Maya as is.

But you don't really *need* it for Maya. In Maya, you can
- Use a mia_material_x
- Put your current SSS surface shader int' it's "additional_color" input
- turn off the SSS shaders speculars, reflections and unscattered diffuse

Et voila!

Same thing, pretty much.

/Z

Thu Apr 24, 08:14:00 PM CEST  
Blogger Harry Bardak said...

Hi masterZap.

I am taking the occasion to jump on this. A&D shader to conserve energy and not emit more light than you receive which great.

I was wondering if it was the case with fast skin shader and if not does this setup respect that ? It looks like that the fast SSS is piped in the diffuse of A&D

Cheers.

H.

Thu Apr 24, 11:22:00 PM CEST  
Blogger mahi said...

"But the poor Max users are left behind. Like tears in the rain." Come on master zap, tell us how you really feel about 3D max.

Fri Apr 25, 05:38:00 PM CEST  
Blogger Prasad said...

great blog..unlucky me i missed it this long...count me as regular visitor now onwards..

Sat Apr 26, 07:06:00 PM CEST  
Blogger geoffDuncan said...

as said above - great blog :) Thanks for sharing!!

Learning loads about mental ray ... cheers!

Tue Apr 29, 11:56:00 PM CEST  
Blogger a_luv said...

This post has been removed by the author.

Wed Apr 30, 09:01:00 PM CEST  
Blogger MaNdRaK said...

Thx for the maya tip, master Zap!

Fri May 02, 12:50:00 AM CEST  
Blogger Nick said...

Hey Zap thanks for the awesome shader. One quick question though, is there a way to get a displacement slot somewhere in there? I'm not code savvy at all, I can more or less plug things into their proper slots in the Mat Editor and thats about it. Any help would be appreciated!

Fri May 09, 05:46:00 PM CEST  
Blogger Joey_Blancs said...

This works great in Maya 8.5 with mia_material thanks Master Zap!

Thu May 15, 01:26:00 AM CEST  
Blogger joe said...

Zap thanks for posting this up...I'm sure it just didn't have time to make it into the release.

We all know you love MAX!

This shader works great!!!!

Fri May 30, 09:27:00 PM CEST  
Blogger joe said...

Hmmm...ever get around to the displacement issue?

Can't figure out how to use this one with displacement

Mon Jun 09, 03:42:00 AM CEST  
Blogger Kathleen said...

Thanks a million for posting this. It looks awesome "straight out of the box" with a daylight system :)

Tue Jun 10, 04:36:00 AM CEST  
Blogger Master Zap said...

I updated it with displacement now, for all those of you who asked. Just re-download skinplus.mi and use the new "with displacement" version.

/Z

Fri Jun 27, 02:45:00 PM CEST  
Blogger Dogway said...

Hey Zaps, nice one.
Ive been struggling with mia and misss for some time on (through mixlayer).
Does this work with Maya 2008? I added it, and can se the node and its parameters, but cant assign to any object.

Fri Jun 27, 03:26:00 PM CEST  
Blogger madmanmark said...

I cant seem to make this work in max...

I downloaded the SSS Fast Skin+, Then I made a Blend and put the fast SSS+ in the Material 1 slot and a standard material in Material 2 slot then used a standard B&W .TGA for the mask, but the SSS material isnt doing its thing... am I doing something wrong?

Thu Jul 31, 07:21:00 AM CEST  
Blogger GeckoKid said...

hello master zap, i'm a 3ds user and i'd like to create a simple leaf texture that lets light goes through just like it would in real life... i don't really want to model the leaf shape, is there a way to use an opacity map to the SSS map? thanks!

Wed Aug 27, 02:53:00 PM CEST  
Blogger Mohammad.Modarres said...

hi dear master zap,i download this amazing shader and use it,thanks for sharing ,but i have a problem,since i working on character i prefer to use uv regions,i have 4 uv region for my character,but when i want use skin+with multi sub the displacement doesn't work,i check one one of jonas scene(troll from gnomonology),he use composite map instead of multi/sub-object,but it dont work too,please help me thanks

Wed Sep 24, 02:47:00 AM CEST  
Blogger Lokendra Singh Shekhawat said...

thank u very much.......... really thankfull to u

Wed Sep 24, 11:14:00 AM CEST  
Blogger furbit said...

very cool,
works great for Maya, but I had to add the lightmap to the mia_shadingengine or the sss didn't show up.

Thanks for another great tip.

Tue Nov 18, 09:33:00 PM CET  
Blogger Dustin Brown said...

I'm curious, what is the difference between your two shader and the Fast Skin and Fast Skin+Displacement that are included in 3ds max 2009? I just recently discovered this blog post, so I'm wondering if, perhaps, you made these shaders for max 2008, and Autodesk included them as part of 2009. Thanks.

Sun Apr 26, 11:09:00 PM CEST  
Blogger Harris said...

Hi.
Great shader. But It appears as if the strength of the normal map is at the default 30%, like when you apply a normal bump in default shader. I usually turn this up too 100% to get normal maps to show correctly at full strength. Is this a problem with the shader? Is there a way to turn up the strength of the normal map. It renders as if the normal is only at 30% full strength.
Cheers
Glen

Wed Jul 08, 02:02:00 AM CEST  
Blogger Harris said...

I should mention I am rendering out the shader on game res models. Lower poly. So im soley relying on the normal map for all the details.
I cant get MR to display normal maps with SSS in any shader correctly.
Cheers
Glen

Wed Jul 08, 02:29:00 AM CEST  

Post a Comment

Links to this post:

Create a Link

<< Home