-
-
Notifications
You must be signed in to change notification settings - Fork 246
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
This error will occur when creating bvh using the geometry of a relatively large file. #663
Comments
With over 260 million float elements for both the position and normal buffers you're model is over 2GB in memory - that's just about at the memory cap for most desktop browser tabs. There's not a lot this project can do if there's no browser memory left and it crashes on a buffer allocation. Depending on your use case you can artificially increase the memory cap with command line flags and preprocess the model BVH to save to disk before loading it so it doesn't have to be generated on load. |
Hello, how to preprocess the model BVH? |
There's no prebuilt tool for this so you'll have to implement the file storage and loading yourself. But the basic process would be:
|
When using Serialization and Deserialization, an error will be reported when intersectsGeometry, indirect is true This is a demo |
Thanks for the easy repro. Just fixed the issue in #664 - it'll be available in the next release. |
Describe the bug
I have a large stl file, more than 1GB in total, and when using computeBoundsTree, I get this error
Here is the line of code in bvh that prompts the error
Can load files without using bvh. This is the file information.
The text was updated successfully, but these errors were encountered: