Question: realistic Skin shader


#1

Just a quik question

is there a way within mental ray for maya to simulate sub-surface scattering as seen in human skin, any help will be much appreciated

thanks

Nigel


#2

Yes there is. Mental Ray supports all sorts of features that will allow you to write a sss shader. From www.MentalImages.com

>>>>>>>
Can mental ray do subsurface scattering?
mental ray supports any natural phenomenon, including simulation of subsurface scattering, in custom shaders. The algorithm is well-known from the medical literature.
>>>>>>>>

The problem is that if there is not one already written and distributed freely, you will have to write your own shader.
I believe their shaders are written in C++.

I dont use MRay so I encourage the Experts to invertene

This image SEEMS like it uses sss, but I cant tell for sure (I havent read any making of articles on it).

Cheers
fxjeane


#3

You could try:
http://www.andymator.co.uk/shaders/tranvol2/

I haven’t heard of a lot of people getting results with it, and maybe it isn’t the fastest implementation, but it is a free download. I hope it lets you paint the maps you need to control it, it does have a Maya interface to download. If you get something useful, please share your results.

“The algorithm is well-known from the medical literature.”

LOL! They don’t want to give credit to Henrik Jensen, but suggesting “medical” literature instead of SIGGRAPH papers???
http://graphics.ucsd.edu/~henrik/images/subsurf.html

-jeremy


#4

I dunno about Maya but I know that in Max 6 , there are some interesting shaders from Lume Tools , written for MR 3.x (Max 6)…I’ve seen only alpha release and cant guess anything about the final version of these shaders…Of course those were for Max 6…And I have to add that MR for Max 6 is working faster than MR in XSI…


#5

Originally posted by jeremybirn
[B]“The algorithm is well-known from the medical literature.”

LOL! They don’t want to give credit to Henrik Jensen, but suggesting “medical” literature instead of SIGGRAPH papers???
http://graphics.ucsd.edu/~henrik/images/subsurf.html
[/B]

From Mr. Jensen’s paper:

“Subsurface scattering is also important in medical physics, where models have been developed to describe the scattering of laser light in human tissue [6, 8]. In that context, diffusion theory is often used to predict as well as to measure the optical properties of highly scattering materials. We have extended this theory for use in computer graphics by adding exact single scattering, support for arbitrary geometry, and a practical sampling technique for rendering.
[…]
Again building on medical physics research [8, 9], we have extended a methodology developedfor measuring biological tissues into a rapid image-based appearance measurement technique for translucent materials.”

Sounds to me like the medical researches deserve the credit.


#6

Just some tests I did with this Custom Shader on MR4M where i used my humble head.


#7

Hope it helps
-lazhar


#8

In my experience, the combination of subsurface scattering, good textures, bumps and good lighting is the best approach for realistic skin. SSS alone won’t do it, it really needs good lighting too.


#9

Very nice !!
For my head, it was just a test render to see the effect of SSS with tranvol2. I’ve never seen results with this shader so i tryed myself. I tryed to do it with textures but i know it will take ages to render with my slow computer.
what did you use to render this body?


#10

This is Poser 5’s renderer, using a light set created with HDRShop/LightGen. I rendered this to test the script I wrote to import the light set and I was surprised to see how it turned out, despite the low-res texture I used.


#11

I’m just trying to get it installed here, I tried following the instructions but Maya is saying “Warning: File not found: render_tranvol201.xpm” and I don’t know where to get that or put that…

-j


#12

Besides the aforementioned transvol which was written with xsi in mind, there is also a shader from www.lightengine3d.com called subScatter written for maya more specifically. It is not free, but there is a demo version, limited to the number of lights (one).

The lightengine3d one offers a tad more control and also comes with a version for the maya renderer.

The mray version is somewhat limited in that it does not emulate all the attributes of a standard maya phong shader, and does only subscattering (at least last time I checked it). The maya version does it all.

Regarding missing .xpm, that´s just the icon needed for the maya display (if it is not found it should still work, or you can use any icon and name it appropiately like that). It can be placed anywhere in which maya searches for icons (XBMFILEPATH or something like that environment variable).


#13

I’ve got that problem Jeremy, just put that file in the Icons directory of your Maya. It’s not mentioned in the instructions, I think it’s not written for Windows users.


#14

Originally posted by lazzhar
I’ve got that problem Jeremy, just put that file in the Icons directory of your Maya. It’s not mentioned in the instructions, I think it’s not written for Windows users.

I never got a file with that name, but I renamed another icon file to that, hoping it would work – it didn’t, and when I create the transvol node there are no options or variables in the attribute editor for it. Hmmm…

-jeremy


#15

