Search code examples
cesiumjs3d-modelgltf

gltf model lost its lighting and is dark


I have converted a dae file to gltf file, using the Collada converter on the website (I am using Linux, so I couldn't find debugging instruction before and after conversion). When I load the model into the cesium it was too dark. Then I edit the shaders of gltf file and remove 'defuse.xyz=defuseLight' and it looks a little bit better, but it is still dark. I attached pictures of the model in its original format and in cesium(after editing). Can any one help me to see what is the problem?The model as I expected to see The model on Cesium


Solution

  • I don't think glTF lights are implemented yet in Cesium. Instead, in Blender, try selecting your model's nodes, but keeping light & camera nodes de-selected. Run the COLLADA exporter, and put the checkmark to only export the selection, not the whole scene. Convert this COLLADA to glTF, and it should not have any lights in it, so it will get Cesium's default lighting.