Saturday, April 14, 2012

tips for rendering maya fur with mentalray


I've been working on a project involving the use of maya fur. It's the first time I have rendered fur using the mentalray renderer, so there was much to learn. One of the difficulties I encountered was dealing with the illumination of near-white colored fur (like a polar bear). In the past, using maya's native software renderer, I would have added fur shadowing attributes to my lights to allow me to control and balance the amount of illumination on the fur, but these attributes are not supported by mentalray so I had to find another way.
In this post I show an approach to rendering near-white colored maya fur with mentalray.

I'll start by creating a torus to which I have attached a fur description with the polar-bear preset. I have two spotlights for illumination. Here's a top-view snapshot of the setup.
topView.jpg
I want my fur to be almost white, so the underlying surface needs to be faily pale. I'm using a simple cream colored lambert with some ambient color to brighten it up.
baseObjectShaderAttr_Amb.jpg
baseObjectNoFur.jpg
I want to achieve a soft look without any shine so I started with the polar-bear preset but changed the Light Model to Ambient + Diffuse (so no specular component). And I set clumping = 0.
If I render it without changing anything else I get this.
polarBear_HairPrimitive.jpg
This is using the standard scanline/raytrace render method, not the rasterizer, and it took 1 min 30 secs (I'll use this time for comparison).
Tip #1: Change Fur Shader from Hair Primitive (default) to Volume in the mentalray section of the Fur Render Settings. Here's what it renders like.
polarBear_Volume0.jpg
And this only took 16 secs (thats six times faster!).
I want the fur to be even whiter than this so I added base and tip ambience to brighten it up.
polarBear_furDescriptionA.jpg
Which renders like this
polarBear_Volume1.jpg
This is closer to the color I want, but now the fur looks too bright and its luminance is clipped harshly at the top end of the luminance range. Lowering the intensity of my lights would prevent the clipping, but then everything else would be too dark and my fur would look dirty.
Tip #2: Use a tone mapper. I used mia_exposure_photographic as a lens shader attached to my camera. Here is a snapshot showing the exposure attributes.
mia_exposure_photographic_attr.jpg
The Cm 2 Factor setting makes all the other attributes work in the desired exposure range. I reduced gamma to 0.5 to give me a bit more contrast between the whites and the near-whites. And it now renders like this
polarBear_Volume2.jpg
Tip #3: Play with the Shadow Density Scale in the furDEscription's Volume Fur tab. By increasing this from the default 0.125 to 0.5 I get nicer fur shadowing.
polarBear_furDescriptionB.jpg
polarBear_Volume3.jpg
Tip #4: For the underlying surface use incandescense instead of ambience. This will eliminate the darkness of the shadows that the fur makes on the underlying surface. So my lambert looks like this
baseObjectShaderAttr_Incan.jpg
baseObjectNoFurIncan.jpg
polarBear_Volume4.jpg
Well I'm pretty happy with the color now, but the over-all look is a bit dull. Some tasteful burn out will give it the appearance of a bit more dynamic range so I increase the exposure Burn Highlights from 0 to 0.03 and here is the result
polarBear_Volume5.jpg
Have fun with fur. There is so much to experiment with.

No comments:

Post a Comment