Odd Error in Loading OBJ

Not sure if this is a bug, or if I am doing something wrong.

http://pryme8.com/pbr-demo/

Unhandled expression at line : babylonjs.loaders.min.js:16

Not really sure what is going on, so I figured I would delete the MTL reference in the OBJ file and bam it works…

Why do we have it make the scene fail compilation if a mtl file is missing when referenced in the OBJ… shouldn’t we just have an console error pop up and move on to parsing the mesh anyways?

pinging @brianzinn as he did improve that recently :slight_smile:

hi, You are not doing anything wrong! That was a bug introduced when the MTL files were put in a promises array, which in turned now calls the onSuccess() callback. Previously the onSuccess() would trigger when the OBJ loaded and the materials would download async (after onSuccess). Not sure when that was bug was introduced, sometime ~3.3. I quite coincidentally found that issue yesterday and have a PR nearly ready, if I can stop working on my regular job for 30 minutes… I am slammed with work. Will get it in for sure next couple of days. cheers.

1 Like

Also, @Deltakosh - for true backwards compatibility with older versions we should have silent failing on as default option, whereas I have it configured off by default (to match current behaviour). I can bring it up in the PR comments, if you want to think about it.

I agree :slight_smile: this is the best option

@Pryme8

Come on Dude, don’t you call your friends anymore? Anyway, a search would have retrieved the answer quickly, but it’s great than @Deltakosh and @brianzinn are always paying attention.

Galen

Yaas, I do my phone has been out of commision for days though… (thank god)

Ill call you when I go to the store and get a new charger today… I have not really been in a rush because being disconnected from the world has been a blessing.

1 Like

Should be fixed with no code changes on next drop (PR 5867).

1 Like