CLAMP TO GROUN ON 3D TILE

158 views
Skip to first unread message

eru....@gmail.com

unread,
Feb 14, 2020, 1:31:16 PM2/14/20
to cesium-dev

Hello, I have two files in cesium ion, one is a kml file and another is a 3d tile file, what I want is to put them together, but the next thing you see in the image happens, I would like to know how to clamptoGround the KML file on the 3d model, does anyone know how to achieve that or have an idea?



cesium.png

Omar Shehata

unread,
Feb 14, 2020, 1:53:44 PM2/14/20
to cesium-dev
Clamping your entities to ground should be sufficient, here's an example where a line from a CZML is clamped to 3D Tiles:


The only additional thing for KML is that, in addition to the entities in the KML file itself having clampToGround, you must set clampToGround: true when loading it in CesiumJS: https://cesium.com/docs/cesiumjs-ref-doc/KmlDataSource.html?classFilter=KMLDat#.load 

Let me know if this works. 

eru....@gmail.com

unread,
Feb 14, 2020, 2:29:22 PM2/14/20
to cesium-dev
It didn't work, it still looks the same, and I've already added the clampToGround: True


El viernes, 14 de febrero de 2020, 12:53:44 (UTC-6), Omar Shehata escribió:
Clamping your entities to ground should be sufficient, here's an example where a line from a CZML is clamped to 3D Tiles:


The only additional thing for KML is that, in addition to the entities in the KML file itself having clampToGround, you must set clampToGround: true when loading it in CesiumJS: https://cesium.com/docs/cesiumjs-ref-doc/KmlDataSource.html?classFilter=KMLDat#.load 

Let me know if this works. 

Omar Shehata

unread,
Feb 14, 2020, 2:53:17 PM2/14/20
to cesium-dev
Can you share a Sandcastle example I can run showing the issue?

Omar Shehata

unread,
Feb 18, 2020, 4:17:22 PM2/18/20
to cesium-dev
As far as I can tell, the lines in the original KML need to have the right altitude mode set (to clamp to ground). Here's a Sandcastle that will override this setting to always clamp all the lines.

This dataset looks very cool! What kind of project are you working on with Cesium?

eru....@gmail.com

unread,
Mar 20, 2020, 1:52:31 PM3/20/20
to cesium-dev
Hello, a while ago you helped me as some 3D tiles, do you think that now this 3D  Cesium.IonResource.fromAssetId(8403) tile can still be pasted to the floor and put this id clamp to grouound on the 3d model

El martes, 18 de febrero de 2020, 15:17:22 (UTC-6), Omar Shehata escribió:
As far as I can tell, the lines in the original KML need to have the right altitude mode set (to clamp to ground). Here's a Sandcastle that will override this setting to always clamp all the lines.

This dataset looks very cool! What kind of project are you working on with Cesium?

Omar Shehata

unread,
Mar 23, 2020, 10:00:40 PM3/23/20
to cesium-dev
Can you share a Sandcaslte of your asset here?

eru....@gmail.com

unread,
Mar 24, 2020, 5:52:47 PM3/24/20
to cesium-dev

eru....@gmail.com

unread,
Mar 26, 2020, 1:42:19 PM3/26/20
to cesium-dev

Hello, sorry for the inconvenience, I have already put my cesium sandcastle where I put my 3d model to clamp to ground to the ground, but it seems that the Z coordinate does not work


El lunes, 23 de marzo de 2020, 20:00:40 (UTC-6), Omar Shehata escribió:
Can you share a Sandcaslte of your asset here?

Reply all
Reply to author
Forward
0 new messages