Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render thread blocking with larger schematics #27

Closed
pokewillpower opened this issue Feb 25, 2022 · 4 comments · Fixed by #70
Closed

Render thread blocking with larger schematics #27

pokewillpower opened this issue Feb 25, 2022 · 4 comments · Fixed by #70

Comments

@pokewillpower
Copy link

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

@LucasDower LucasDower changed the title "Mean Squared Error" and "WEBGL: CONTEXT_LOST" with larger schematics Render thread blocking with larger schematics Feb 25, 2022
@LucasDower
Copy link
Owner

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.

@pokewillpower
Copy link
Author

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.

@LucasDower
Copy link
Owner

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

@LucasDower
Copy link
Owner

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 c58a03e, 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 LucasDower pinned this issue Jul 14, 2022
@LucasDower LucasDower unpinned this issue Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants