Announcement

Collapse
No announcement yet.

DOF too deep(not blurry)

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

  • #46
    Originally posted by vasil.minkov View Post
    But the DOF of VRayPhysicalCamera should be realistic regardless the System Units Scale. And if the setup is realistic then the DOF should be realistic too.
    Switching System Units Scale results in a different DOF (and framing) and this is exactly what a realistic camera is expected to do.
    You only have to compensate camera parameters if you want to preserve DOF and framing with a different scene scale. In other words - if you want to get the same pixel result in a giant scene then you will need a giant camera.

    Of course - I might be wrong. If you have a scene that is not renedered correctly - you could share it with us for investigation.

    This is not my post. I was, among others, just replying to it and trying to figure out what was occurring and to try to make sense of it in order to predictably get it right each time in my own projects.

    I can only suggest, in the politest way, reading the post from its beginning to see what confusion existed and still exists and possibly requesting the scene from the OP.
    Lele's responses were good but his agreement that things could be clearer and suggestions that 'poking' the devs to get clarification/docs updates etc. were made a long time ago, yet nothing has transpired.

    In practice, I think we just want things to work, especially with something as scene-basic as the camera.

    If these things are impossible to figure out and code into the camera then why not just say so and update the docs to make it clear? I'm sure nobody would mind that.
    Then present demostrably correct workflows/examples that everyone can use in a given situation. Problem solved!
    https://www.behance.net/bartgelin

    Comment


    • #47
      To be honest, I am more confusen than before as well.
      So, which unit setup do I have to work in in order to get a physically correct result that matches a photographic plate with an F-Number of 16 for example, given that I enter these exact values in the VrayPhysCam?
      https://www.behance.net/Oliver_Kossatz

      Comment


      • #48
        Originally posted by kosso_olli View Post
        To be honest, I am more confusen than before as well.
        So, which unit setup do I have to work in in order to get a physically correct result that matches a photographic plate with an F-Number of 16 for example, given that I enter these exact values in the VrayPhysCam?
        I think that it works fine with any system unit scale - millimeters, meters, etc. Any system unit should work, as soon as the scene is physically correct when using that unit.
        You should be able to use the system unit of your preference for your scene.
        At least that is what I observe with my test scenes. Again - I might be wrong, so if you have a simple test scene that render incorrectly - you could share it for investigation.

        Note that if your scene setup is correctly sized when using system units of millimeters, switching to meters would make your scene 1000 times bigger.
        And vice-versa: scenes that are correct with system units of millimeters would become 1000 times smaller if you switch to meters.
        Last edited by vasil.minkov; 28-03-2024, 06:09 AM.
        V-Ray for 3ds Max developer

        Comment


        • #49
          You can set the F-Stop lower via the scripting window.

          As Vasil pointed out, an alternative would be to INCREASE your film gate dimensions. (Which is why, for instance, your smartphone has tons of depth of field all the time due to its tiny sensor, and a view camera at 4x5 (or 8x10) has so little.)

          I guess we were all assuming the film gate was scaled with the system units, but I suppose it is clearly marked "mm"...
          Last edited by Joelaff; 28-03-2024, 11:07 AM.

          Comment


          • #50
            Originally posted by vasil.minkov View Post

            I think that it works fine with any system unit scale - millimeters, meters, etc.
            You think it is fine or you confirm that it is fine?
            I'm tired of testing things that you should be testing. Please share the results of your tests.

            https://www.behance.net/Oliver_Kossatz

            Comment


            • #51
              I confirm that it works with any System Unit Scale, including fractional units.

              I am sharing some test results as requested: DOF_scene.zip
              There are three scenes inside the attachment. Each scene uses different System Units: meters, millimeters, and "inches x 3.14",
              and they are all rendering the same.

              The setup consist of the following scene objects:
              • VRayPhysical camera (Focus distance = 1.6 meters, F-Number = 2.0, no exposure). The camera looks at X direction.
              • Rectangle VRayLight, with a size 2x2 meters and position of (X=0, Y=0, Z=3 meters).
              • Set of 15 horizontal sticks, 20 cm below the camera, placed at a step of 20 cm.
              • Set of 15 vertical sticks, 20 cm right from the camera, placed at a step of 20 cm.
              ​Note that the System Unit Scale should be reasonable for the scene size. Going beyond certain limits could lead to unexpected results, for example - microscopic scale, cosmic scale, or System Unit of kilometers + object sizes of centimeters.

              Edit: fixed millimeters scene in DOF_scene.zip.
              Last edited by vasil.minkov; 11-04-2024, 05:51 AM.
              V-Ray for 3ds Max developer

              Comment


              • #52
                One little trick: when the camera is created before a system unit change (that is, technically, a scene rescale.), to maintain the same field of view it's useful to tick "Field of View", so that the camera then takes care of preserving it (in other words, it compensates for the scaling operation.), otherwise the focal lenght will stay expressed in mm, as specified in the UI, and this will lead to FoV changes.

                In the scenes Vasil shared, if one changes the system units (f.e. from inches to mm), the V-Ray camera as it's set up shows a FoV change.
                With "Field of View" ticked and specified, the change does not happen, the FoV remains consistent.

                DoF however will change as it should (it's the same behaviour in the Max Physical Camera.) given the camera sensor hasn't scaled with the scene.
                So changing the scene units to mm from inches will make the scene minute (notice the boxes' sizes) and make the DoF enormous (at that point, one's macro-photographing.).
                This is the expected behaviour.
                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


                • #53
                  I have bumped into this issue again while preparing some scene for other reasons.

                  Judging by the depth of the focused field alone, when compared to the same lens and f-stop combo IRL, it looks as if the system units need to be set in mm.
                  For whatever reason (such as those above), any other system unit scales the effect up or down, in turn requiring silly numbers for the f-stop.

                  It would be great if anyone could test this and confirm or deny it: this seems to align with Bart's findings.
                  Last edited by ^Lele^; 11-04-2024, 04:30 AM.
                  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


                  • #54
                    The mm scene that Vasil included is in fact set to System/inches and Display/metres, as is the 'inches_by_pi' scene, so there's no mm one to check/compare.

                    I anyway set this up in a similar way, though merging the same assets into scenes set to System units of respectively metres/cms/mm, though all with display units set to mm for consistency.
                    After merging each, then setting the camera to the same mm parameters each time, the results are indeed basically the same, bar some shading differences.

                    Setting it to kms, out of interest, broke the camera....it needed to be zoomed out in order for it to be in the frame, and when zooming I could see the focus planes snapping from their position to what looked like the camera pivot point.
                    I suppose that's a rounding error but thought to mention it.
                    Attached Files
                    https://www.behance.net/bartgelin

                    Comment


                    • #55
                      It was another false flag for me, sorry about that.
                      Hopefully it helps clarify things.

                      The (evermotion) scene came with cm, and a focus distance of 20 meters.
                      So by changing system units to mm i scaled it down 10X, making it a macro shot, with a 10X closer focus distance, which in turn decreased the depth of field.
                      In fact, to get a properly narrow depth of field, it's enough to focus the camera closer, f.e. 2 meter away.

                      To recap the thread and its findings:
                      Any system unit can be used (that's why Piotr and Francesco's tests also worked.), but it cannot be changed freely after the camera has been created, as that scales the scene up or down, without scaling the camera system, thereby changing DoF/focus distances and so on.
                      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


                      • #56
                        Any apart from kilometres

                        But yeah, it works....that initial confusion really fed on itself and grew eh?!
                        https://www.behance.net/bartgelin

                        Comment


                        • #57
                          Originally posted by fixeighted View Post
                          Any apart from kilometres

                          But yeah, it works....that initial confusion really fed on itself and grew eh?!
                          I admit to having looked at this without enough effort for a while: it has worked just fine matching live plates since its inception, it had to be something about the processes.
                          And ofc being for so long out of the production loop i am well ring-rusty, and sometimes find my feet no sooner than i start walking and stumbling. ><
                          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


                          • #58
                            Originally posted by fixeighted View Post
                            The mm scene that Vasil included is in fact set to System/inches and Display/metres, as is the 'inches_by_pi' scene, so there's no mm one to check/compare.
                            Sorry about that, I've re-uploaded the attachment with fixed millimeters scene.

                            Originally posted by fixeighted View Post
                            After merging each, then setting the camera to the same mm parameters each time, the results are indeed basically the same, bar some shading differences.
                            It seems that your millimeters scene is a bit darker. Could this be due to light scaling/position differences?

                            Originally posted by fixeighted View Post
                            Setting it to kms, out of interest, broke the camera....
                            It seems that it is the light that stops working at this scale. At least in my test - it renders black but the Alpha is still correct. Putting larger light in the scene resulted in similar result as in the millimeters scene (same DOF but different intensity).
                            I did not investigate why the light stops working, but I guess that it is because light size becomes 0.001, resulting in light surface of 0.000001 and this breaks some internal calculations.
                            V-Ray for 3ds Max developer

                            Comment


                            • #59
                              With the test method I used, I merged the exact same assets into a blank scene, set to whichever units I tested, so everything was consistent.
                              With the km version it was the same procedure...just the camera had that odd behaviour. Easy to test that but let me know and I'll post the scene.
                              The only thing I changed was resetting the camera back to 36/40 in all them.
                              https://www.behance.net/bartgelin

                              Comment


                              • #60
                                So I'm not following anymore. Can someone recap with a simple enough example?

                                I work in centimeters and sometimes in meters, my scenes are set up from the start and I'm not merging cameras from different scene units.

                                For instance: If I need a real life camera with F set to 2.8, and I create this camera in a centimeters scene. Do I need to set the value to 0.28 instead or did I miss the point of this thread entirely? And what about if I work in meters? Is it 0.028 then?
                                A.

                                ---------------------
                                www.digitaltwins.be

                                Comment

                                Working...
                                X