-
Notifications
You must be signed in to change notification settings - Fork 141
Closed
Description
The current rendering pipeline outputs RGB and depth per pixel, but there is no way to obtain per-pixel object identity. This is essential for many use-cases, e.g., vision-based RL, sim-to-real transfer, etc.
Proposed Solution
Add per-pixel geom ID output to the render megakernel. The renderer already computes geom_id for every ray hit — it just needs an additional output buffer to write it to.
Output format:
int32per pixel>= 0for rigid geom IDs (MuJoCo geom index)-1for background (ray misses all geometry)-2for flex bodies
API additions:
render_segparameter oncreate_render_context()(same pattern asrender_rgb/render_depth)seg_data,seg_adr,render_segfields onRenderContextget_segmentation()utility function to extract per-camera segmentation
This approach has no extra buffers allocated, no kernel writes when disabled and adds negligible overhead when enabled (one int32 write per pixel alongside the existing RGB/depth writes).
PR here: #1236
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels