Hi,
I wanted to recreate what viewport.set_camera_target was doing. I created a cube at (0,0,0) and then several cameras using azimuth and elevations. The cameras when not using set_camera_target are NOT centered at the cube. I don’t understand why. The cameras are all correctly placed. Its just that the rendered image is offset from what I would think the center should have been. Is there another camera frame in the camera primitive which actually represents the imaging camera?
UsdGeom.SetStageUpAxis(stage, "Y")
cube = stage.DefinePrim("/World/Cube", "Cube")
camera = stage.DefinePrim("/World/Camera1", "Camera")
xform_api = UsdGeom.Xformable(camera)
xform_api.ClearXformOpOrder()
xform_api.AddRotateZOp().Set(0)
xform_api.AddRotateYOp().Set(az)
xform_api.AddRotateXOp().Set(el)
xform_api.AddTranslateOp().Set(Gf.Vec3f(0.0, 0.0, radius))
viewport.set_active_camera("/World/Camera1")
Also viewport.set_active_camera changes the scale of the camera when I use it within the simple_room USD.
In the images I create 20 cameras looking at a cube. After I cycle through them and set them as active camera and call set_target, may cameras become warped