CesiumGS / obj2gltf

Convert OBJ assets to glTF
Apache License 2.0
1.71k stars 307 forks source link

Model can't be loaded in cesium #76

Closed ysp closed 7 years ago

ysp commented 7 years ago

I use this tool to export gltf models, the model can't be loaded in cesium, I don't know why. Can anyon help? This is my command: node .\bin\obj2gltf.js -i C:\Users\shaoping\Desktop\hangshu\HB_0402.obj -o C:\Users\shaoping\Desktop\hangshu\HB_0402.gltf

Tag 0.1.7 works OK, but it seems not surpport transparent texture.

ysp commented 7 years ago

This is my model files.

lilleyse commented 7 years ago

The model files didn't get uploaded. Can you try changing the extension to .txt or put inside a .zip?

ysp commented 7 years ago

tree.gltf.txt tree.mtl.txt tree.obj.txt

Sorry, I can't upload my texture, You can use any transparent picture to replace it. tree.gltf.txt is the model i exported, I can't see it in cesium whit no error.

lilleyse commented 7 years ago

Thanks for uploading. The model was accidentally made fully transparent, there is a fix here: #77.

Once that's in also make sure to include the --checkTransparency flag, otherwise all textures are considered opaque.

ysp commented 7 years ago

Thank you, The problem is solved.