Saturday, September 15, 2007

Shave and Haircut: Shadows (Mental Ray Hair Primitives)

Wow Mental Ray Hair Primitives. What a change of pace. Wish I would have learned this 3 months ago. My new friend Doug (who is a master cg artist) spent a few days testing shave and haircut and has completely changed my outlook on how fur needs to be rendered...it's with hair primitives! Here are the major technical points are your shave globals, your light's shadow settings, and your mental ray globals:

Render Globals:
Change renderer to mental ray. Use Rapid Hair adjust the anti alasing settings down to get faster render time

Shave Globals:
Once you've switched to the mental ray renderer in the shave globals you will now have the option to change to "hair primitives" this essentially switches your hair to geometry at render time. I assumed this would make for really high render times but has massivly improved render times, though you have to pay closer attention to your light's shadow settings.

Light Attributes:

I only light hair primitives with spot lights. Once you've made your light, go to your attributes -> Shadows, check use depth map shadows. Scroll down down and expand the area that says "mental ray" here you will see attributes that deal with shadow maps. Enable shadow maps. I believe this overides your depth map shadow settings so you have to set a new shadow resolution (256 or 512 will give you soft shadows, 2048 4096 will give you sharp shadows). I've worked with shadows samples between 1 and 4 (I up the samples if I am getting bands), and I work with softness levels between .001 and .01 (this seems very sensitive).

This is a quick rundown, I'll flesh this out further once I have more accurate results. Though using primitives has taken what was once a 3 + hour render down to about 23 minutes with very similar (even better) results.

Tuesday, September 04, 2007

Shave and Haircut: Shadows (Mental Ray Buffer)

Ok probably the most important thing I've learned over time is about Shave shadows. Much of this is probably really obvious...but here's a quick rundown for Shave and Haircut Shadows using the buffer:

Geo Shadow - The geometry that the hair is attached to is casting shadows on the hair if this feature is turned all the way up. For some reason for quite some time I always thought this attribute affected how the hair casted shadow on to the geo under it...I was very wrong. So if you want to create a rim light pass for the fur, you would want to put a light behind your geo and hair and turn geo shadow all the way up.

Self Shadow - Hairs casting shadows upon themselves, that one is pretty straight forward.

How to avoid a major flickering problem when rendering with the buffer - If your throw a light into the scene (without properly setting up the shave shadow attributes) and animate the hair moving around you are most likely going to get a flicker/jitter/shimmer render. I've typically been working with a spot light as my key light. After creating my light with a scene that already has hair, I select the light then go to the shave menu ->Shadow -> Add selected lights. This will create a new attribute in your spot light. If you enter 1500 into the resolution and 30 into fuzz this will give you a good starting point to avoid those flickers. Joe Alter suggested those numbers himself and they've been working great for me.