Setting 3d position

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

I am trying to move some .dae historical buildings to .gltf , some of which have sub ground level structures. In the initial load, using

position: Cesium.Cartesian3.fromDegrees(x,y,d)

all is well . However, when I mouse about, unless d =0 , the building does not render correctly.

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

I have attached a test example, however here is the link I am testing with

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

I am trying to move some .dae historical buildings from Google Earth Pro to .gltf ,

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

I believe the latest version of Cesium , Windows 10 and Firefox.

TestIt.html (6.08 KB)

Hi Jerrold,

Setting the following line will hide the parts of models that are obscured by the ground.

viewer.scene.globe.depthTestAgainstTerrain = true;


You may want to also enable terrain in your application if correct heights are something you want to incorporate.

Looks like an interesting application, what are you working on?




Thanks, that was what I was missing!

I moved the test site to ** **

which is a bit more “official.”

This work is yet another reset of a Google Earth Plugin -> Google Earth -> Google Earth Pro project, which is yet again getting somewhat iffy. There was an bit of an earlier attempt at a move to Cesium but having now having Urban Terrain available as a context is a big plus.

The Project Site is

Some Google Earth (Pro) sites can be found at

Again Thanks,


Oh yes, I’ve seen some of the Virtual Cities Project. Keep up the cool work!

Hi Gabby,

I have made a bit of progress. The new Project Page Prototype is:

The one hangup I am still dealing with is touring, for example if you go to Riverfront West -> Visit Lucas Place we would like to be circling the church slowly rather than

having the fixed view. I can’t seem to find an example of this sort of behavior.


Hi Jerrold,

We don’t have any built in camera orbits, but you should be able to create one by using the Camera. You could use Camera.setView and adjust the orientation a little each frame.



I did do a bit of a hack like that
but there seem to be threading issues with some browsers.


I think I have a workable fix. Try

** ** Go to ** Riverfront West -> Visit Lucas Place**

and when that loads **Tour

this Site**

What I did was build a javascript layer in prototype.html on top of Cesium, using setInterval() and clearInterval() . This seems to work, even on my iPhone. Hopefully this is generally supported.


Hi Jerrold, Glad you found a fix! That sound workable, setInterval and clearInterval are both function widely supported across browsers.


I am finally at a useful place:

However, there is issue that come up very very occasionally. Scott Joplin Nbhd. is the most model rich site and a good place to show that it is possible to recapture GE plugin t

tours in Cesium, in particular, Walk This Street. :

On any browser I try everything works. However, on my iPad everything still works except this one Site. I see:

Hi Jerrold,

From the error message it looks like a hardware limitation. You can check on the iPad to confirm, I'm also seeing a texture size limit of 4096 x 4096 on a first-generation iPad Pro that we have here in the office. This limit is often much higher on desktop, especially if you have a discrete GPU. You can view statistics across webgl users and over time here:

For now you can get around this by identifying the model that is causing the problem and scaling its textures down to fit within the limit. It might be cool to have Cesium optionally handle this, though - if you want to investigate this, feel free to let us know any insights you have turned up or open a pull request!

If scaling the textures down isn't acceptable, you may also be able to use editing software like Blender to separate the mesh into multiple pieces that use different parts of the texture, then separate those portions of the texture into smaller, separate textures.


I do see some very big models on that site. As you suggest I will play a bit and let you know what happens. The good news for me is that all is well with every Windows Browser.