Announcement

Collapse
No announcement yet.

Very Slow material viewport preview management

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

  • Very Slow material viewport preview management

    Hi,

    More and more the team is using the last Cinema 4D 2024 + VRay 6, and more we are figuring out that there is a big problem with material display in viewport / material preview in material manager.

    Little scene runs fine, but big scene with 1500+ materials are horribly slow, there is a 2 or 3 seconds lag for each click each time we select an objet in viewport, or when draging the camera view... It's like Cinema 4D was accessing/checking each texture file on disk, for each material displayed in the current view. This routine is just a process killer and could explain the very laggy viewport with huge scene. And time to time another routine refresh material thumbnail preview, we don't know why... Another ressouce killer

    I'm not sure it's VRay related, but i want to share this problem here, beacause i assume chaos team is best placed to relay this problem directly to the devs from Maxon department.

    Best regards.

  • #2
    Hey f2b, that is unfortunate to hear. But we would need a bit more details to troubleshoot this problem. Can you give us answers on these questions:
    1. Are you using mostly node materials or classic materials?
    2. What is your preview quality in preferences? Is there difference if you lower the quality?
    3. Is disabling material preview solving the problem?
    4. What if objects are hidden from the viewport, like Solo mode? Is it still unresponsive?

    Additionally, you may try to decrease the render resolution of textures. For classic materials this may be done globally by the option in the V-Ray preferences (1) and for node materials, you may change it from each materials' Viewport tab (2) (probably can be done by selecting all node materials):

    Click image for larger version

Name:	image.png
Views:	106
Size:	471.0 KB
ID:	1219849

    A very simple calculation is that by using the Default map sizes (of 256KB per material) you would have almost 400MB of just textures to be stored on the GPU, and if Cinema 4D loads them on each update, it can easily explain such slow downs.

    And last but not least - can you try opening the scene in Cinema 4D 2025 and also opening the new Object profiler dialog - it may show what is troublesome in your viewport rendering. It is easiest to open it from the commander dialog (Shift-C):
    Click image for larger version

Name:	image.png
Views:	106
Size:	11.7 KB
ID:	1219850
    Attached Files
    Deyan Hadzhiev
    Developer
    chaos.com

    Comment


    • #3
      Hi Deyan!

      1. Are you using mostly node materials or classic materials? -> We use mostly classics materials (all props stay with classics)

      2. What is your preview quality in preferences? Is there difference if you lower the quality?-> Quality is 1, Enable Gi off and resolution 256x256

      3. Is disabling material preview solving the problem? -> YES, disabling material preview restore full fluidity in viewport. this tips is ok to move objects, cameras..., but we have to re-enable and re-disable to edit materials, so it's not the ideal solution.

      4. What if objects are hidden from the viewport, like Solo mode? Is it still unresponsive? -> Solo Mode on a simple object do not stop the freeze at each click when selecting/moving objects in scene

      Decreasing preview resolution or not showing materials in viewport (in viewport options menu) do not help either, . In a normal (not freezing) scene, i know it help to gain more FPS, but here the real problem is not fps but freeze.


      I will install R2025 in the next days and try this new object profiler tool. Thanks for this info

      Definitely i think the material manager, do not manage so well

      Comment


      • #4
        Thanks for your answers. We have already started investigating possible ways to achieve better performance with many materials and any information about your setup would be valuable.

        Could you also share what is your texture usage, so we may try to recreate your setup more closely. In particular:
        1. What is the average texture size you are using in materials?
        2. Are most of the materials simple (e.g. a VRayMtl with diffuse/reflection/bump (and other simple) maps) or most of the materials are complex (composed of more than several nested shaders)?

        Some responses regarding my previous questions:

        We use mostly classics materials (all props stay with classics)
        Can you try if converting the materials to node materials improves the viewport performance? The node preview system is newer and asynchronous, so even if it takes time to render all materials, the viewport should remain responsive and usable.

        YES, disabling material preview restore full fluidity in viewport. this tips is ok to move objects, cameras..., but we have to re-enable and re-disable to edit materials, so it's not the ideal solution.
        I think we can improve this, by allowing the previews to not be completely disabled, but rather use a solid color and having an option in the material to switch to its full preview when needed.

        Overall, we will be looking into general improvements in this area, but as stated before, we advise usage of node materials where possible, because the classic material preview system is more limiting and restrictive in what we can achieve.

        Thank you for the answers so far, we will be investing resources on improving the material previews in our next updates.
        Deyan Hadzhiev
        Developer
        chaos.com

        Comment


        • #5
          1. What is the average texture size you are using in materials? -> There are 1380 materials, when i save my scene with all assets, there are 1649 textures for 2.5Go -> average 1.8Mo/tex, (weight of the first 5 heaviest tex: 147Mo, 118Mo, 80Mo, 67Mo, 46Mo, and the last 1200 tex weight are lower than 1Mo...)

          2. Are most of the materials simple? -> Yes 90% VRayMtl (1246 exactly), 69 2-Sided Materials, the last Materials are VRay Node materials and 28 c4d native materials

          I will try again to convert more classics materials to node, but for the moment i did not noticed improvement in the viewport, little freeze always occurs when navigating/interacting in the scene


          Some additional information:​ all the texture paths are absolute, for the purpose of my tests i converted them from network drive, to local drive-> Scene loads little faster but no improvement for viewport fluidity, nor when saving with asset on local M.2 SSD drive (just scene was loading realy realy faster)


          Clearly, disabling preview restore a perfect viewport fluidity, instantly, but this option would be perfect if materials thumbnails could remain (Actually they are refreshing for showing fully black ). Then the material thumbnail would refresh only when editing it in material editor. Actually it feels like there are a lot of non-essentials background calculations.


          Thanks for all the attention to this issue!​

          Kind regards,
          Last edited by f2b; 09-11-2024, 02:59 PM.

          Comment


          • #6
            I wish someone at chaos would put up a sign at the office with this phrase " Very Slow material viewport preview management." Every few weeks someone posts an issue with poor performance due to material manager rendering, or viewport rendering. Every time one of these posts goes up its like the first time support has ever seen the issue. It's a constant problem I have on every project I've ever done in cinema/vray all the way from the beginning of 5 through the current. It would be greatly appreciated if it was acknowledged as being a problem. Imo, the current Vray in cinema holds up poorly when stress tested against big scenes, which has always been its main proposition.

            Comment

            Working...
            X