Height Reference above Terrain for Long objects

261 views
Skip to first unread message

shiv...@gmail.com

unread,
May 8, 2017, 4:44:22 PM5/8/17
to cesium-dev
Hi,
We have a long 3D object (Say a water hose of 100 FT) which needs to be displayed on Terrain loaded with a reference height above the terrain. Currently I'm loading the entity as below,

var cesiumTerrainProviderMeshes = new Cesium.CesiumTerrainProvider({
url: 'https://assets.agi.com/stk-terrain/world',
requestWaterMask: true,
requestVertexNormals: true
});
viewer.terrainProvider = cesiumTerrainProviderMeshes;

var entity = viewer.entities.add({
name : url,
position : position,
orientation : orientation,
model : {
uri : url,
heightReference: Cesium.HeightReference.RELATIVE_TO_GROUND,
minimumPixelSize : 0,
maximumScale : 100,
scale: 1.79
}
});
viewer.trackedEntity = entity;

Problem here is on a FLAT land everything is working fine but as terrain loaded and if the region of interest is loaded with slopes One end of hose is above ground and other end of hose is falling on the terrain.

Here is an example, I need to display hose 10m above the ground and region of interest has a slope field with change is the altitude of 8m from start to end. When the 3D model is loaded, starting edge of Hose is 10m above the ground where as end of the model is just 2m of the ground, where I need to display the model with orientation of 10m all the way.

Please help in achieving this. Any help would be greatly appreciated!!!

Thanks,
Shiva Kumar.

Sean Lilley

unread,
May 8, 2017, 6:46:08 PM5/8/17
to cesium-dev, shiv...@gmail.com
As of now 3D models do not conform to terrain, only their origin is clamped to terrain. This is a pretty challenging problem that we just haven't gotten to yet.
Message has been deleted

shiva kumar

unread,
Mar 30, 2018, 7:56:36 PM3/30/18
to Sean Lilley, cesium-dev
Hello everyone,
This is a long pending implementation from Cesium and I'm still looking for answers. is there any way to accomplish this?


Thanks,
Shiva Kumar.

Sean Lilley

unread,
Apr 2, 2018, 8:02:58 PM4/2/18
to cesium-dev
Sorry, no update on this yet.

shiv...@gmail.com

unread,
Apr 6, 2018, 10:33:06 AM4/6/18
to cesium-dev
Hi Sean,
do we have this in pipeline?

Thanks,
Shiva Kumar.

Sean Lilley

unread,
Apr 9, 2018, 9:42:41 PM4/9/18
to cesium-dev
At the moment it's not high priority.

For the Cesium team it was easier for us to get around this problem on the data generation side by extruding the floor vertices, or adding "skirts". Maybe we will have a runtime version of this in the future, but I don't know when that would be.

shiv...@gmail.com

unread,
Apr 10, 2018, 8:57:19 AM4/10/18
to cesium-dev
Thanks Sean. Will be watching out this space.

Thanks,
Shiva Kumar.
Message has been deleted

shiv...@gmail.com

unread,
Dec 4, 2018, 5:25:05 PM12/4/18
to cesium-dev
Hi there,
I did see lots of new features being developed in cesium and with the latest version of 1.52, I believe the above-said problem can be resolved using examples of "Clamp to 3D Tiles" and "Sample Height from 3D Tiles".
But the question is our application is used to place objects anywhere on the Globe and I assume the examples would work only if we have 3D tileset for the corresponding location.
Would there be any alternative for 3D tileset, can a terrain provider component be used to have these clamping option?

Thanks,
Shiva Kumar.

Omar Shehata

unread,
Dec 5, 2018, 11:38:23 AM12/5/18
to cesium-dev
The answer is yes! You can use the sampleTerrainMostDetailed and the sampleTerrain functions to get the height at any particular point on the globe. 

Let me know if that works for you.
Reply all
Reply to author
Forward
0 new messages