Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion benchmarks/render/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

## Description

GPU ray-traced rendering of the [primitives](../../mujoco_warp/test_data/primitives.xml) scene. This benchmark measures rendering performance using a 5×5 grid of spheres, capsules, ellipsoids, cylinders, and boxes above a plane.
GPU ray-traced rendering performance benchmarks. These benchmarks measure rendering speed across both simple primitive layouts and complex high-resolution textured meshes on the GPU.

### primitives

GPU ray-traced rendering of the [primitives](../../mujoco_warp/test_data/primitives.xml) scene. This benchmark measures rendering performance using a 5×5 grid of spheres, capsules, ellipsoids, cylinders, and boxes above a plane.

| Property | Value |
|----------|-------|
| Bodies | 126 |
Expand All @@ -16,3 +18,18 @@ GPU ray-traced rendering of the [primitives](../../mujoco_warp/test_data/primiti
| Worlds | 8192 |

![primitives](primitives.webp)

### mug

GPU ray-traced rendering of the official [MuJoCo Mug](assets/mug.xml) scene. This benchmark measures rendering performance of a high-resolution, textured OBJ mesh with complex geometry.

| Property | Value |
|----------|-------|
| Bodies | 2 |
| DoFs | 6 |
| Geoms | 37 |
| Cameras | 1 |
| Resolution | 64×64 |
| Worlds | 8192 |

![mug](mug.webp)
19 changes: 19 additions & 0 deletions benchmarks/render/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
ASSETS = [
{
"source": "https://github.com/google-deepmind/mujoco.git",
"ref": "3f3ff85a59b9ce68cfb9d9a5222bf7e050d966c1",
}
]

BENCHMARKS = [
{
"name": "primitives",
Expand All @@ -8,4 +15,16 @@
"njmax": 256,
"nstep": 100,
},
{
"name": "mug",
"mjcf": "mug.xml",
"function": "render",
"nworld": 8192,
"nconmax": 100,
"njmax": 256,
"nstep": 100,
"assets": [
(ASSETS[0], "model/mug", "assets"),
],
},
]
Binary file added benchmarks/render/mug.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions benchmarks/render/mug.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<mujoco model="mug">
<visual>
<map znear="0.01" zfar="200" />
<quality shadowsize="8192" />
<headlight diffuse=".8 .8 .8" ambient=".2 .2 .2" specular="1 1 1" />
<global azimuth="140" elevation="-20" />
</visual>

<asset>
<texture type="skybox" builtin="gradient" rgb1="1 1 1" rgb2="1 1 1" width="800" height="800" />
<texture name="grid" type="2d" builtin="checker" width="512" height="512" rgb1=".1 .2 .3" rgb2=".2 .3 .4"/>
<material name="grid" texture="grid" texrepeat="1 1" texuniform="true" reflectance=".2"/>

<texture name="mug" file="assets/mug.png" type="2d"/>
<material name="mug" texture="mug" specular="1" shininess="1"/>
<mesh name="mug" file="assets/mug.obj" scale=".01 .01 .01"/>
</asset>

<worldbody>
<geom name="floor" size="0 0 .05" type="plane" material="grid" contype="1" conaffinity="1"/>
<camera pos="1.1 0.0 0.75" xyaxes="0 1 0 -0.6 0 1"/>
<light pos="0 0 3" dir="0 0 -1" directional="true" />

<!-- A table to hold the mug -->
<geom name="table" pos="0.8 0.0 0.5" type="box" size="0.5 1.0 0.01" quat="1.0 0.0 0.0 0.0" contype="1" conaffinity="1"/>

<!-- A single mug above the table -->
<body name="mug" pos="0.8 0.0 0.6" euler="0 0 90">
<freejoint name="mug_joint"/>
<geom type="mesh" mesh="mug" material="mug" euler="90 0 0" group="1" contype="0" conaffinity="0"/>
</body>
</worldbody>
</mujoco>
Loading