Hi,
I have seen this discussed a number of places and tried everything but I am still not having success. This is what I have done
- Down loaded Cesium-1.31 from http://cesiumjs.org/downloads.html and it works great.
- Downloaded a model https://3dwarehouse.sketchup.com/model/2ac1d07d86aa7fdc45e81db730974dc/Sydney-Opera-House
- Opened in Sketchup and exported as COLLADA file, which is attached in Sydney_Opera_House_DAE.zip
- I downloaded collada2gltf.exe from https://github.com/AnalyticalGraphicsInc/collada2gltf-web-service/blob/master/collada2gltf/win32/collada2gltf.exe
- I ran collada2gltf.exe -f Sydney_Opera_House.dae which created my model which is attached as Model.zip.
- I created a Model directory where I have CesiumJS installed and placed my model there.
- In Sandcastle I tried the following
var viewer = new Cesium.Viewer(‘cesiumContainer’);
var origin = Cesium.Cartesian3.fromDegrees(151.21499, -33.85667, 0);
var modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(origin);
var entity = viewer.entities.add({
position : origin,
model : {
modelMatrix: modelMatrix,
uri : ‘/Cesium-1.31/Model/Sydney_Opera_House.gltf’,
}
});
var heading = Cesium.Math.toRadians(90);
var pitch = Cesium.Math.toRadians(-30);
viewer.zoomTo(entity, new Cesium.HeadingPitchRange(heading, pitch));
But the model is always rendered upside down as shown in UpsidedownModel.PNG.
I have tried not setting the modelMatrix, and have tried all the Cesium.Transforms options but nothing corrects the models orientation.
Any points on what I am doing wrong?
Regards
Marco
Model.zip (294 KB)
Sydney_Opera_House_DAE.zip (374 KB)