Announcement

Collapse
No announcement yet.

Rendering a z-depth pass with reflections

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Rendering a z-depth pass with reflections

    Is there any way to do this?
    I have a scene in a bathroom with a his/hers on opposite sides, and i wanted to do a depth of field shot which looks at one sink and then focuses on the one behind the camera on the opposite wall, as seen in the mirror. Trying to see if it's possible to do the depth of field in post.
    I tried using a falloff map with distance blend & the mirrors excluded from the override material, but the issue is that it calculates it from the camera position and not the traced ray length - so everything seen in the mirror is pure white as it's read as a negative amount.

    Is there a solution for this beyond rendering DOF in camera? - it's early enough that I want to work around technical issues and in-camera dof looks nearly good enough with a reasonable render time.. but to get it perfectly clean starts to get a bit silly.


  • #2
    could you camera map everything in the scene and apply an override with the rendered z-depth pass as the material to everything except the mirrors and then render that off?

    jx

    Comment


    • #3
      You could
      - mirror the camera on the mirror's plane and film the side you would see through the mirror. Theoretically you could composite that on top of your original render, including zDepth.
      - mirror the geometry on the mirror's plane and make the mirror a window.

      Darken down the other side a bit and add some dirt on the window/mirror surface. Also offset the output and add it on top again to simulate the glass surface reflection (fresnel) if it's a close shot.
      Rens Heeren
      Generalist
      WEBSITE - IMDB - LINKEDIN - OSL SHADERS

      Comment


      • #4
        In recent V-Ray builds, VRayMtl has an option to propagate render elements through reflections (same as refractions), it might help.

        Best regards,
        Vlado
        I only act like I know everything, Rogers.

        Comment


        • #5
          Global override material diffuse channel to "Falloff" - "Distance", set the exclude on the material override to the pure mirror material maybe?
          Colin Senner

          Comment


          • #6
            Did that - it calculates it from camera position, so as reflections bounce back it moves to white and clamps at 1 as it shows areas behind the camera. It's the method I was originally hoping on using.

            Rendering it out from another camera looking back into the room and projecting that back onto the geometry sounds like a winner so far (and the easiest)
            If i had more than 5 machines available i'd just render the DOF, it's looks beautiful because pretty much every surface is reflective. Unfortunately I cant really go above 30 minutes for a 1080p frame

            vlado, do you mean the nightlies of 3? i'm a few steps behind from being able to use that...
            Last edited by Neilg; 13-12-2013, 08:55 AM.

            Comment


            • #7
              No it seems to work with 2.40 here. You have to give the mirror a 100% reflective vrayMtl though and set affect channels to all channels. (It starts blending in the mirror's Z when when you lower the reflection.)
              This might be your quickest option.
              Rens Heeren
              Generalist
              WEBSITE - IMDB - LINKEDIN - OSL SHADERS

              Comment


              • #8
                Yeah, i'm still on 1.5
                That works for refraction, but not reflection.

                Comment


                • #9
                  Geometry it is then! : )
                  Rens Heeren
                  Generalist
                  WEBSITE - IMDB - LINKEDIN - OSL SHADERS

                  Comment


                  • #10
                    do a reflection render pass of the normal objects. then try to do a render pass of reflections with normal for turned on and override materials except the reflected surface to be pure black. that reflected fog could be used as a z-depth of the reflections. this of course is really messy and a hell to setup
                    was an old school technique i used to use way back. had a tutorial on either 3dluvr.com or 3dtotal.com but cant find it now

                    ---------------------------------------------------
                    MSN addresses are not for newbies or warez users to contact the pros and bug them with
                    stupid questions the forum can answer.

                    Comment


                    • #11
                      I just rendered it in camera in the end - the difference it made to have all the glossy reflections shift focus while the edges of the object went the other way was far too cool to not do. Got my mirror working properly too

                      Managed to get by with a 30-40% increase in time after some tweaking which was pretty manageable. I only have a couple shots that do this kind of thing.

                      Comment

                      Working...
                      X