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:	211
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:	207
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


            • #7
              I feel also that all the v-ray material previews are quite slow and the viewport become also very slow (specially when we update the materials)
              don't know if this makes sense but the preview in c4d native material is super fast, and for me is really not so important to have a accurate material preview since we can see the changes in IPR or something, so I wonder if we can have in the v-ray materials the preview but in c4d native preview... don't know if I explain very well. Don't even know if this make any sense.... disable the material preview is a workaround but becomes all black so we don't know what it is... :S
              I guess in Max, the material preview is the standard max preview, no? even for v-ray materials?... at least i thing so...
              thanks
              best regards
              nuno

              Comment


              • #8
                Originally posted by nunomatos View Post
                I feel also that all the v-ray material previews are quite slow and the viewport become also very slow (specially when we update the materials)
                don't know if this makes sense but the preview in c4d native material is super fast, and for me is really not so important to have a accurate material preview since we can see the changes in IPR or something, so I wonder if we can have in the v-ray materials the preview but in c4d native preview... don't know if I explain very well. Don't even know if this make any sense.... disable the material preview is a workaround but becomes all black so we don't know what it is... :S
                I guess in Max, the material preview is the standard max preview, no? even for v-ray materials?... at least i thing so...
                thanks
                best regards
                nuno
                I'm curious if you use node materials or standard for native cinema and or VRay?

                Recently I have been trying to use standard layer materials(VRay) whenever possible and it seems to help. This is obviously not a good thing though. I get the impression that node materials in VRay are a real issue. The end of projects are always painful because I will have to restart my scene just so mat preview render will complete, and not just show a black square. I don't seem to have the same issue with Standard materials. I know chaos knows its an issue but I doubt they are stress testing in productions so they are probably unfamiliar with how poor the experience is. It's also frustrating because they will insist on trouble shooting it as if its just an isolated issue(please send you file, make a support ticket etc.). I also suspect most artists don't have to contend with the issue because they aren't dealing with hundreds of textures.

                Comment


                • #9
                  Hi
                  i'm using classical V-ray material system... I found that for now I can not change to node system... need to learn a bit more, but from my tests I didn't notice any diference on material preview update....
                  what I suggest seams to be something that v-ray in max uses, no? using standard max material preview in order to update the v-ray material preview?
                  don't know...
                  best
                  nuno

                  Comment


                  • #10
                    Originally posted by nunomatos View Post
                    Hi
                    i'm using classical V-ray material system... I found that for now I can not change to node system... need to learn a bit more, but from my tests I didn't notice any difference on material preview update....
                    what I suggest seams to be something that v-ray in max uses, no? using standard max material preview in order to update the v-ray material preview?
                    don't know...
                    best
                    nuno
                    I never considered this but it is an interesting idea and it sounds plausible. I honestly am not sure how much the different teams collaborate so I'm not sure if this is something they consider either. I think Chaos had higher hopes for cinema but it seems like its really difficult for them to work out certain issues(we're still waiting on vray7...). I am also coming from Max and I say the the best thing about Max is vray because nothing im max changes. I think its probably easy to do updates bc Autodesk does the absolute minimum. I think Maxon has been trying to improve things but I think the node space and viewport have some issues as well. I'm not a developer so I don't know the ins and outs but the Material preview thing is the Number one issue to me - since I tried vray5 beta, day one.

                    Comment

                    Working...
                    X