Announcement

Collapse
No announcement yet.

Depth of field only behind focus distance

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

  • Depth of field only behind focus distance

    Hello,

    I have a scene with a big glas pannel and I need DOF. Usually I use the Renderelement ZDepth and do DOF in post but it won't work with transparent objects. So I have to use the DOF of the VrayPhysicalCamera. Is there a way to get a fake DOF only behind the focus distance (not between camera and focus distance)?

    Thanks

  • #2
    Is there no way to do this?

    Comment


    • #3
      You could use a Zdepth pass, but you'll have to change the refraction to affect all channels in order to see through the glass in the pass.

      Comment


      • #4
        Two renders, deep comping.
        With the above trick for refractions, probably.
        Lele
        Trouble Stirrer in RnD @ Chaos
        ----------------------
        emanuele.lecchi@chaos.com

        Disclaimer:
        The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

        Comment


        • #5
          There is a way:
          1. Create a new V-Ray Light Material and then apply a Distance Map into it.
          https://docs.chaosgroup.com/display/...RayDistanceTex
          2. Create a huge plane and align it to you focus distance point.
          3. In the Distance Texture choose the just created plane as the distance object
          4. You can then control the gradient between black and white with the dsitance parameter
          5. Notice that you can override inside or outside (speaking in front or behind the plane) seperately. So for example making everything black (no DOF) from the camera to the focusplane and have the gradient only happening behind the focusplane. If I understood correctly that is what you wanted to achieve.
          6. Leave a glass shader on any glass object you have and apply this light material to anything else and then render.
          7. Use the now created rendering (that should look like a customizable zDepth Channel) for applying DOF in post

          Let me know if that worked

          Best,
          Jonas
          Last edited by JonasNöll; 29-05-2020, 02:47 AM.
          Check out my FREE V-Ray Tutorials

          Comment

          Working...
          X