OBJ File displayed correctly in Blender:
and wrong with ThreeJS ( https://discoverthreejs.com/apps/loader/ )
Version of https://discoverthreejs.com/apps/loader/
Yes, your OBJ asset is not rendered correctly by the three.js editor
. However, even Sketchfab and Quicklook 3d (Mac) are unable to properly render the model.
Please export your asset to glTF
instead and use THREE.GLTFLoader
.
My Software has no export for gltf.
You know why it does not work?
You can convert your OBJs with this converter:
https://github.com/AnalyticalGraphicsInc/obj2gltf
You know why it does not work?
No yet. But it's suspicious that so many viewers are not able to load the OBJ file correctly.
The file you provided uses commas in place of decimal places, which I've never seen in an OBJ file before:
v 0,5835005 0,8100001 -1,52
v -0,5834996 0,7817158 -1,531716
v -0,5834996 0,8100001 -1,52
vn 3,139165E-07 -1,748456E-07 1
Changing the commas to periods makes it look more like your image in Meshlab but there are still a few warnings. Maybe the remaining warnings have to do with the exponential number format? I'm not sure if that's valid in OBJ, either.
@gkjohnson
that means commas are incorrect or seldom? if they are incorrect I need to raise an issue at the product exporting them.
@jogibear9988
I would submit an issue to the product you're using -- it doesn't seem like commas are considered valid for numbers in OBJ unless I'm missing something. Here are some related issues that seem to point to applications incorrectly using the current locale settings for numbers serialization resulting in commas in some regions rather than periods for decimals:
https://github.com/keenanwoodall/Deform/issues/17
https://github.com/microsoft/RoomAliveToolkit/issues/23
I've send a issue to them. I'll leave this open until I get an answer. But maybe commas could also be supported even if they are wrong (blender does so.) I've also looked in a specification wich I found, but I didn't find if it's allowed or not...
But maybe commas could also be supported even if they are wrong (blender does so.)
My preference would be to not encourage the proliferation of nonstandard file definitions if it seems to be wrong. It looks like most applications can't open the file as expected with commas so I don't think three.js should, either.
What version of blender are you using?
2.80
It looks like its exporting the obj numbers in localized format. Commas are used in many eu countries for decimals, and decimal points for commas.
OBJ format says nothing about expected localization of number. So technically respecting the locale of the machine when trying to load them might make sense.
This would be harder for a browser though, as the browser locale could be different than the locale of the server hosting the loaded asset.
Given it was invented in the US, US number format is likely the unoffficial standard.
Closing. This needs to be fixed on exporter side.
Blender users should prefer glTF
instead of OBJ
anyway.
I've created an issue on the software author, and they said they will fix, so closing is okay
What I still do not understand, why is it black&white in threeJs?
Please use the forum or stackoverflow for such help requests 馃憤
Most helpful comment
My preference would be to not encourage the proliferation of nonstandard file definitions if it seems to be wrong. It looks like most applications can't open the file as expected with commas so I don't think three.js should, either.
What version of blender are you using?