View Full Version : Make fur invisible during FG calculation
haggi 08-15-2011, 03:13 PM Hi,
I'd like to make my fur completly invisible in the FG stage. This way I can later use the fg information of the surface point where the hairs start.
Unfortunatly I didnt find a way to make the fur completly invisible during FG calculation. I'd really appreciate any ideas.At the moment I have a hair shader which executes a mi_trace_transparent() if I'm in a FG stage, but if I have lots of hairs and additionally shadow maps, this takes ages to render.
|
|
Puppet|
08-15-2011, 03:40 PM
addAttr -ln "miFinalGatherHide" -at bool myShapeNode;
haggi
08-15-2011, 04:31 PM
Good idea. Unfortunatly I create my hairs in a geometry shader and it seems not to work this way.
Do you have any idea how to archive this result in a geo shader?
In the mi file output I can see the line:
visible on
shadow 3
finalgather off
finalgather 3
How can this work? I suppose finalgather off means finalgather 0, but it its overwritten in the next line with finalgather 3. Thats confusing.
In my geometry shader I set
obj->finalgather = 0x00;
But I still get a finalgather occlusion from the geometry.
InfernalDarkness
08-16-2011, 05:25 AM
Have you tried applying it to you geometry before setting up the geometry shader?
haggi
08-16-2011, 08:06 AM
Yes, but the geometry shader replaces the shape node and this way I cannot use the miFinalGatherHide and on the transform node it has no effect because it is not exported.
haggi
08-16-2011, 08:08 AM
Found the solution. Following puppets tip and analyzing the mi file, I had a look into the mentalray docs and there I could found the correct way to turn it off:
obj->finalgather = 0x12
CGTalk Moderation
08-16-2011, 08:08 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.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.