PDA

View Full Version : Hair Pass question?


Wiz
03-24-2007, 03:47 PM
Hey everyone, I am having a bit of an issue creating a Hair pass, I do not know
how to get the correct Mattes and shadows, how would you go about creating this kind
of pass, Thanks alot.

colintheys
03-25-2007, 05:55 PM
This may or may not be a usefull answer, but sometimes I render my hair in a pass with the generating geometry (ie enveloped mesh) in a partition with a partition material set to black with 0 alpha. That way only the hair is rendered. Similarly, any objects that need ot cast shadows onto the hair should be put in a partition with an override setting primary ray visibility to off.

-Colin

pete
03-26-2007, 04:44 AM
It's a bumber there isn't a hair pass option 'cause I reckon you'd have to be doing it all of the time...
So colintheys, are you saying that you should make everything in your scene black except for the hair which would be white, and use that as an alpha to extract the hair from another render?

JDex
03-26-2007, 04:49 AM
No... just render the hair with color, lighting and all (w/ alpha un-premultiplied) and use the black material (constant or color savestate w/ 0 alpha contribution). You can then "over" this pass directly over the other pass elements using the alpha of the hair within the render as a matte.

Conversely, if you needed more control, you could have separate passes for the hair, just like above, but separating the color from the lighting... or what ever you want.

colintheys
03-26-2007, 04:51 AM
Actually no, I'm saying make the other objects black (with 0 alpha) and leave the hair normal. That way you can just plop it right into the shot with its alpha channel. It generally works quite nicely, though this is certainly not any sort of approved technique, just something I've found myself doing through my own experience.

-Colin

ps. lol jdex I guess we were answering at the same time.

pete
03-26-2007, 05:33 AM
o.K. that sounds pretty simple and cool.
As we are on the hair/pass subject, I was wondering, considering xsi uses a special shader for the hair, how does that handle other passes? Does it work with zdepth passes and the like?

colintheys
03-26-2007, 05:38 AM
The hair is passed to mental ray as geomertry, so depth works normally. The only issue I've had is with motion vectors, as the lm2dmv shader doesn't take the hair transparency into account, so for wild, heavily transparent hair, you can get some weird results. But there's probably a way around that too, I just haven't looked for it. And most of the time it doesn't cause a noticable difference anyway.

-Colin

CGTalk Moderation
03-26-2007, 05:38 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.