Some OBJ files cannot be loaded into the scene. I open these files normally with the 3D software. There are some negative values in the file, I am not sure what is going on though. Any ideas??
Here is a playground with the specific OBJ that doesn’t work
How do it set those options? I am importing babylonjs-loaders module, and loading files like in a playground, with the loader plugin defined inside the importMesh method.
Okay, I managed to play with the properties. But nothing helped. Maybe I missed something. This is kinda major issue in the project at the moment. If I don’t find solution for this I will have to go for some server side conversion process, which I would really like to avoid (as models like this are coming from the one of the major platforms that we need to support).
Every model exported from tinkercad.com has same issue. It seems that they are using nurbs modeling technique which sets these negative indices values.
This is what my colleague reported to me
based on the babylonjs.loaders.min.js file it looks like line 1001 of babylonjs.loaders.js is where the error is thrown: “Cannot read property ‘x’ of undefined” … the undefined var is wrappedPositionForBabylon[l]
If you look at the console you’ll see that the OBJLOader is not recognizing the attribute v which is used a log. There is something you need to change at exportation level I guess
Thank you @Deltakosh. You are a lifesaver, as usual. It works now in the playground, but not in my app still.
Do I have to do something to make it work in my app? I forgot to note that I am using latest preview, not 4.1.0 As 4.1.0 is missing one of key features I need.
Hey guys. I still didn’t make this work in the app. So if I install v4.2.0-alpha.27 and use
import ‘babylonjs-loaders’ this should work?
I tried reinstalling packages, upgrading, downgrading. I think cache is not an issue. It feels to me like I am not grabbing the right dependency somehow.
Solved this by manually grabbing that file from the CDN. npm install seems like didn’t grab the right file. Not sure what is going. But I will mark this as solved.