PDA

View Full Version : occlusion as render passes -- their problems


ravi3d
07-13-2008, 01:38 PM
Hi all,
I have been trying to achieve occlusion as seperate passes to seperate my bg occlusion and character occlusion effect on bg as seperate pass(for achieving contact shadows).

For this I resort to using the mi Label trick (making id_nonself=2 on the object's mib_amb_occlusion shader and setting mi Label = 2 on the object's attributes) or else use the object's transform node tab wether to occlude or not to occlude, whether to recieve occlusion or not to recieve occlusion.
I am ok with the results.
I have two problems over which I have been pondering over the last few months.
1. How can I make an object cast occlusion properly that has a transparency map to it. Meaning say, half of the sphere should not render as it has a simple transparency given via
means of a ramp.I chose lambert and fed the ao node to the ambient color and this same
ramp to the transparency node of the lambert material and made the diffuse black, outcolor to white. What I saw was a object that is giving me half the sphere but giving me full occlusion based on the geometry of the sphere.

I would like to know there is a solution in which I can get occlusion based on the
transparency map applied to the surface.

2. What if there is a penetration between our background and the character layers?
I was till now giving character layer and the bg layer seperately so that I could have
better control over each of them individually as well over their shadows. Now, If the
character is penetrating with the object, is there a solution to avoid that in occluion
pass.

Bitter
07-15-2008, 07:53 PM
You can pass it through a surface shader or a mib_opacity, etc with a transparency map applied.

ravi3d
07-17-2008, 07:05 PM
Thanks for the quick reply.
I already tried applying the surface shader. Out color --> mib_amb_occlusion, and out transparency--> the transparency map and it gave a flat look.
I will try the mib_opacity today. If I am not wrong, u mean to connect the out color of surface shader to mib_amb_occlusion, connect the shader as input to the mia_opacity node and my transparency node to its transparency slot.. right ?

:)

ravi3d
07-19-2008, 06:13 PM
Hi,
I have tried all combinations for occlusion pass in hooking up the opacity shader with the surface shader. I was not able to acheive what I was expecting. Could you please explain a bit more on the shading-wise implementation?

One more hurdle to Occlusion pass....
Every time I submit a reflection pass/ occlusion pass via render manager, I get a "out of memory " error and the rendering aborts over the render pool. The same file renders without any problems locally on my machine without any hurdles. I have the same config on each render blade (Xeon 3.0Ghz, XP32, Maya 8.5, 2 Gb RAM) as well as my local machine. Can you anticipate what could be the culprit? My scene consists of some 4 animatable rigs and a simple background for achieving contact shadows. Every thing is referenced from a central repository.

Thanks

Rainroom
07-21-2008, 10:20 AM
I guess if you have a completely transparent object in real world (which is not possible btw) you wont see any occlusion from it. So in your case if I were you I would try to do some tricks on the solid occlusion pass in comp stage to make it look faded and transparent.

ravi3d
07-21-2008, 06:44 PM
Hi Rain room,
I canb quote two examples:

I am having problem in extracting the occlusion pass of a nurbs hair that has transparency map applied to it. This is more evident on the character's forehead, and when the hair is actually falling on the shoulders.
I am also having problems when the character is having torn out clothing with holes, so that I can see the hands wearing a shredded shirt with damaged clothing on it that was given via a transparency map.

I feed this transparency channel to the transparenct slot of a surface shader to extract my RGBA pass - no problem about it.
I tried the same with occlusion but it seems the transparency map applied via asurface shader with outcolor hooked up to mib_amb_occlusion was not woirking as mental ray treats that as pure incandescence and I was not getting my occlusion as expected.

So,
I applied a lambert to the same surface with outcolor---> white, ambient->mib_ambient_occlusion,
transparency -- > the same transparency map applied to the mesh when its color render was coming out, and the diffuse channel -> 0 .

In this way I was able to see the inner portion of the cloth mesh to reveal the inside portion in the occlusion pass. But is was not able to recognize that I wanted a occlusion pass of a mesh that comes out as in the color pass. I was looking for a way that the occlusion pass would understand that transparency applied to that mesh means no occlusion at that particular area of transparency.

I tried all methods but was not getting the render as expected as occlusion is surface based and not the textures that are applied on the mesh in transparency channel - based.

I think that was a little more elaborate to understand where I was getting at.
:)

oxygencube
07-22-2008, 04:15 PM
Not sure if I am getting this correct but could you back the occlusion and then render the transparent object on/over the now baked/textured material?


Or create different occlusion materials and composite them in post?

ravi3d
07-22-2008, 07:18 PM
Hi,
Baking was an option restricted only to the background layer.

Characters had to have contact occlusion with the bg and occlusion of one over the other so baking character occlusion on itself with the transparency map applied to it was not a possible option.

What I was looking for is a shading network that enables me to see occlusion heppening to some objects in the inner portion of a object with a hole( created via a transparency map) and I should not be able to see occlusion at all in the inner portion due this transparent area

I think that explains a little more .

:)

ravi3d
08-06-2008, 07:19 AM
I found a way to seperate character self occlusion and contact occlusion with the ground.
We had to darken the contact occlusion more that that of character self occlusion. So, for the ground the matte opacity of surface shader was connected instead of outcolor. In that way. I was getting character occlusion in the color pass while alpha was giving me only contact occlusion.

But this problem still remains..
How we can avoid occlusion on a surface based on the transparency map applied to it so that the area under that transparent map does not recieve occlusion at all (As if the surface in that area is not present).

Rainroom
08-07-2008, 11:44 AM
why dont you give reflection-occlusion a try?...that might help.

CGTalk Moderation
08-07-2008, 11:44 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.