Oops… There is no icon file with Transvol. I still have that warning message when loading MR, but the Shader works fine as you can see above. Maybe you did miss something jeremy. I’ve donwloaded this shader some months ago, but i didnt try it till now. May be they changed something. It works fine on Maya 5.0.


#16

Alright, thanks, I got it working, and played with it for a while, although it gets so slow (feels as if it is raytracing all the scattering), that I did most tests with very few samples looking at grainy output.

You can see from how it interacts with shadows in some areas that it wasn’t designed to work as a skin shader in contrasty lighting situations. For example, light a head with a single key with opaque shadows, making one side of the nose bright but leaving the nostrils dark. Then add SSS, and see if the red glow extends into the nose interior - it didn’t, and the characteristic soft reddish edges around shadows cast on the cheeks don’t seem to work well, either, although I got one thin edge like that. The thread linked below notes that it is not really a SSS shader:
http://www.highend3d.com/boards/showflat.php?Cat=&Board=MayaMR&Number=153320
Still, it allows some interesting translucency effects to go pretty far beyond the stock Maya shader translucency, so it seems well worth downloading and testing in case it is needed - great shader for a free-bee, anyway, we should all thank Andy for his on-going work.

-jeremy


#17

there’s a shader called volumeFX, this does all kinds absorbtion and volumetric-scattering calculations.–this was mentioned in the link that mr. Birn appended in his last response.—

it is really versatile too. you can apply the same shader to an object for SSS, or apply it to a pass/scene and get all kinds nice atmospheric volumetric scattering effects. though the shader-node is not texturable, so i havent found it to be that suitable for things with varying levels of absorbtion. it would be great if you could apply a procedural-texture and have it map to an objects volume in 3d, which hypothetically is plausible, since procedurals are inherently 3d fractals.

what i dont understand is why mentalray for maya users dont have access to it (i use XSI), i was under the impression that mentalray shaders operated inside mentalray, and were therefore independant of whatever application they originally came with.
PS. im pretty sure this is the shader they used for all that great volume scattering in Fight Club.


#18

Many of the MR shaders that ship with XSI were written by Softimage and only come with Softimage products with MR.

I hadn’t heard that one wasn’t mappable - for human skin, different parts of the face need to be mapped differently for SSS to work convincingly.

-jeremy


#19

alot of surfaces and volumes need to be textured to correctly respond to SSS shading and lighting, ie. Henrik Jensen’s
example of the granite sphinx, human skin, marbles, and anything which isnt entirely homogeneous. . .

i assume that you use Prman for most of your rendering production, mr. Birn. What kind of SSS solutions are avaliable to users of this product, are they texturable? are there some shaders that Pixar utilizes that may be made avaliable in the future? arent several layers of mesh actually required to correctly reproduce the scattering in human skin (fascial tissue, dermis, and epidermis)?

so much research has been done regaurding this subject that i wonder why more shaders using BSSRDF arent avaliable. . . although we are seeing alot of 3rd party solutions… Andymator’s Transvol and Taron’s Hotspotter for Lightwave, to name a few. possibly the adaption of mentalray to other packages, maya, 3dsmax etc has forced development of this kind of stuff to a backburner. i was at the SIIGRAPH in LA, and was delighted to see so much response on the subject. . .im just a little dissappointed that not alot has been done to implement all that great reasearch, but then at least its not an effect that has been played-out like the proverbial “LensFlare”


#20

The need to map SSS I mentioned wasn’t even based on variation in the skin (although that’s there too) it’s primarily the variation of what’s underneath it. In your forehead, there’s your skull right under the skin. In your cheek, there’s translucent flesh. So, if a high-contrast shadow falls over your cheek, you get a red glow around it, or if the terminator is there there’s an orange-red glow around the terminator, but you don’t expect to see that in the forehead where there’s less translucent red flesh beneath the skin. In the forehead all SSS does for you most of the time is warm up the frown lines and wrinkles so they go deep red instead of black.

Most SSS you hear about done in Renderman (such as for characters like Gollum) are at studios where they design their own shaders. I believe though that there’s a “Swiss Army” shader that can support SSS and be linked to any texture you want.

I’ve very interested in off-the-shelf solutions I can use at home, and I find transvol interesting, and subscatter plug-in from lightengine3d to be promising. It’s a shame MR isn’t keeping up as well as it used to - back around the time Jenson was working for them, all the latest things (Photon Mapped GI, Caustics, Image Based Lighting) were getting implemented soon after he developed them. Now that they’ve parted ways, the more recent stuff he’s come out with hasn’t been getting implemented. I’d like to see a real focus on this issue in off-the-shelf products, because making something look soft and translucent shouldn’t take a lot of R&D, SSS is a tool that many 3D artists could use to help shake that CG look on their renders.

-jeremy