PtWorldPos Precision Bug

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.

Capture_1
Capture_2

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()

Another bug. Enabling depth32BitAov will destroy the depth aov. Seems like 32 to 16 bit overflow?

image

image


import omni
import omni.isaac.core.utils.stage as stage_utils

import omni.replicator.core as rep
import numpy as np
import carb

await stage_utils.create_new_stage_async()

carb.settings.get_settings().set("/rtx/pathtracing/depth32BitAov", True)

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("PtZDepth", device="cpu")
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.


import omni
import omni.isaac.core.utils.stage as stage_utils

import omni.replicator.core as rep
import numpy as np
import carb
from omni.replicator.core.scripts.annotators import AnnotatorRegistry

await stage_utils.create_new_stage_async()

carb.settings.get_settings().set("/rtx/pathtracing/depth32BitAov", True)

AnnotatorRegistry.register_annotator_from_aov("PtZDepth", output_data_type=np.float32, output_channels=4)


distance = 500
cube_scale = 5

pos = (-distance, distance, distance)
camera = rep.create.camera(
    position=(pos[0] + 10, pos[1], pos[2]), rotation=(0, 0, 0), focal_length=20, projection_type="pinhole"
)
sphere = rep.create.sphere(position=pos, scale=cube_scale)
rp = rep.create.render_product(camera, (512, 512))

rep.settings.set_render_pathtraced()

depth_anon= rep.annotators.get("PtZDepth", device="cpu")  # PtZDepth
depth_anon.attach(rp)

await rep.orchestrator.step_async()

depth_data = depth_anon.get_data()

Bumping. Still haven’t found a solution to the first bug.

Still no update on this. Seems like a serious bug.

Can I get some confirmation if this is a bug or if there is some way to fix this?