CesiumGS / obj2gltf

Convert OBJ assets to glTF
Apache License 2.0
1.68k stars 303 forks source link

Model corrupted via obj2gltf #235

Closed lanxinger closed 2 years ago

lanxinger commented 4 years ago

We had some problem with a model conversion (see image below):

Model_errors

When using Blender gltf export we do not see this issue:

Correct

I couldn't reproduce this on other models. Anyone else had a similar issue?

lilleyse commented 4 years ago

@lanxinger can you share the source obj model?

And the glTF exported from Blender if you have it.

lilleyse commented 4 years ago

One thing to check too is if the obj has n-gons. obj2gltf tries to triangulate n-gons correctly but it's not perfect.

Also try enabling back face culling in Blender to see if any of these problems show up in the viewer itself.

Finally check if the glTF exported from Blender uses doubleSided: true in its material or not.

lanxinger commented 4 years ago

@lilleyse thanks for the quick response.

Here is the OJB + textures as well as the GLB's I converted with obj2gltf and out of Blender. Sitting_Couple.zip

lilleyse commented 4 years ago

@lanxinger https://github.com/CesiumGS/obj2gltf/pull/236 fixes the problem

lanxinger commented 4 years ago

@lilleyse thank you!