Technical white paper · physicalai-sim2real-camera

Realistic cameras for Genesis

Genesis renders a perfect pinhole image, instantly. A robot's real camera distorts, adds noise, blurs while the head turns, reads its rows with a rolling shutter and delivers frames late, jittered and sometimes not at all. This paper describes how we put a full sim-to-real camera model on top of Genesis without modifying Genesis, how closely it matches the same model in MuJoCo, how it scales to hundreds of environments, and what it does not cover.

Genesis 1.4.5 (unmodified)MuJoCo 3.14GPU RTX 5080Status 2026-11-20
0.995median silhouette IoU against MuJoCo, G1 head camera, window mode
0.46 pxmedian image-centroid offset against MuJoCo (rasterizer; Madrona 0.12 px)
1.12 msper environment at 256 environments, 13 sub-renders + depth per capture
17 / 17Genesis integration and unit tests passing on the versions above

1The problem

Visuomotor policies trained in simulation see an idealised camera. Genesis cameras return the rendered image only: there is no noise, vignetting, motion blur, rolling shutter or exposure model, and the camera sensor rejects delay and jitter options. A policy that never met these effects in training meets all of them at once on the robot.

physicalai-sim2real-camera is a post-process on the simulator's render that makes the simulated camera behave like a real one: lens distortion, vignetting and depth of field; exposure, auto exposure, shot, read and fixed-pattern noise, Bayer and gamma; motion blur over the exposure window and rolling shutter over the readout; frame rate, latency, jitter and drops; and depth artefacts. Nearly every parameter is a physical quantity that can be fitted from captures of the real camera. The pipeline was first built for MuJoCo. The Genesis backend feeds Genesis renders into the same pipeline, so the same configuration produces the same camera in both simulators.

Overview of the package: the effects it models, the simulators it runs in, and where the parameter values come from
Figure 1. What the package models, where it runs, and where its numbers come from.

2Architecture

The backend is one class, GenesisCamera. It never renders from the user's physics scene. It reads the robot's joint state from the physics scene, keeps a short history of it, and renders in a second, never-stepped copy of the scene (the mirror scene). The rendered sub-frames go into the same accumulation and image pipeline that MuJoCo uses, and the user receives frames through the same CameraStream.

Two decisions shape the design. First, motion blur and rolling shutter need renders at sub-frame times on a 2 ms grid, while a typical Genesis physics step is 5 ms. The backend therefore records (t, qpos) every step and renders at interpolated states, the same way the MuJoCo backend does. Second, rendering happens in a separate scene because writing the joint state back into Genesis' physics scene changes later physics steps, even when the same values are written (section 3).

import genesis as gs
from physicalai_sim2real_camera import CameraConfig, CameraStream
from physicalai_sim2real_camera.genesis_bridge import GenesisCamera

gs.init(backend=gs.gpu)
scene = gs.Scene(sim_options=gs.options.SimOptions(dt=0.005))
robot = scene.add_entity(gs.morphs.MJCF(file=xml))
cfg = CameraConfig.preset("calibrated", 640, 480)
cam = GenesisCamera(xml, "head_cam", cfg, dt=0.005)   # builds its own mirror scene
scene.build()
stream = CameraStream(cam, cfg)
for _ in range(n_steps):
    scene.step()
    frame, capture_t, k = stream.step(types.SimpleNamespace(time=scene.sim.cur_t, qpos=robot.get_qpos()))

3What we built on top of Genesis

Genesis itself is not modified. Everything below lives in the package's Genesis bridge and its examples and checks. Each item exists because of a specific property of Genesis.

