Jump to content

rendering hair faster


Recommended Posts

I notice that when I render hair on the model with none of the ZBrush displacement/texture maps on, the render takes place very fast. When I turn off the hair and render with the ZBrush displacement/texture maps ON, the render happens pretty quick. When the hair is rendered *AND* the displacement/texture maps for the character mesh are turned on, then the render slows to a crawl - orders of a magnitude slower at least.

If it matters, I've got two lights, both with deep shadow maps turned on. I'm rendering using the micro poly renderer. The hair count is at 200,000 hairs for the render. I'm using the default hair shader. Is there something stupid that I'm doing?

Link to comment
Share on other sites

Another possibility occured to, maybe this is making this too complicated. Would it make sense to render the hair in a separate take? So you could render the character with GI lighting on and hair off, then render another take with the GI lighting off, hair on, and the character as just as matte (I guess that's the right term) or maybe something that will catch shadowns. Then composite the two parts together? Would that make more sense?

Link to comment
Share on other sites

Yes that would work. Just apply a matte shader to your skin for the hair pass and comp together.

So I got a chance to experiment with this. I did get it to work but ran into a snag. To make it work I used a shadow matte on the character for the Hair take. Works fine, but...since it doesn't have a displacement map associated with it, it doesn't track 100% to the outline of the fully textured and displaced render of the character. And you can see this when you comp the two passes together :(

If I tinker with a custom shader, and add the displacment back in, then the time goes wayyyy back up. I presume that the displacement is adding all sorts of new calculations for where the shadows will fall and this, combined with the presence of the hair strands, is what's causing the high render time?

So is there another technique I should be looking at, or is it simply the case that rendering hair and shadows is just really expensive (time wise) and there's really no way around that?

Link to comment
Share on other sites

So I got a chance to experiment with this. I did get it to work but ran into a snag. To make it work I used a shadow matte on the character for the Hair take. Works fine, but...since it doesn't have a displacement map associated with it, it doesn't track 100% to the outline of the fully textured and displaced render of the character. And you can see this when you comp the two passes together :(

If I tinker with a custom shader, and add the displacment back in, then the time goes wayyyy back up. I presume that the displacement is adding all sorts of new calculations for where the shadows will fall and this, combined with the presence of the hair strands, is what's causing the high render time?

So is there another technique I should be looking at, or is it simply the case that rendering hair and shadows is just really expensive (time wise) and there's really no way around that?

If you are using micropolygon rendering you could reduce shading quality on your matte object. Then you will still get displacements but they will compute faster as it wont make such small micropolygons. They will probably on the other hand be small enough for just a matte.

Link to comment
Share on other sites

OK got it to work. I rebuilt the shader from scratch again, and this time it didn't cause the render slow downs. I must have done something incorrect before. I'll check out the render settings but for now it's pretty good.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...