Depth Pass on Transparent Objects


#1

I’m using transparent objects and C4D’s depth pass is not displaying them. I did some research and found many people referencing a “zblur” plugin, but it seems like it would only work in R19 and earlier. Also, it seems like all links to it are broken and it is only being hosted on pirate websites now.

What is the preferred way to get a depth pass out of the C4D standard renderer that works with transparent objects? Preferably one that is not anti-aliased. What do you do?


#2

Render two passes. One with the full beauty that includes the transparent objects, and one z-depth only without the transparent objects. Then you can comp them together.


#3

Its a pain in the ass, but what I have done in the past is the following:
(FYI–this method is for c4d native render)

  1. make a copy (or Take) of the file. Make sure all lights are turned off.
  2. apply a grayscale / B&W gradient to the luminance channel of objects in the scene. Leave your Transparency/refraction/ alpha settings as they were in each material. Only channels turned on are luminance and transparency (if material/object needs it).
  3. Set gradient to worlld space or camera space. I would either use a gradient set to spherical or a linear gradient which begins where the camera is in space and ends at the furtherst point in the distance where there are objects still in your scene. I’ve done this with a simple xpresso setup by feeding the cameras global position into the “start” coordinates of the gradient shader, and then maybe a null that is near the outskirts at the furtherst disatnce into the end gradient position. Theres probably an easier way to do this–but this is what i remember doing --I think!
  4. Render this pass separately with AA turned off, and ideally at double the size of the final render. You are not rendering this via multipass–but as the actual manuall “beauty” render to get the intended dof pass you need.

You should be able to still see your DOF gradient running though the entire scene and refraction/transparency will still be present.

Composite your shot by scaling your beauty pass to the size of your manual makeshift depth pass and use the plugin of your choice to apply the depth pass to the beauty pass in your compositing program.

Then bring that comp inot a new comp and scale 50%. This will remove any fringe jaggies.

Hope that makes sense! its worked for me quite well in the past. Its beeen a while since Ive done it so hopefully I didnt forget a step here. Ive since moved on to in camera DOF, but occasionally there are still situations where you need to control dof in post–particularly when you need objects near the camera to remain in focus.