Announcement

Collapse
No announcement yet.

DOF & units

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

  • DOF & units

    Hi, Using a Vray Physical Camera with units set to mm, the Depth of field seems far too much compared to real world values....... do I have to re-scale to meters for this to work or is there another scale setting I have missed?

    Thanks

  • #2
    I work in mm too, and I can't get any dof unless I move the object more then 1.000.000 units away from the camera and set the f-number to 1, which obviously can't be right.

    /Thomas
    www.suurland.com
    www.cg-source.com
    www.hdri-locations.com

    Comment


    • #3
      Thanks Thomas..... it must be a scale issue then?...... Vlado - can we work with Physical Cameras in mm's?

      Cheers.

      Cam

      Comment


      • #4
        what size lens are you guys using?
        Chris Jackson
        Shiftmedia
        www.shiftmedia.sydney

        Comment


        • #5
          .... most noticable when using a long lens of say 200mm - even with the aperture set to 1 or 1.2 the DOF is very large....

          Comment


          • #6
            It looks to work properly (more or less); I'm doing some tests now and will post them in a moment.

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

            Comment


            • #7
              Well, in Thomas' case specifically (he sent me a scene) it looks like the V-Ray camera behaves correctly.

              In his scene, the camera has a 30mm lens, 35mm film and is focused at a sphere which is 4.16 m away, with f-number 1.0. The system units are millimeters.

              According to Wikipedia, in that case the DOF (the part of the scene which is in focus) is given by:

              DOF start: Dn=H*s/(H+s)
              DOF end: Df=H*s/(H-s)

              s is the distance to the subject, in this case 4.16 m.

              H is the hyperfocal distance, which is given by H=f^2/(N*c) where f is the lens focal length (in this case 0.030 m), N is the f-number (in this case, 1.0) and c is the circle of confusion. We want the circle of confusion to be 1 pixel, so for a 35mm film at 720x405 resolution c is 0.035/720. Substituting those in the formula gives H=0.03*0.03/(1.0*0.035/720)=18.5m

              From here, we get that Dn=3.4 and Df=5.37. That means that if we put the sphere closer than 3.4m or farther away than 5.37m, it will be unfocused. Within those limits, it will appear focused. This is exactly what happens with the V-Ray physical camera.

              If we choose the f-number to be 8.0, we get H=2.31m. In that case, Dn=1.49m, however, because our focus distance (4.16m) is larger that H (2.31m) it means that Df is infinity. That means than anything farther away than 1.49m will be in focus. Again, this is exactly what happens.

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

              Comment


              • #8
                Vlado is right I was wrong..

                I just did test comparing dof to a photo taken with my 5d, and the result was the same as the photo.

                /Thomas
                www.suurland.com
                www.cg-source.com
                www.hdri-locations.com

                Comment


                • #9
                  .... RC3 seems to have resolved the issue for me

                  Thanks Vlado

                  Comment

                  Working...
                  X