CesiumGS / obj2gltf

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

Holes in mesh #251

Open Bketting opened 3 years ago

Bketting commented 3 years ago

Creating glb with obj2gltf results in a mesh with holes (see photo below, in model-viewer).

Obj looks fine in 3D editting software. Two tricks solved the problem:

  1. Setting hard edges before glb creation
  2. Creating glb with online converters

The problem persisted in multiple viewers.

Any thoughts on what is going wrong?

C290E976-42A5-46FF-9569-490175B6E773

entriphy commented 3 years ago

I have the same issue with some models. The face is technically still there, just that it's not facing the right direction. It seems to be a problem in the checkWindingCorrect function. It could also be a problem with incorrect normals in the model itself, since a normal is used in the calculation of checkWindingCorrect.