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

Osci-Render attempts to load OBJ indefinitely #158

Open
andrewschalk opened this issue Jan 25, 2023 · 1 comment
Open

Osci-Render attempts to load OBJ indefinitely #158

andrewschalk opened this issue Jan 25, 2023 · 1 comment

Comments

@andrewschalk
Copy link

When attempting to load an OBJ, the program often becomes unresponsive and does not load the OBJ even after ~20 minutes. The program will continue to output audio for what was previously on the screen, with stuttering. The program has variable responsiveness, sometimes if I try to move a slider, it will move the slider 30 seconds later or it might update immediately. It seems to get stuck in this semi-responsive state indefinitely.
I have been able to load some OBJs and whether it gets in this stuck state seems to correlate with the complexity of the OBJ. I tried a bunch of different OBJs I had lying around and the simpler ones seemed to load instantly(90 KB), slightly more complex ones take some time (maybe ~20 seconds) to load and cause the program to stutter pretty bad when rendering(800 KB), and more complex ones never load(3.5MB). Perhaps there's some upper range to what osci-render is capable of handling?
I tried this on both a Windows 10 machine and a Windows 11 machine, both fairly powerful(I can attach specs if relevant).
I wanted to upload an OBJ that wouldn't load but apparently Github doesn't support OBJs(?).

@jameshball
Copy link
Owner

jameshball commented Jan 25, 2023

Hi, thanks for raising this issue!

You're exactly right about the link between complexity and load time and, yes, in practice there is an upper bound to how complex an object osci-render can handle. This is because when you load a 3D object it has to solve the Chinese postman algorithm on it, which gets very slow for a large number of vertices/edges in an object.

In reality, I probably could (and should!) optimise it to make object files load faster, but the reason I haven't prioritised this is that the objects that take too long to load will also be too complex to render on an oscilloscope using the limited bandwidth of audio anyway. This means even if you were able to load them, it would probably look terrible as it takes too long to draw, or stutter like you've experienced.

I would recommend opening the object in Blender and using decimate to reduce the complexity of the object and then exporting as an .obj if there's a complex object you'd like to open with osci-render.

Also, since you're on Windows, you can probably enable "Render using GPU" in the View settings which will help osci-render keep up with very complex objects - "Hide hidden edges" goes along nicely with that.

There are various improvements I could make, like automatically reducing the complexity of the object, or giving a warning for large .obj files, so I'll keep this issue open :)

Do let me know if you have any other questions about this!

James

@jameshball jameshball moved this to Backlog in osci-render Jan 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

2 participants