The PtWorldPos AOV precision drops significantly as it moves away from the origin. Possibly due to it being half float but I’m not entirely sure why. See code and screenshots bellow.
The difference between these two images is only the sphere’s and camera’s placement in the scene. The first is from the origin with the sphere centered. The second the sphere and camera is moved to [-500, 500, 500].
Please take a look and let me know if I am incorrect or if there is a fix for this as it makes this aov unusable.
import omni
import omni.isaac.core.utils.stage as stage_utils
import omni.replicator.core as rep
import numpy as np
await stage_utils.create_new_stage_async()
distance = 500
cube_scale = 5
camera = rep.create.camera(position=(-distance + 10, distance, distance), rotation=(0, 0, 0), focal_length=20, projection_type="pinhole")
sphere = rep.create.sphere(position=(-distance, distance, distance), scale=cube_scale)
rp = rep.create.render_product(camera, (512, 512))
rep.settings.set_render_pathtraced()
world_position = rep.annotators.get("PtWorldPos")
world_position.attach(rp)
await rep.orchestrator.step_async()
ray_world_pos_data = world_position.get_data()
I was able to “fix” the PtZDepth by re-registering it with the annotator registry however I would still classify this as a bug. I am still unable to find a solution to the first question about the PtWorldPos aov.