I have a stl (200 MB) model file. when i load or import it into sandbox it does not showing basically it trough an error.
please check attached image when i import this file.
Are you able to share the .stl file?
It seems it is too big (āout of memoryā), but maybe we can do something about it.
Hello,
@Evgeni_Popov, I am facing a somewhat similar issue and it made me wonder.
Is there a upper size limit for .stl files or any file format for that matter ?,
Also Is there a difference if we use ASCII stl vs Binary stl.
Any and all help is appreciated.
Thereās no upper size limit for the stl file (or any other type of file) itself, but you are limited by the amount of RAM the browser allocates to the javascript engine.
I think the binary file will be smaller than the ASCII file, so it could be better to use the binary file because the file itself will consume less memory when loaded (but the decoding process will use the same amount of RAM than the ASCII file).
I just had a look at the stl loader source code, and it seems thereās no additional memory allocated than the memory needed to create the vertex buffers, so, if you hit an āout of memoryā error, we probably canāt do much, it means the generated meshes are too bigā¦
Is there any solution for that???
what if? we have higher size file.
If the created meshes are too big to fit in memory, than thereās nothing that can be done, unfortunately.
However, I donāt know if itās what happens in your case, or if there is some other problems when loading the file. If you can provide the .stl file, we will be able to have a deeper look.
Hi @Evgeni_Popov this is the link of 3D model.
can you please review the model whatās wrong with it how we can solve the issue while loading the model.
Thanks for the file!
Hereās a PR that will fix the problem:
Hi @Evgeni_Popov , i checked this sandbox url Babylon.js Sandbox - View glTF, glb, obj and babylon files
Does it will work if i implemented on code???
will cdn work for that?
because if i run this stl file on actual sandbox url it does not working. https://sandbox.babylonjs.com/
Loading the file from both urls does work for me.
Do you still have a out of memory?
Yes, now it is working using in my code as well where iām using cdn.
Thanks @Evgeni_Popov
Hello @Evgeni_Popov , I tried the same. The high file size model is loading on sandbox and my normal HTML Java script code.
But in my case, Iām implementing Babylon with React JS code, getting issue in that. The same browser stuck issue is there for React integration.
Iāve updated the babylon core and loader plugins to latest as -
ā@babylonjs/coreā: ā^6.21.1ā,
ā@babylonjs/loadersā: ā^6.21.1ā
Do I need to do anything else as well?
Please help!
As I answered on Github, the fix has not been released yet, it will be in the next version.
Hello @sebavan , When can we expect the next version for npm to be released?
Can you mention any specific date on this? As itās an important issue to us and we will have to switch from babylon because of this issue if donāt get the update soon. And weāll to plan accordingly.
npm
release has been done yesterday (itās done every thursday morning, EU time), so you should be able to get the package with the fix now.