ComponentWhy it was neededWhere
Image-pipeline bridgeGenesis cameras return the ideal render only; the camera sensor rejects delay and jitterGenesisCamera → SimCameraBatch(renderer=False)
Render-only mirror sceneRigidSolver.set_qpos changes later physics steps even when it rewrites the current values (a finger joint drifted 0.04 rad after 7 s); restoring warm-start state or skipping forward kinematics did not helpGenesisCamera.mirror
Joint-state ring and interpolationBlur and rolling-shutter sub-frames fall on a 2 ms grid; physics steps are 5 mspush, interp_qpos
Floating-base interpolationQuaternions of free and ball joints must not be interpolated linearly; matches MuJoCo's integration to 4.4e-16quat_starts, slerp
Camera mount resolutionGenesis merges joint-less bodies into their parent link and drops MJCF camerascamera_mount
Depth background correctionA 24-bit depth buffer resolves z near the far plane coarsely, so the background could be classified as a surfacezfar_of
Batched environmentsMany environments, each with its own pose, rendered from one scenen_envs
Camera-following headlightGenesis lights are fixed, so brightness drifts from MuJoCo's headlight as the head turns (figure 4)headlight
Large-scale pathThe rasterizer renders environments one by one and reads them back to the hostMadrona batch renderer, batched accumulation, fused lookup
Calibrated mount pose and randomisationReal robots use a calibrated extrinsic; training randomises it per episodeextrinsics, set_extrinsics
Mount vibrationEach sub-render needs its own mount pose so that vibration shows up as blurmargin camera re-attached per sub-render
Validation suite and examplesAgreement with MuJoCo has to be measured, not assumedWIRobotics ALLEX, Unitree G1, Apptronik Apollo checks

4Agreement with MuJoCo

The same MJCF camera, configuration and seed were run in both simulators, and the outputs were compared on two robots. The G1 check drives a floating base kinematically (forward 0.4 m/s, yaw 2.5 rad/s, 1.8 Hz bob, swinging arms) and feeds both simulators the same joint state every 2 ms; 58 window-mode captures are compared under ambient light only, so the comparison measures geometry and timing rather than shading.

The same G1 head-camera capture in window mode from MuJoCo, the Genesis rasterizer and the Genesis Madrona renderer; the two cubes show the same blur and rolling-shutter skew in all three
Figure 2. One G1 head-camera capture during a fast yaw (t = 1.8 s), window mode with distortion, from the three renderers. Blur and rolling-shutter skew agree; the background colour differs because each renderer clears to its own colour.
Genesis capture rendered as a global shutter at capture time, in window mode, and as a global shutter at the end of the exposure
Figure 3. What window mode adds (Genesis): the same capture as a global-shutter render at the capture time, with motion blur and rolling shutter, and as a global-shutter render at the end of the exposure.
Check (G1 unless noted)MuJoCoGenesis rasterizerGenesis Madrona
Joint-state layout: link positions from the same qposreference3.1e-7 m max3.1e-7 m max
Window-mode silhouette IoU vs MuJoCo, median (min)—0.995 (0.990)0.995 (0.993)
Image-centroid offset vs MuJoCo, median (max)—0.46 px (1.21)0.12 px (0.65)
Window centroid vs global shutter at capture time, median6.95 px7.05 px6.90 px
Frame timing, 42.7 s (ALLEX): frames, gaps, mean age, p99 age1252, 27, 68.4 ms, 84 msidentical—
Depth on object pixels (ALLEX), median (worst frame)reference0.15 mm (2.28 mm)—
Physics trajectory with the window camera on vs off (ALLEX)—0 rad difference—

On ALLEX (60 degrees of freedom, 12 polynomial joint equalities, a 42.7 s recorded motion with ±65° waist and neck turns) the Genesis MJCF loader reproduces the MuJoCo joint trajectory to 0.0012 rad on the waist and neck and 0.013 rad on the arms. Calibrating the camera from rendered checkerboards recovers the focal length to within 0.14 % in both simulators, and the residual lens-field error is 0.33-0.52 px. Genesis output sits about (−0.21, −0.12) px from MuJoCo's, a constant shift that a calibrated principal point absorbs.

Lighting

Genesis and MuJoCo shade differently, and Genesis lights are fixed in the world. With Genesis' default lights the image is 30-46 % darker than MuJoCo's and auto exposure compensates with up to 3.6x gain, which multiplies the noise. A fixed forward light matches one view and fails when the head looks down. The camera-following headlight keeps brightness within 1.1 % of MuJoCo on every segment of the ALLEX motion.

