Getting the height of terrain for cesium omniverse

Hi,

I’ve seen some discussion about this but it looks to be fairly dated and was curious if there’s an update. I’m trying to programmatically place objects on my cesium 3D tile terrain. I have lat/lon coordinates and need to identify the correct vertical location to place them so that they sit on the terrain.

I understand that physics support is pending, which I think means we cannot raycast against the terrain to identify height. My own attempts haven’t managed to return a hit on a raycast so I assume that means they don’t have collision, although I’m new to the omniverse ecosystem. Physics support · Issue #153 · CesiumGS/cesium-omniverse · GitHub

I understand that height is tricky due to ellipsoid related considerations vs. sea-level height definitions which I don’t fully follow.

However, ultimately it feels like since the terrain height is theoretically constant there should be a means to look up the height corresponding to a given coordinate without needing to do an in-engine query about the state of objects. Am I mistaken? How can I best identify the height to place objects programmatically for a large number of objects?

Hey @dchu58, sorry for the delayed response. I just opened an issue for this on github: Add support for height queries · Issue #765 · CesiumGS/cesium-omniverse · GitHub.

I am currently having the same problem with raycasting to get heights in omniverse for a 2d trajectory projection. I’m assuming this hasn’t been fixed yet due to the Github issue still not being resolved. Are there any workarounds to get the height of terrain in omniverse?

Hi @loganchu, this issue hasn’t been fixed yet.

One potential workaround is to use omni.kit.raycast.query for RTX-based raycasting, though I personally haven’t tried this method. It would require the globe tiles to be visible on screen.

Thanks @sean_lilley. I tried omni.kit.raycast.query and although it takes sometime for the cesium tiles to stream to the RTX BVH, the raycasts worked!