Announcement

Collapse
No announcement yet.

Displacement and long lenses

Collapse
This topic has been answered.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Displacement and long lenses

    Hi,
    does anyone have problems rendering view-dependent displacement with long lenses? For example I have 600mm camera and my render keeps crashing on RAM overload. With short lense there is no such problem even if it covers vider area with much more displaced objects.
  • Answer selected by vladimir_krastev at 14-03-2023, 09:27 AM.

    Hi frodopytlicek and thank you for bringing this up. It turns out it is a bug.
    I did a test scene according to your explanation and indeed with a long lens camera the memory consumption is significantly higher if we have the same area of our object in the frame.
    The issue is reported under VMAX-13104 in our bug tracking system.

    Comment


    • #2
      Hi, thanks for posting. Are you using V-Ray CPU or V-Ray GPU? What versions of V-Ray and 3ds Max are you using? I tested a simple scene consisting of a sphere with displacement and a camera and a light but couldn't find a fault.
      Could you explain a bit further your workflow? You have a static camera in a scene and you render once with 600mm Focal Length and the other with default (36mm)?
      Vladimir Krastev | chaos.com
      Chaos Support Representative | contact us

      Comment


      • #3
        Latest V-Ray 6.1 and Max 22. You can test it on Phoenix ocean, but its not really related to Phoenix. My guess is that its not subvididing only the visible part of the mesh but whole mesh, and because the long lense we can see model close to camera in really big detail the subdivision level will be too hight to fit whole object in RAM. I hope you understand, try to put some big object wih fine displacement in fron of long lense camera.
        Last edited by frodopytlicek; 13-03-2023, 08:11 AM.

        Comment


        • #4
          Even this simple scene can eat my whole RAM (128GB)
          Click image for larger version

Name:	image.png
Views:	324
Size:	54.4 KB
ID:	1175365​​
          But when I change lense to something less its just fine.
          Click image for larger version

Name:	image.png
Views:	327
Size:	55.9 KB
ID:	1175366

          Comment


          • #5
            Thanks for the clarification, I wasn't rendering it that close to camera. With such closeup shot the memory shoots up 5 times.
            My guess is that its not subvididing only the visible part of the mesh but whole mesh, and because the long lense we can see model close to camera in really big detail the subdivision level will be too hight to fit whole object in RAM
            Please check this document - https://docs.chaos.com/display/VMAX/...ng/Subdivision

            There it says
            View-dependent – Specifies whether Edge length is expressed in pixels or world units. When this option is enabled, the Edge length value determines the maximum length of a subtriangle edge in pixels, and a value of 1.0 means that the longest edge of each subtriangle is about one pixel long when projected on the screen. When this option is disabled, Edge length is the maximum subtriangle edge length in world units.​
            So if the Edge lenght is X pixels when the object is far away that may translate in little subdivision since lets say the whole object takes a few pixels of the image. But when we are close and the object takes the whole frame there will be a lot subdivision going on.
            Vladimir Krastev | chaos.com
            Chaos Support Representative | contact us

            Comment


            • #6
              But this doesnt make sence. Distance from the camera is not changing and with long lense we see less than with wider lense. If this is true we have to change displacement setting per shot which sound ridiculous for me.

              Comment


              • #7
                If you create wide lens camera and go closer to the object to cover rougly same sceen space as with long lense the impact on RAM is nothing comared to long lense. And beace it cover same objects part and rougly same screen space there should not be any difference, but it is. There is definitely some issue in displacement computation with long lenses.

                Comment


                • #8
                  I believe, as you asked above, that it does divide the ENTIRE object based on the size of the object in frame (either large object or long lens, or camera close to the object). So if you are seeing just part of the object the parts you are not seeing are still taking up a lot of memory.

                  Chaos, please correct me if I am wrong, but this is what I have noticed over the years.

                  One solution is to delete parts of you objects outside the field of view, or slice the object and only apply the displacement to the parts that are in the field of view. Never tried but you might even be able to do this dynamically with a VRayClipper, clipping areas of the displaced object to be (nealry) within the view, and clipping another non-displaced object so that areas in view are removed. But I am not sure if Clipper clips before or after displacement. If after then no bueno.

                  Comment


                  • #9
                    Yes the displacement is calculated for the whole object. If you are using VRayDisplacementMod you can animate the Edge length to increase when the camera is very close to the object and try to reduce the memory consumption this way.
                    Vladimir Krastev | chaos.com
                    Chaos Support Representative | contact us

                    Comment


                    • #10
                      Originally posted by vladimir_krastev View Post
                      Yes the displacement is calculated for the whole object. If you are using VRayDisplacementMod you can animate the Edge length to increase when the camera is very close to the object and try to reduce the memory consumption this way.
                      Hmm I would call this a bug, because its not view-dependent then. And how you explain that it works with wide lense camera as i explain in post above?

                      "If you create wide lens camera and go closer to the object to cover rougly same sceen space as with long lense the impact on RAM is nothing compared to long lense. And beace it cover same objects part and rougly same screen space there should not be any difference, but it is. There is definitely some issue in displacement computation with long lenses."

                      Comment


                      • #11
                        1 image is better than 1000 words. Wide camera closer to the object take us few gigs. Long camera take up whole RAM or crashes. Screen coverage is the same, so this is definitely bug. Should I post it as oficial bug report or you can do it?
                        Click image for larger version  Name:	bug2.jpg Views:	0 Size:	327.9 KB ID:	1175508
                        EDIT: Max file in attachment​​
                        Attached Files

                        Comment


                        • #12
                          Hi frodopytlicek and thank you for bringing this up. It turns out it is a bug.
                          I did a test scene according to your explanation and indeed with a long lens camera the memory consumption is significantly higher if we have the same area of our object in the frame.
                          The issue is reported under VMAX-13104 in our bug tracking system.
                          Vladimir Krastev | chaos.com
                          Chaos Support Representative | contact us

                          Comment


                          • #13
                            Originally posted by vladimir_krastev View Post
                            Hi frodopytlicek and thank you for bringing this up. It turns out it is a bug.
                            I did a test scene according to your explanation and indeed with a long lens camera the memory consumption is significantly higher if we have the same area of our object in the frame.
                            The issue is reported under VMAX-13104 in our bug tracking system.
                            Great glad to help. Can this be somehow prioritise? We have project where a lot of long lenses are used and we cannot render because there isnt a workaround. I have access to nighties so let me know when it's available. Thanks
                            Last edited by frodopytlicek; 14-03-2023, 09:48 AM.

                            Comment


                            • #14
                              That is indeed really weird.

                              Did you try disabling Tight Bounds and Cache Normals (cache normals is off by default). I find these two options can slow things down tremendously in some scenes.

                              Comment


                              • #15
                                Interesting.
                                Looking forward to the results of this research. Currently I am having serious trouble with displacement in 3D mode running out of RAM. The lens is fairly long too, so possibly related to this issue here.
                                https://www.behance.net/Oliver_Kossatz

                                Comment

                                Working...
                                X