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.
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.
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.
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.
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.
Which renders like this
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.
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
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.
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
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
Have fun with fur. There is so much to experiment with.

No comments:

Post a Comment