3D tileset loaction and orientation

1. A concise explanation of the problem you’re experiencing.

There is possible to change the location and the orientation (heading, pitch and roll) of a 3d tile as 3d tile set (new Cesium.Cesium3DTileset)? This 3d tile is loaded from a local file and already contain location and orientation.

2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

4. The Cesium version you’re using, your operating system and browser.

You can apply additional transformations with a model matrix, like in this example:


I’m curious to hear more about your use case. Are you making adjustments to your tileset visually to get it to look right, or is the position being updated over time with new data or something else?

I already had look at that, this example help us to adjust tile height, not the orientation…

It’s is possible?

I am asking that because sometimes the orientation is not the correct and i am trying to solve that.

quarta-feira, 25 de Março de 2020 às 15:50:26 UTC, Omar Shehata escreveu:

What are you using to create your 3D Tiles? The model matrix lets you control position, orientation, and scale. Although rotating the model with it happens based on its origin (which may be the center of the Earth). Instead you could try to apply your transform to the tileset.root.transform instead.

This is how the Cesium ion geolocator tool is implemented, which lets you visually rotate/move tilesets:


You could upload your 3D Tiles to ion and adjust it that way.

Thanks fr the help, i will try that.

quarta-feira, 25 de Março de 2020 às 17:25:01 UTC, Omar Shehata escreveu:

Model.readyPromise.then(function(Model) {

var boundingSphere = Model.boundingSphere;

viewer.camera.viewBoundingSphere(boundingSphere, new Cesium.HeadingPitchRange(0, -2.0, 0));


center = Model.boundingSphere.center;

var cartographic = Cesium.Cartographic.fromCartesian(boundingSphere.center);

var surface = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 0.0);

var offset = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, heightOffset);

var translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3());

var heading = Cesium.Math.toRadians(10);

var pitch = Cesium.Math.toRadians(10);

var roll = Cesium.Math.toRadians(0);

var hpr = new Cesium.HeadingPitchRoll(heading, pitch, roll);

var result_teste = Cesium.Quaternion.fromHeadingPitchRoll(hpr,result_teste);

var rotacao = Cesium.Quaternion.subtract(result_teste,Cesium.Quaternion.IDENTITY, new Cesium.Quaternion());

var result = Cesium.Matrix4.fromTranslationQuaternionRotationScale(translation,rotacao , new Cesium.Cartesian3(1.0, 1.0, 1.0),result);

Model.modelMatrix =result;


I am trying that but it isn’t working. The model is disappering.

Have any ideia why?

I have the same problem, i am trying to rotate the 3d tileset and it isn’t working. In my case i need to update the rotation over time, so the cesium cloud it isn’t an option. There are some way to do it with cesium js api? I already tried the several function that whe have to do taht, such as :

  • Cesium.Matrix4.fromTranslationQuaternionRotationScale;

  • Cesium.Matrix4.fromTranslationRotationScale.

I search about it and i think this is not possible, when the model doesn’t come from cesium ion.

For example, i even can’t change the scale from the model. When i try to do that the model also fades away. I have a function to redirect the camera to the model, but when i try to implement one of the things discuted upper, the model doesn’t show.

Can you help me with that??

Hi Omar,
I would like to use the Cesium Ion geolocator within CesiumJS. Do you know if the source code could be provided as a component for CesiumJS community ?
My use case is the following : I would like to enable people build a new project using 3D objects from libraries (buildings, trees, equipements) and move, rotate and scale them to adjust the project.

Thanks in advance for your help