Community
Arnold for Cinema 4D Forum
Rendering with Arnold in CINEMA 4D using the C4DtoA plug-in.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Zpass / motion vector pass with transparent objects ?

9 REPLIES 9
Reply
Message 1 of 10
Francis_Bievre
909 Views, 9 Replies

Zpass / motion vector pass with transparent objects ?

Hi Guys,

Is there a way to have the Z pass go through transparent objects such as windows ?

Same question for the motion vector pass.

I checked the "transmit AOVs" box in the shader but it seems to work only with the alpha pass.

Thank you for your help.

Cheers,

Francis

Tags (1)
Labels (1)
9 REPLIES 9
Message 2 of 10

It's not possible, I'm afraid. Maybe you can read the Rl (ray length) with a state_float shader, and do some trickery in composite, but it starts to be complicated when you have multiple transparent objects along the ray, etc.

Message 3 of 10

Ok, thank you Peter :'(

Message 4 of 10
madsd
in reply to: Francis_Bievre

It's easy for Z pass through abitrary number and refraction bends on number^n glass layers, it adds no complexity as that is technically ignored completly and has nothing to do with nor impact the technic used.
See here, I rendered a Z pass out of a scene with 2 teapots and a glass between them I can pick both pots out for focus as I drive the focus with the Z pass, note that the glass distorts correctly down the Z axis so this isnt some cheap trick, it will work for anything.

1515-qweqweqweqweeeeeeeeeee.gif

Message 5 of 10

Wow, thank you Mads, how did you setup that in Arnold ?

Message 6 of 10
madsd
in reply to: Francis_Bievre

Let's turn the question into something analytic and concrete.

What is a Z pass? it is a stacking of density down the z axis.
What is a Volume? it is a passive container waiting to be interacted with.

A volume with a fairly low density will return stacked density in all directions, also down the camera Z.

So we put the scene inside a volume and give it a volume material and render a volume AOV out and we put the Volume AOV into a new channel of our beauty pass and drive the focus with the newly generated Z pass derived from the volume pass.

We now have a solid method that is immune to number of elements as the rays just pass normally provided we give enough rays in the render panel and naturally tick Transmit AOV in the glass.

So we skip thinking Z buffer is correct approach, we utilize a physical pehnomena, and since density is linear pr default, we are good to go.

Message 7 of 10
Anonymous
in reply to: Francis_Bievre

Hi,

I already posted in another thread... This z depth is driving me crazy. I try to use the same approach I used to with Mental Ray : rendering the dof using a fog. But I cannot manage to do it with Arnold. I try to use your workflow, but don't know what to do exactly. I created a box bigger than my scene, applied a volume shader on it. But does not seam to work as it should. Could explain step by step your process?

Thanks,

Edit:

ok,

I created a box around my scene. applied volume shader on it. density to 0.01. emission mode to none. In arnold property of the box, volume enabled, step size to 4 for testing. unticked cast shadows.

it is not perfect but I have something outputing volume in aovs.

It takes a lot of time to render. Excluding lights is all black. Is there a self illum somewhere? Do I have to untick in object arnold properties, diffuse reflections or other parameters to speed up rendering? What should be arnold sampling and ray depth for each ray?

Any help would be much appreciated. Thanks

Message 8 of 10
madsd
in reply to: Francis_Bievre

You would need to adjust the density accordingly to scale. I often find values on second or thrid decimal works fine without first scaling it with a gearing such as a range node. But 0.01 density should give you a nice fine volumetric Z stack that lives absolutly perfect through glass and what not. Sounds like you got the box rigged, its just the density - and ofcourse, disable everything not related to the Z pass such as heavy computational calculations.

If still stuck I can make a pseudo tut, since you use C4D UI is different, result will be identical.

Message 9 of 10
Anonymous
in reply to: Francis_Bievre

Sorry I posted in the wrong thread. I use 3dsmax. I would really appreciate if you could do a simple scene like the one with the 2 teapots and share it. What do you mean by disabling the rays I don't need?

Edit:

It is getting better. I forgott to tick transmit aovs in the glass material. I excluded my box with volume shader from all lights. The probleme is that volume aovs output is colored... I put emission at "density", amount 10 and color grey 0.5. Density is 0.01 and Scattering color is white.

arnold-volume-beauty.jpg

arnold-volume-aov.jpg

Message 10 of 10
Anonymous
in reply to: Francis_Bievre

So after testing this what I have:

I cannot have the volume aov output without having the volume on the beauty output as well (not the beauty oav, just the normal output from 3dsmax).

I have to rerender a whole sequence for the volume (I output it directly from the render panel not the aov as the aov output is very grainy). I have to tick in the diagnostic panel, ignore lights, ignore shadows, to speed up a little bit the rendering.

For now it is working ok. I find the volume pass to be quite long to render. I might miss something...

2110-beauty-0026.jpg

2111-z-0026.jpg

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators