CINEVERSITY

  • Recent
  • Popular
  • Users
  • Groups
  • Login
Maxon Logo
  • Login
  • Search
  • Recent
  • Popular
  • Users
  • Groups

Creating a Depth Map for use in After Effects

Question & Answers
z pass redshift aov depth openexr
2
7
839
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M
    Mark last edited by Dr. Sassi Mar 7, 2024, 8:05 AM Feb 5, 2024, 11:13 PM

    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)

    1 Reply Last reply Reply Quote
    • Dr. Sassi
      Dr. Sassi last edited by Dr. Sassi Feb 7, 2024, 5:38 AM Feb 6, 2024, 9:55 PM

      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.

      login-to-view

      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 Sassmannshausen Ph.D.
      Senior Trainer, Maxon Master Trainer, L&D - Strategist
      Cinema 4D mentor since 2004, Member of VES, DCS.

      M 1 Reply Last reply Feb 7, 2024, 4:36 AM Reply Quote
      • M
        Mark @Dr. Sassi last edited by Feb 7, 2024, 4:36 AM

        @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

        1 Reply Last reply Reply Quote
        • Dr. Sassi
          Dr. Sassi last edited by Dr. Sassi Feb 7, 2024, 6:19 AM Feb 7, 2024, 6:18 AM

          Thank you for the file, Mark.

          Here is your file back:
          CV4_2024_drs_24_RSdp_01.c4d

          Here 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.mp4

          Use 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

          Dr. Sassi Sassmannshausen Ph.D.
          Senior Trainer, Maxon Master Trainer, L&D - Strategist
          Cinema 4D mentor since 2004, Member of VES, DCS.

          1 Reply Last reply Reply Quote
          • M
            Mark last edited by Mar 6, 2024, 11:44 PM

            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

            1 Reply Last reply Reply Quote
            • M
              Mark last edited by Mar 6, 2024, 11:51 PM

              I think I got it, i somehow found 3d Channel Extract plugin, this must be something new.

              Thank you!

              1 Reply Last reply Reply Quote
              • Dr. Sassi
                Dr. Sassi last edited by Dr. Sassi Mar 7, 2024, 8:04 AM Mar 7, 2024, 8:03 AM

                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.

                login-to-view

                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")

                login-to-view

                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.zip

                Enjoy your project.

                Dr. Sassi Sassmannshausen Ph.D.
                Senior Trainer, Maxon Master Trainer, L&D - Strategist
                Cinema 4D mentor since 2004, Member of VES, DCS.

                1 Reply Last reply Reply Quote
                • First post
                  6/7
                  Last post