Home Marmoset

Slow at loading models...?

DustyShinigami
polycounter lvl 4
Offline / Send Message
Pinned
DustyShinigami polycounter lvl 4

Hi

Just a quick question: is it perfectly normal that Marmoset Toolbag takes ages to load up the models for baking? It takes quite a while for me with a high poly, even one that's around 400MB. It's never a problem when adding meshes in Substance Painter, but even a low poly, that's just a couple of megabytes, can take roughly the same length of time. o_O

EDIT: I should clarify, this is when setting up a Bake Project, and loading up the meshes via the Quick Load.

Thanks

Replies

  • DustyShinigami
    Options
    Offline / Send Message
    DustyShinigami polycounter lvl 4

    Anyone…? Is it meant to be like this? Are there some settings that can be adjusted that can speed the import process…? I can’t find zip when doing a Google search.

    I’ve been sitting here for the past several minutes waiting for my high poly to load in and it still hasn’t. And this is via the ‘Quick Loader’, which is ironic.

    I love Marmoset’s manual fine tuning and tools, but Jesus do I find it slow compared to Substance Painter! :( Fair enough, my high mesh is currently under 2GB, with all the SubTools/parts and Polypaint with it, but even Max and Painter are quicker than this at loading it in!

    It doesn’t automatically try to triangulate the meshes when they’re imported, does it…? That would certainly explain why it takes forever.

    I’ve also noticed, that if I load the low poly first, it comes in fairly quickly. However, if I import it after the high, it takes ages to load in too. o_O

  • EarthQuake
    Options
    Offline / Send Message

    For a mesh file that is 2GB, yes, you should expect a delay when loading. How long will depend somewhat on the specs of your computer - what sort of disk it is loading from, how faster your GPU is, etc. Can you tell me what the specs of your computer are and roughly how long it takes to load the mesh file?

    Generally a low poly mesh file should load instantly. But if you're loading a low poly mesh and a dense high poly mesh at the same time, you can expect a delay until both meshes are loaded into the scene. With very dense meshes you may run into performance or stability issues too, especially if the mesh does not fit into video memory. Keep an eye on the VRAM counter in the bottom right corner after the mesh has been loaded.

    If you're seeing a delay when loading simple low poly meshes after loading a high poly mesh, that may be a bug. In that case, please email support@marmoset.co with a description of the problem, the version of Toolbag you're using, your hardware specs, and the .tbscene file as well as the high and low poly meshes.

  • DustyShinigami
    Options
    Offline / Send Message
    DustyShinigami polycounter lvl 4

    Hi. Thanks for the response. For my standard high poly, which is around 500MB, it takes a few minutes to load in. I timed it and it takes around 2:30. And the VRAM percentage sits at a comfortable 20-30%. My other HP though, which has polypaint information, is under 2GB, and yeah - it takes triple the time, I imagine. On average, the percentage sits around 50-60%, but I have seen it go as high as 90+. The whole program can become quite unresponsive. Even when trying to rotate around the low poly or select various menus. I have noticed another bug too. The Quick Load function doesn't appear to be working right for me. I re-exported my standard HP out of Max today, which has a few new material IDs, and despite the directory path for that HP being the same and correct, it still took 2:30 minutes, and the changes weren't there. I think it re-loaded my polypaint version, which isn't in the same directory.

    What I'll do, is remove the high poly from the scene, as it's currently 2GB, and hopefully I can send that to that email address, along with my LP and HP. The HP will have to be loaded in manually. As to my spec - I'm running the program, and the files are being loaded, from an SSD. Sometimes I'll load my project files from OneDrive, which is on a standard HDD, but it's mostly via my SSD. I have an MSI GTX 1080, 24GB RAM, and an i7 4790K on Windows 10.

  • EarthQuake
    Options
    Offline / Send Message

    Thank you for the information. 2:30 for a 500mb mesh is somewhat slow but not completely unexpected. Of course, with a 2GB file the load time will be longer still. I would be curious to time these files myself but there probably isn't anything out of the ordinary happening.


    When a mesh file is loaded into Toolbag, there are various systems that run to process the mesh and get it ready for rendering and baking. So there is an initial load cost that you're going to see whenever loading or reloading a mesh. This processing step generally enables Toolbag to be fast and responsive when baking and rendering. By contrast, Xnormal and some other applications like Substance Painter/Designer (I believe) only load and process the high poly mesh data when you bake. This means the loading cost is hit every time you change your settings and rebake. So the trade off is an initial delay vs a delay every time you bake.


    To go a little deeper, here are some things that happen when you import a mesh file:

    1. The tangent space is generated

    2. Mesh normals are generated if they do not exist in the file

    3. Animation data is processed


    Before you bake for the first time, the ray tracing engine needs to calculate a ray acceleration structure. This optimizes the tracing of rays and enables fast AO baking. This only happens the first time you bake in a session, or when you update or reload the meshes.

    ---

    Some tangent spaces are slower than others. For instance, the Mikk tangent space can be noticeably slower than the Marmoset tangent space. However, most 3D applications and game engines use Mikk tangents these days, so it's usually a good choice and is on by default. But you can change the default tangent space in Edit -> Preferences. One thing you could try is set the default tangent space to Marmoset, and then for the individual low poly mesh(es), set those to Mikk, which will give you industry compatible bakes but should speed up load times for very dense high poly meshes.


    Making sure animations are disabled from the export settings in your 3D application is a good idea. There are some extra processing steps if a file is flagged as animated - even if you don't have any meshes with keyframe data in the file - which could slow down load times.


    Disabling UV and vertex color (polypaint) data when you do not need it for the high poly can make the file significantly smaller and should improve load times. If the mesh is tens or hundreds of millions of triangles, decimating it before exporting will help too.


    Lastly to your comment - "I re-exported my standard HP out of Max today, which has a few new material IDs, and despite the directory path for that HP being the same and correct, it still took 2:30 minutes, and the changes weren't there. I think it re-loaded my polypaint version, which isn't in the same directory."


    If you can reproduce this we can look into it further. However, I would triple check that you've saved the latest version of the mesh over the correct mesh file. Generally speaking, Toolbag doesn't store old file paths or look in other directories to find the file. One thing you can do if you're unsure is close Toolbag, launch it again, and import the mesh in question into the a blank scene (via import model, not the baker/quick loader), and check to see if it comes in as you expect. If you don't see the changes you expect in a fresh scene, there was likely a problem in your export workflow.

  • DustyShinigami
    Options
    Offline / Send Message
    DustyShinigami polycounter lvl 4

    Thanks for the informative response. It's quite interesting to learn how things work behind the scenes. :) I'm not too fussed about changing the Tangent Space. I'm aware Mikk is the industry standard, so I'm okay with leaving it at that. I'm guessing Substance Painter uses the same? I'm not sure if I've disabled ray-tracing...? I might have to re-enable it if it helps speed up AO bakes. I don't tend to have any animations before baking, but I'll be sure to check those options are definitely disabled. I always work on animation/posing once the texturing is all done. :) My other high poly does have polypaint, which is why it takes forever to load up. But when you say to disable the UVs for it, how do you do that exactly? I don't recall seeing any options when exporting out of Max or Maya. I don't tend to like decimating a high poly for baking though. I do it for retopology, but I find that decimated high polys bake all the faceting and dings/dents.

    I think the Quick Load issue was a false alarm. The extra materials I added to the high poly weren't named correctly. After changing them, it loaded in correctly. :) Good tip though if a mesh doesn't look to be loading in correctly.

    I've still yet to forward the email to support. It's taking ages to upload the files to DropBox due to the high poly.

  • EarthQuake
    Options
    Offline / Send Message

    No problem, I'm glad that was helpful.

    Yes, I believe Substance uses Mikk, as well as Unreal and Unity, so it's a good idea to stick with it if the load times aren't a big problem for you. Generally, what you want to do to make sure your bakes work well in Toolbag, Substance, and Unreal/Unity is to make sure Mikk is set when you're baking, and triangulate the low poly mesh before baking and before exporting to engine. Otherwise the triangulation can vary between apps which can cause shading errors (all 3D apps triangulate behind the scenes as it's necessary for the GPU to draw the polygons, and the edge direction of quads and n-gons can vary randomly).

    Ray tracing is used for both rendering and baking. I would recommend having ray tracing off when you're set up your bakes, as it can be a little disruptive. However, ray tracing is always used for the baking step and can't be disabled.

    Yeah, for animations, just be sure that anything related to animations is off in the export settings.

    For UVs, this might vary by application. If you have an export-level setting to disable them, try that. Otherwise you can delete the UVs on the mesh(es) directly. It's been a while since I've used Max or Maya, but in Modo, you can do this by deleting the UV vertex map.

  • DustyShinigami
    Options
    Offline / Send Message
    DustyShinigami polycounter lvl 4

    Looks like I'm unable to delete UVs in Max even using a UVW Unwrap Clear modifier. And Maya doesn't show any UVs at all. I've sent the email across anyway with all the files linked via DropBox. :)

Sign In or Register to comment.