Creating a Depth Map for use in After Effects
-
I am struggling to get a depth map render out from C4d. The goal is to be able to add fog in After Effects during compositing.
Rendering in RedShift I have enabled Depth in the AOV manager and selected Depth in the Redshift Renderview, but do not see a depth map? Attached is what I am seeing.
Any help would be appreciated.
[Screenshot 2024-02-05 at 3.07.32 PM.png](Image dimensions are too big)
-
Hi Mark,
Images attached to the post can't be more than 500 pixels high.
If possible, for future questions, please provide an example c4d file; images do not tell the whole story.Typically, the data is there; go to the "Redshift RenderView" and click on the cogwheel in the upper right corner 9You might need to expand the frame to see it. Then go to Pixel.
Hover and move over to the Depth Pass; the data should change.
Please note that this is a data pass stored in an image. The distance is stored as units. To make it visible, you need to "Normalize it," or simply put; you could change the Levels typically it needs quite a few steps down to get there. AfterEffects> Effects> Levels (~=Range mapper in C4D)
This should be all done in OpenEXR. Integer files like PNG or similar won't work here well.
Is that helping? If not, please share the c4d file here (not zipped and below 1MB). A simple camera and an Object should work fine. To see your settings and reply with my findings?
All the best
-
@Dr-Sassi Thanks for the reply,
I am following a tutorial and it shows the depth field option in the Redshift Renderview window. But I do not see anything. When I render I get a .EXR but it seems to have no data.
Here is a stripped-down project I made to test.
Depth test.c4d -
Thank you for the file, Mark.
Here is your file back:
CV4_2024_drs_24_RSdp_01.c4dHere is a one-minute screen capture. Please note that I use the clipping to evaluate how to set up the Levels in After Effects. I use the Levels here like a Range Mapper. With these values, you get the most continuity along many scenes, and it doesn't crunch data.
https://stcineversityprod02.blob.core.windows.net/$web/Cineversity_Forum_Support/2024_Clips_DRS/20240206_RS_2_AE _depth.mp4Use the Picture Viewer for rendering and see how it works.
In the Redshift RenderView, try the Save as Multilayer EXR as…
Then, in Ae, use the Extract for the Depth layer and then the Level.This should give you both render options in a working way.
All the best
-
Thank you for the video and project
I still can not get it to work. I followed the steps, even when back, and set up a scene just as you had it.
The only thing I see is different is when I set the levels in After Effects my histogram sliders move off-screen, and yours stay on. I am on a Mac, this could be why it is not working.here is my After Effects file and C4d file along with the .EXR files https://we.tl/t-fHdaaSjlBt
-
I think I got it, i somehow found 3d Channel Extract plugin, this must be something new.
Thank you!
-
Hi Mark,
Thanks for the files. Working with files is always so much nicer, as I can give you answers that will work.
I used it in my fourth-decade Mac. I mention it because you wrote it might be Mac-based. Let me show you that you have all you need to work.
These large values needed do not work in 8bpc. Never have, never will.
This is the first step to making it work:
The Ae project was set to 8bit/channel. Option Click on the eight until you see 32bit/channel (bpc). Some people suggest 16 bits per channel for EXR, which might be nice and sufficient for many projects. I do not share that point of view. This is the container of all our work; why would I try to save a little bit of time or a few Dollars for storage? I also use exclusively loss-less. At one point, close to a deadline, it might pay off. Anyway, it is an artist's decision.The second step needed to understand is also straightforward with your setup:
You have saved Cinema 4D the Open EXR file as Multilayer; that is an option and a workflow decision.
I'm on the fence here. After a while, minor changes may require replacing single-layer information, but the initial file keeps holding the information that was replaced. If you don't stick with Multilayer and always replace everything, it might become very storage intensive. Also, here, everything is fine as long as it supports your workflow.
The problem you were running into, even with a single layer in the Multilayer file, was that you needed the EXtractoR Plug-in, which has been part of Ae for a while. (Thanks to "Fnordware.com")If you open the Layer with the EXtratoR plug-in, the Z channel has adjustments to pinpoint the Z space (see image). With this, no Levels are needed anymore.
In other words, your material was excellent and contained all the information needed. Nothing was wrong, except you didn't gain access to it in Ae. The step above will allow for that.
Here is the Ae file; reconnect your Open EXR file, and it should show you a depth map.
https://stcineversityprod02.blob.core.windows.net/$web/Cineversity_Forum_Support/2024_PROJECTS_DRS/202403007_CV4_2024_drs_24_EXdm_01.aep.zipEnjoy your project.