Siccity / GLTFUtility

Simple GLTF importer for Unity
MIT License
1.01k stars 218 forks source link

Faces missing when importing #58

Open ArcadiaLabs opened 4 years ago

ArcadiaLabs commented 4 years ago

Hi, I made a model in Sketchup and exported it to gltf using the Khronos plugin. When I import the gltf in Unity, some faces are missing, while everything looks good in the Windows 3D viewer (and sketchup, obviously).

I'm not sure if I'm doing something wrong or if there is a bug in the importer.

Edit : seems there is something wrong with the Khronos gltf exporter itself : I opened the gltf directly in Unity without using your GLTFUtility, and I have the same issue. I also redesigned the missing face without success. Now I don't understand why it looks good in the windows 3d viewer...

Here is the gltf file : house_2.zip The missing face is the top floor upper face. It should look like this (screenshot from windows 3d viewer) : house_2 But in unity, the top face is missing : house_2_unity1 while the bottom face looks ok : house_2_unity2

Siccity commented 4 years ago

Does the console log say anything when importing?

ArcadiaLabs commented 4 years ago

No, there is no error in the console when importing. I also imported the gltf to online gltf viewers, and they look ok.

luizcarlosfx commented 4 years ago

I think your importer may not be importing correctly the double sided option, from what I see your doubleSided property on GltfMaterial is never used. The correct use is setting the Culling property in the material according to this property

Siccity commented 4 years ago

Nice find! Yes that could very well be it. I will have a look at that asap

subhradeepc commented 3 years ago

Any updates on this ? Getting the same issue as well

Siccity commented 3 years ago

Any updates on this ? Getting the same issue as well

Can you check if maybe the face is there when you look at it from its backside?

Holi0317 commented 2 years ago

Seems that #118 will fix this issue. Didn't go through the whole PR but seems the change did mention doubleSided and culling.

In the meantime I am adding solidify modifier to my blender model before export to gltf as a workaround described here: https://github.com/KhronosGroup/glTF-Blender-IO/issues/154#issuecomment-455747814