Make fur invisible during FG calculation



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.

addAttr -ln "miFinalGatherHide" -at bool myShapeNode;


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.


Have you tried applying it to you geometry before setting up the geometry shader?


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.


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


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.