Figure 4. Mean image brightness relative to MuJoCo over four segments of the ALLEX recorded motion (head still; waist and neck turning; looking down at the floor; whole turning part). Hover a point for its value.
Table view
SegmentDefault lightsFixed forwardHeadlight
2-14 s, head still−46.0 %+3.4 %−0.6 %
14-30 s, turning−45.4 %+3.2 %−0.7 %
30-42 s, looking down−30.3 %−27.8 %+1.1 %
14-42 s, all turning−38.5 %−11.0 %+0.1 %

5Scaling to many environments

Profiling the rasterizer path at 16 environments showed where the time went: 74 % in Genesis rendering and host read-back, 14 % in copies, 5 % in the per-environment ingest loop and 0.6 % in the image post-process. The heavy work already ran in CUDA kernels, so the fix was to remove the measured bottlenecks: the Madrona batch renderer renders every environment in one GPU pass and leaves frames on the GPU; a batched accumulation folds each sub-frame into all cameras at once; and an optional compiled lookup fuses the gather. Each step keeps results bit-identical to the single-camera path.

Figure 5. Cost per environment of one window-mode capture (13 sub-renders + depth at 656×494), G1 scene, RTX 5080 not shared with other work. Both axes are logarithmic. The rasterizer path runs out of memory before 256 environments.
Table view
EnvironmentsRasterizerMadronaMadrona + compiled
124.9 ms25.2 ms—
411.3 ms——
167.2 ms2.32 ms2.10 ms
64—1.48 ms1.22 ms
256out of memory1.38 ms1.12 ms

6In motion: Apptronik Apollo

The Apollo example mounts a D435-class camera on the robot's head in Genesis and replays a scripted motion: the neck scans, turns fast in three windows and the right arm waves through the view, so blur, rolling shutter and latency all show. The panel video puts the external view, the ideal head-camera render at the current time and the frame the policy actually holds side by side.

Video 1. Apollo in Genesis, 34 s. Top: external view. Bottom left: ideal head-camera render now. Bottom right: the pipeline's output that the policy holds, with its age in milliseconds.
Video 2. A 2.5-minute walkthrough of every effect the pipeline models, with the Apollo head camera in Genesis: distortion, sensor noise, motion blur and rolling shutter, timing, depth artefacts, the calibrated preset, and one pipeline for MuJoCo and Genesis. Synthetic narration.
Four stills of the Apollo head camera at different times of the scripted motion
Figure 6. Apollo head-camera stills along the scripted motion (composition check in MuJoCo).

7Limits

8Status and direction

Development of the camera model continues on MuJoCo. The Genesis backend is kept as it is: no new features, guarded by its tests. On 2026-11-20 all 17 Genesis tests pass with Genesis 1.4.5, MuJoCo 3.14 and torch 2.11 (CUDA 12.8) on an RTX 5080.

If Genesis work resumes, these are the next steps, in order:

9Reproduce

Genesis goes in its own environment because it installs MuJoCo 4 and opencv-python; MuJoCo is pinned back to 3.14.

uv venv -p 3.12 .venv-genesis
uv pip install -p .venv-genesis torch --index-url https://download.pytorch.org/whl/cu128
uv pip install -p .venv-genesis genesis-world==1.4.5 mujoco==3.14.0 pytest
uv pip install -p .venv-genesis --no-deps -e .

# tests
MUJOCO_GL=egl .venv-genesis/bin/python -m pytest tests/test_genesis_bridge.py tests/test_genesis_apollo.py

# G1 agreement and scaling
.venv-genesis/bin/python scripts/genesis_g1_check.py render genesis
.venv-genesis/bin/python scripts/genesis_g1_check.py report
.venv-genesis/bin/python scripts/genesis_g1_check.py bench madrona compile 16 64 256

# Apollo video
.venv-genesis/bin/python examples/genesis_apollo.py --sim genesis --cfg calibrated --seconds 34 --video apollo.mp4