Hi Sean
Thank you for your response. There are a couple things I still don't understand:
1. So far I've been calculating the RTC center coordinates with this code:
`Cesium.Cartesian3.fromDegrees(-4.8729014790370195, 36.509302568426179, 0.0)`
¿Is that correct?
------
------
2. The model has a min Z coordinate of -3 (¿meters?) but if I turn on the
`viewer.scene.globe.depthTestAgainstTerrain = true` option I need to change the RTC Center to `Cesium.Cartesian3.fromDegrees(-4.8729014790370195, 36.509302568426179, 100.0)` to make it be visible. ¿If a model is partially under the ellipsoid will it still be shown when `depthTestAgainstTerran = true?. I've already checked I'm using the default EllipsoidTerrainProvider.
3. Also, my model, which represents a building encoded as a Z-UP mesh appears tilted in cesium when encoded as b3dm on 3dtiles but is not tilted if I add manually the corresponding gltf to a specific LLA coordinate with:
```javascript
// Exton, PA
var modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(
Cesium.Cartesian3.fromDegrees(-75.62898254394531, 40.02804946899414, 0.0));
var url = 'mar.gltf';
var model = scene.primitives.add(Cesium.Model.fromGltf({
url: url,
modelMatrix: modelMatrix,
scale: 1.0
}));
```
This is the b3dm in a tileset with RTC = Cesium.Cartesian3.fromDegrees(-4.8729014790370195, 36.509302568426179, 100.0):
The same model, turned into a gltf and loaded to a static location. As you can see it is not rotated.
I cannot find any transformation matrix in the b3dm or tileset that explains the rotation of the model. ¿Why is it rotated? ¿Am I missing anything?
Thanks in advance!
Álvaro
Please see attached files:
* mar.b3dm → b3dm model file
* tileset_mar.gltf → tileset
* mar.gltf → equivalent gltf file. In fact it is the same b3dm file minus the b3dm header and where the RTC extension data has been substituted with spaces using a hex editor.