ObjToSchematic icon indicating copy to clipboard operation
ObjToSchematic copied to clipboard

Render thread blocking with larger schematics

Open pokewillpower opened this issue 3 years ago • 4 comments

Attempting to render larger voxelizations often causes the program to hang and crash, especially if Ambient Occlusion isn't disabled. image

Sometimes it's just the rendering that crashes and you can still try and apply blocks to the model, but nothing will export past that point so you can't actually get the litematic.

Here's the file I'm attempting to use. Extremely small height sizes can often work but anything sizeable seems to cause the issue. Large Obj Test.zip

pokewillpower avatar Feb 25 '22 00:02 pokewillpower

Once the /refactor branch has been merged, improving the UI responsiveness is my next goal. Currently, the work of the program is performed in the same thread as the UI so when heavy work is performed it blocks the UI from being responsive.

In addition, complicated meshes with thousands of triangles will always be a performance issue, I have plans to add the ability to simplify a mesh to lower the number of triangles in it and hence reducing the time to voxelise the mesh.

LucasDower avatar Feb 25 '22 18:02 LucasDower

It's possible I'm reporting the wrong thing, but mostly the issue with this is that it's not just the rendering that crashes-- it will be attempting to export the schematic but hangs there and never actually spits out the file. I've found that this isn't usually just the case with large objects but rather specific meshes that have weird parts to them.

If it were just the UI then it wouldn't be as much of an issue because I could just reload it.

pokewillpower avatar Feb 26 '22 14:02 pokewillpower

This should be resolved once /worker is finished and merged.

LucasDower avatar Apr 12 '22 17:04 LucasDower

Now all meshes no longer use the old slow RenderBuffer code. On my PC, a mesh of 3 million triangles is loaded in 2.5s since c58a03e70cb6c620b55bbb8947816f75e77f38d6, whereas previously it would crash after 10s. This whole process still runs in the same process and still blocks the render thread which is not ideal but that's what /worker will fix but is a large refactor.

LucasDower avatar Jul 08 '22 23:07 LucasDower