CesiumGS / obj2gltf

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

I get transfer gltf file , show in Cesium is black, Why? #111

Closed yangxin2017 closed 6 years ago

yangxin2017 commented 6 years ago

entity = viewer.entities.add({ name : 'sig2.gltf', position : position, orientation : orientation, model : { uri : url, minimumPixelSize : 128, maximumScale : 20000, color: Cesium.Color.RED, colorBlendMode: 0 } }); This is my obj file. obj.zip

lilleyse commented 6 years ago

It looks like the problem is the obj doesn't have normals. obj2gltf doesn't generate normals anymore and neither does cesium, so the model appears black. If you are able to export the obj with normals that would fix the problem for now.

We have an issue open in Cesium for this: https://github.com/AnalyticalGraphicsInc/cesium/issues/5838. I'll close this in the meantime.