Announcement

Collapse
No announcement yet.

Small geo causing: error: Failed to allocate - 1678213120 bytes, device 0, buffer

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

  • Small geo causing: error: Failed to allocate - 1678213120 bytes, device 0, buffer

    Hello, I have a piece of geo that is giving me grief - I hope somebody can help me out. I already browsed through the forums and the google, but could not find a solution/tip that seems to apply to my particular issue.

    I uploaded the 3ds Max 2020 scene with the geometry, textures and lights here:
    https://www78.zippyshare.com/v/A9MBgq51/file.html

    When I render the scene in 3k resolution I am seeing this error message and the render stops:

    error: Failed to allocate - 1678213120 bytes, device 0, buffer
    ...
    error: D:\cgrepo\vraysdk\samples\vray_plugins\rt_private\ rt_opencl_pri(1156): CUDA error 1 : one or more parameters passed to the API call is not within an acceptable range of values

    Here the things I found that allowed the render to finish (none of these are acceptable though):

    - render works fine when rendering in 1k
    - keep the displacement input of the material node empty, the render works perfectly
    - disabling the displacement via the V-Ray render settings works
    - rewire the displacement textures in the Material Editor to feed into the Bump Map input instead

    Some observations that might be helpful:

    - the geometry does not have a V-Ray displacement modifier attached.
    - when rendering w/o displacement the Scene Statistics report ~5.2 GB of Memory Used (~8 GB Virtual)
    - turning displacement on and by the time the render fails the Memory Used number spikes at ~32 GB (~57 GB Virtual) (!)

    So it does look like I am running out of memory while rendering the model with displacement. What I don't understand is why?

    - the model has 192 polygons (per 3ds Max)
    - 4k Albedo texture (jpg) 19 MB
    - 4k Normal texture (jpg) 26 MB
    - 4k Roughness texture (jpg) 7 MB
    - 4k Displacement texture (exr) 49 MB

    Software/System:

    3ds Max 2020, V-Ray GPU Next, update 2.1, no plugins
    Windows Server 2016 v10.0.14393 Build 14393
    2 x NVIDIA Tesla T4 GPUs w/ 16 GB GPU memory each (Driver 26.21.14.3102)
    12 core Xeon 2.2 GHz

    Any help, tips, voodoo greatly appreciated!

    Thanks!

  • #2
    Hello! Thank you for your report. Please update your driver to the recommended NVIDIA driver for V-Ray GPU - 436.30 and try rendering again.

    Best,
    Tanya
    Last edited by tanya_to; 04-11-2019, 02:33 AM.
    Tanya Todorova
    QA

    Comment


    • #3
      A thing you've skipped in your Vram calculation is the displacement's generated geometry and the subdivision to sub-triangles prior to displacement, which could take a lot of memory (especially with a huge 4k map). On top of that, in V-Ray GPU, the 'Cache Normals' option is always considered on, which further increases memory utilization (you can read a more detail explanation of why this is so in this post: https://forums.chaosgroup.com/forum/...858#post965858 ). Also, take note that GPUs do not share memory unless physically linked (GPUs must have support for that as well).

      The conclusion is that you would need to optimize your displacement memory usage by increasing the 'Edge length' parameter (Settings>Default displacement or VRayDisplacementMod if in use), which controls the maximum length of a sub-triangle edge after subdivision - larger edge length values produce fewer sub-triangles, which equals less detail, faster rendering and less memory usage and vice versa when using smaller edge length values.
      Aleksandar Hadzhiev | chaos.com
      Chaos Support Representative | contact us

      Comment


      • #4
        Thank you!

        Excellent information! I was able to adjust the edge length parameter using the VRayDisplacementMod modifier - increasing the number to 10ish. This worked like a charm.

        Currently I am keeping a close eye on the Memory Used number in the render window while rendering. If it spikes too high I abort the render and start searching for the offending geometry. Depending on the scenes, this can be time consuming...

        Is there any way/tool/workflow in VRay to have a scene analyzed before rendering? Just to see which geometry might cause problems? Maybe giving the tool a upper memory limit?

        Comment


        • #5
          We currently do not provide such a tool. When using V-Ray GPU, it is a good idea to start the project with its specifications in mind, so that the necessary workflow is approached and executed correctly - this means planning ahead and implementing optimizations for minimal memory usage i.e. optimizing geometry; using proxies; optimizing dynamic geometry such as hair, displacement, and subdivision; cleaning out of camera objects in scenes; etc.
          Aleksandar Hadzhiev | chaos.com
          Chaos Support Representative | contact us

          Comment


          • #6
            Understood. I would still argue that having the software help you to identify problematic items in terms of memory consumption is a valid request to lower setup and iteration time. Also to consider is the fact that sometimes we have to work with 3rd party models where we are not part of the initial design/setup/modeling, etc... that's when such a tool, which would report back problems comes really handy to keep overhead low.

            Comment

            Working...
            X