Home Technical Talk

A decidedly annoying problem with Containers

ElleKitty
polycounter lvl 3
Offline / Send Message
ElleKitty polycounter lvl 3
Hello! This time I have issues with max containers.

After fiddling with them a bit and figuring out their logic, I've found that Containers can do what I want of them, and much better than either Groups or Xrefs can. However my scene performance has suffered IMMENSELY.
1. Whenever Max saves or autosaves, the save seems to look fine for a moment, but Max has actually frozen for about 15 seconds.
2. Whenever I decide to render, I get a slightly higher Translation Time which is understandable cause models need to be retrieved into memory from an external file, so it goes up from about 0 or 1 seconds to about 4. Fine enough, it needs to draw from both scenes.
3. But then, whenever ANY render finishes, I get the same 15 seconds lag as when I save my scene, during which Max is unresponsive. A 5-second render now takes 20, a 20 second render now takes 35.
4. When I first open my scene, I get the very same 15 second lag.
4. If the scene was saved with a maximized viewport, when I switch back to 4-viewport view, I get the very same 15 second lag the first time I do so. Afterwards I can switch viewports at will.

This lag is consistent in all cases and does not happen at random, it happens everytime. The scene does not otherwise end up corrupted. If I delete all containers, these 15 second lags disappear in all the above cases.

I'm running Max 2015 with sp1, apparently there's sp2 but I couldnt be bothered because the Readme simply states no changes which regard containers. This lag takes one of my CPU cores to the max until it finishes. These scenes are not complicated or compex in any way, and I get this issue even in fresh scenes (one box-room, one light, and a container with some basic objects).

I badly need the containers as a form of scene-management, as doing everything in the master-scene becomes too cluttered, too fast, and layers can only take me so far.
I've looked online, but my Google-fu is not strong enough this time around. What do?

Replies

  • Eric Chadwick
    Options
    Offline / Send Message
    I've heard anecdotally many studios have ditched Xref/Containers and built their own systems. Just because the built-ins are so buggy.

    We created our own Xref system, at one studio I used to work for, because we used Max as our game level editor. We used dummies or simple proxy meshes which when exported would be replaced with the real files, in the combined scene.

    If you're rendering in Max, and you're using V-Ray, I've heard great things about V-Ray's proxy system.

    You could also use a good Layer management setup, for easily hiding/unhiding large items.

    State Sets work really well too, and automate the unhiding of things for rendering only, restoring you back to your favorite scene state.
  • Mark Dygert
    Options
    Offline / Send Message
    Containers are better than xref's but that isn't saying much...

    Your problem might be a pathing issue. You might have some invalid paths that have to be resolved and it takes a bit for them to timeout and carry on. This seems to happen a lot to me when I take a file home and the file has network paths.

    File > References > Asset Tracking, will let you see the paths in your scene and retarget large swaths of them to friendlier paths. So check your paths and see if it speeds up anything.

    Next up you might want to try merging it into a new scene.
    Collapse stacks to eliminate long histories. Long stacks can also include old links to materials that you aren't using.
    Also check out the materials that your scene is using. It can be easy to get some duplicate materials that are identical but bloating the library for that scene. Apply one material to those objects can speed things back up too.
  • monster
    Options
    Offline / Send Message
    monster polycounter
    If I delete all containers, these 15 second lags disappear in all the above cases.

    (You probably tested this, but you didn't say that you did.) If everything is merged in the scene is there a lag? It'll of course be faster if you remove everything.

    Are the container files (or any other files) on a network drive? I've had performance issues doing that.

    Are you working on a team? Is it slow for everybody?

    Your signature states you are using Intel HD4000 graphics. I think viewport maximizing speed could stem from a slow video card.
  • ElleKitty
    Options
    Offline / Send Message
    ElleKitty polycounter lvl 3
    Thank you for advices you three, I finally got to test some things today!

    @Eric: I dont use Vray so I dont have access to Vray proxies, but I use MentalRay, so I get to use MR proxies instead. Apparently they are rather good, but with some little caveats (for example the proxy models come from an external file, but the material does not carry). Layer management is something that I already use, however State Sets are something that went under my radar as they apparently were introduced in Max 2014 which I have skipped. I will look at them, but at a glance this will take some practice and brute brain-crunching to figure out.

    @Mark: After reading the replies, the first thing I did was to check my paths and they all checked out. The more I think about it, the more I agree that something somewhere is timing out, and not very gracefully at that. As for merging into a new scene, it didnt really help. If I plop a container into a barebones starter scene, the slowdowns happen. If I then delete the container, the performance is restored. The bug is not in anything obvious, because the model renders fine, and with all the proper textures, and in the render it's indistinguishable from the local items; there's just something that happens when Max does some sort of a check on the containers (on load, on save, after render), and those containers do not respond as expected.

    @monster: I didnt test the performance if these models were merged, but I'm rather positive that the models themselves are not the issue. They were simple meshes, collapsed, manifold, quads and tris, polycounts 200-1000, textures no higher than 1024. The existing local objects are already a lot heavier. Currently I am on HD4000 which is indeed subpar (if fairly modern), most of my viewport slowdown is due to realistic viewport shading and multiple lights; occasionally I will drop to default lights using CTRL+L for a quick and large boost in fps, so there's that. The container files themselves are in the same folder as the root files, and while I dont have an SSD, these files were at least defragmented (i tried that too, couldnt hurt anyway). Maybe containers simply reload from disk on certain cues, but it still would not make sense that a little container'd object takes 15 seconds to load, while a relatively massive scene sitting next to it, takes 2-3. Something else is amiss here.

    For now I have tackled my issue by dusting off my xNormal and grabbing the details into low-poly models, then merging the lowpolies and instancing them wherever I happen to need them. Since these models wont go into a videogame and I'm just rendering, I'm using heightmaps instead of nmaps (even though i just render both in one go) because I enjoy the amount of detail that MR can can tesselate into a simple lowpoly mesh using Height Map Displacement. So far I havent had major issues with this technique; if I come close then there's some translation time but there's also near-original amount of detail, and if I zoom out, there's less or no translation time because I've set my mesh to tesselate down to no smaller than 0.5 pixels in the render settings. Oh, and Quadrify Mesh can always be used to even-out the detail if it's very uneven across the lowpoly, after which I set "Enabled in Renders Only" so that I dont see the extra geo in the viewport all the time. Okay I'm rambling now.

    Things worth trying...

    Checking out MR proxies, although will be are more useful for models that need to be repeated 2000 times instead of, like, 20.

    Going to every viewport and pressing F3 for shaded mode, and then switching the lighting to default with CTRL+L. Those viewports are wireframed the majority of the time, but perhaps Max still does extra calculations behind the scene to keep them switch-ready. I've already done this and will slowly see whether it does anything.

    Looking into State Sets and figuring them out. I dont know if they can replace Xreffing for me, but I'm sure that I will find some excellent uses for them.

    Waiting and hoping that Autodesk irons the glitches out.

    Thanks again, you and some other guys are everywhere and your generosity has saved many hides to day!
Sign In or Register to comment.