How would you set up an interactive globe in Omniverse like the one in CesiumJS? I’ve got the Cesium extension working with map data being rendered, but you can’t actually zoom out and see a globe. Is there a code sample available?
Hi @slbouknight - you might need to increase the clipping range of the camera. See step 4 in the quickstart guide: Cesium for Omniverse Quickstart – Cesium.
Here’s a code sample:
import omni.usd
from omni.kit.viewport.utility import get_active_viewport
from pxr import Gf, UsdGeom, Sdf
def extend_far_plane():
stage = omni.usd.get_context().get_stage()
viewport = get_active_viewport()
camera_path = viewport.get_active_camera()
camera = UsdGeom.Camera.Get(stage, camera_path)
assert camera.GetPrim().IsValid()
camera.GetClippingRangeAttr().Set(Gf.Vec2f(1.0, 10000000000.0))
We also have an issue for improving camera controls so it’s more like CesiumJS:
Hope that helps!
Thanks Sean! That fixed it
Thanks @slbouknight, that’s great to hear!