Orthographic projection fails for default parameters

Hey!

The Clipping Range of a new camera is set to 0.01 → 10000000.0 (aka 0 to infinity), but the orthographic camera (projection: orthographic) can’t deal with these values.
The first image was taken with default values above the warehouse (BTW: it would be nice to also have warehouse versions without a roof), the second one with a Max Clip of 30 (camera is at z=20).

I think the easiest fix would be to change the clipping range (effect already vanishes for max Clip < 10000000 for my setup).


Could you please share your script or asset that reproduces the issue?

Hi there, thank you for reporting the issue a ticket has been created on the matter. As a workaround you can change the clipping planes from code:

    ortho_cam_near_0 = stage.DefinePrim("/Cameras/OrthoCamera_Near_0", "Camera")
    UsdGeom.Xformable(ortho_cam_near_0).AddTranslateOp().Set(camera_loc)
    UsdGeom.Xformable(ortho_cam_near_0).AddRotateXYZOp().Set(camera_rot)
    ortho_cam_near_0.GetAttribute("projection").Set("orthographic")
    ortho_cam_near_0.GetAttribute("horizontalAperture").Set(apperture)
    ortho_cam_near_0.GetAttribute("verticalAperture").Set(apperture)
    _, far = ortho_cam_near_0.GetAttribute("clippingRange").Get()
    ortho_cam_near_0.GetAttribute("clippingRange").Set((0, far))

Here is an example snippet on hiding the ceiling so you do not have to do this manually:

    root_prim = stage.GetPrimAtPath("/Root")
    if not root_prim.IsValid():
        print(f"Could not find root prim at path: {root_prim}")
    for child in root_prim.GetChildren():
        if child.GetName().startswith("SM_CeilingA"):
            child.GetAttribute("visibility").Set("invisible")