I'm trying to show a 3D model of a satellite in cesium (similar to http://cesiumjs.org/Cygnus/) I've been trying to add gltf models to my CZML by adding the following to my czml packet, but haven't gotten it to work.
"model":{
"uri":{
"gltf":"http://url-to-my-models/model.json"
},
"scale":1.0,
"show":true
}
Is this a supported feature in b27? If so, is there a simple CZML gltf example?
Yes, it is. Try the following, should work:
{
‘id’: ‘myModel’,
‘model’ : {
‘gltf’ : “http://url-to-my-models/model.json”,
‘scale’ : 1.0,
‘show’ : true
},
‘point’: {
‘color’: {
‘rgba’: [255, 0, 0, 255]
},
‘outlineWidth’: 2.0,
‘pixelSize’: 3.0,
‘show’: true
},
‘position’: {
‘cartographicDegrees’: [longitude, latitude, height],
‘interpolationAlgorithm’: ‘LINEAR’,
‘interpolationDegree’: 1
}
};
Thanks! That worked great. I’m having some issues with the textures all coming back black. I’m assuming I just didn’t convert correctly.
It looks like you went through a similar issue a couple months ago: https://groups.google.com/forum/#!searchin/cesium-dev/gltf$20texture/cesium-dev/soK05NfUuM8/WVm1VdT80pwJ
I’ll go through the steps outlined in that thread and post back.
Thank you,
Tom