MuJoCo Rendering: Cameras, Contexts & Offscreen Buffers
[!TIP]
Official MuJoCo documentation (doc/*.rst): Read
../../programming/rendering.rst
(.. _Rendering:, .. _FilamentRendering:, .. _ClassicRendering:) and
../../programming/visualization.rst
(.. _Visualization:) directly when in a MuJoCo checkout; for large
reference files like ../../python.rst (.. _PyRender:),
../../XMLreference.rst, and
../../APIreference/functions.rst, grep
the literal .. _Label: anchor. Outside a checkout, the same doc/*.rst tree
ships offline in pip install mujoco at
pathlib.Path(mujoco.__file__).parent / 'doc'; otherwise fetch
https://mujoco.readthedocs.io/en/latest/<path>.html (or /en/stable/ for
released pages; functions.rst renders inside
APIreference/APIfunctions.html, and Sphinx anchors lowercase the label,
e.g. .. _PyRender: → #pyrender) and browse repo paths (../../../) under
https://github.com/google-deepmind/mujoco/tree/main/.
Related skills:
- mujoco-python — Core physics simulation, stepping,
and state management.
- mujoco-studio — Interactive simulation, Studio
viewer apps, and plugin architecture.
- mujoco-gui — Dear ImGui UI design and custom controls.
1. Overview: Rendering Backends & Workflows
MuJoCo provides two built-in 3D rendering backends (compared side-by-side in
programming/rendering.rst, .. _Rendering:):
- Classic OpenGL (
mujoco.Renderer / C mjr): Immediate-mode OpenGL 1.5
renderer (mjv_updateScene -> mjr_render -> mjr_readPixels), now in
maintenance mode. Bundled out of the box in pip install mujoco, making
mujoco.Renderer the simplest single-class helper for headless RGB, depth,
and segmentation capture. See
programming/rendering.rst
(.. _ClassicRendering:) and python.rst
(.. _PyClassicRender:).
- Filament PBR (
mujoco.mjrf & mujoco.rendering.filament / C mjrf):
Retained-mode, asynchronous physically-based renderer supporting OpenGL,
Vulkan, Metal, and WebGL (owns its own headless or windowed GPU context and
arbitrary-size mjrfRenderTarget buffers). Recommended for PBR materials,
image-based/photometric lighting, and new C++/Studio applications; see §7
and programming/rendering.rst
(.. _FilamentRendering:).
- Interactive Viewers (
mujoco.studio / mujoco.viewer): Desktop or
web-streamed interactive viewers; use mujoco-studio
instead.
2. Headless Contexts on Linux: MUJOCO_GL
On headless Linux systems (servers, containers), configure the OpenGL context
provider via the MUJOCO_GL environment variable before importing mujoco:
import os
os.environ['MUJOCO_GL'] = 'egl' # Hardware-accelerated offscreen on NVIDIA GPUs
# os.environ['MUJOCO_GL'] = 'osmesa' # Portable CPU software rasterization
import mujoco # Must import AFTER setting MUJOCO_GL
Or from the command line:
MUJOCO_GL=egl python3 my_script.py
3. The Python Renderer Class (RGB, Depth & Segmentation)
mujoco.Renderer manages GL context creation, scene geometry synchronization,
and buffer readback. Always use it as a context manager:
import mujoco
import numpy as np
model = mujoco.MjModel.from_xml_path('scene.xml')
data = mujoco.MjData(model)
with mujoco.Renderer(model, height=480, width=640) as renderer:
mujoco.mj_forward(model, data)
# 1. RGB Rendering
renderer.update_scene(data, camera='overhead_cam')
rgb = renderer.render() # Shape: (480, 640, 3), dtype: uint8
# 2. Metric Depth Rendering (distance in meters)
renderer.enable_depth_rendering()
renderer.update_scene(data, camera='overhead_cam')
depth = renderer.render() # Shape: (480, 640), dtype: float32
renderer.disable_depth_rendering()
# 3. Semantic Segmentation Rendering
renderer.enable_segmentation_rendering()
renderer.update_scene(data, camera='overhead_cam')
seg = renderer.render() # Shape: (480, 640, 2), dtype: int32
# seg[:, :, 0] = object ID (-1 for background)
# seg[:, :, 1] = object type (mjtObj enum, e.g. mjOBJ_GEOM)
renderer.disable_segmentation_rendering()
Rendering Inside Simulation Loops
Creating a Renderer allocates GPU framebuffers. In RL or evaluation loops,
create the renderer once outside the loop:
with mujoco.Renderer(model, height=84, width=84) as renderer:
for step in range(1000):
mujoco.mj_step(model, data)
if step % render_interval == 0:
renderer.update_scene(data, camera='agent_cam')
# Call .copy() because the renderer's internal buffer is reused
frame = renderer.render().copy()
4. C++ Offscreen Rendering Pipeline (mjr & mjv)
In C++, offscreen rendering is performed using the mjvScene and mjrContext
APIs:
#include <mujoco/mujoco.h>
// 1. Initialize visualization structures
mjvCamera cam;
mjv_defaultCamera(&cam);
cam.type = mjCAMERA_FIXED;
cam.fixedcamid = mj_name2id(m, mjOBJ_CAMERA, "overhead_cam");
mjvOption opt;
mjv_defaultOption(&opt);
mjvScene scn;
mjv_makeScene(m, &scn, 2000); // Buffer up to 2000 geoms
// 2. Initialize offscreen rendering context
mjrContext con;
mjr_defaultContext(&con);
mjr_makeContext(m, &con, mjFONTSCALE_100);
// 3. Render frame
mjrRect viewport = {0, 0, 640, 480};
mjv_updateScene(m, d, &opt, nullptr, &cam, mjCAT_ALL, &scn);
mjr_render(viewport, &scn, &con);
// 4. Read pixels into user buffers
unsigned char rgb[640 * 480 * 3];
float depth[640 * 480];
mjr_readPixels(rgb, depth, viewport, &con);
// 5. Clean up
mjr_freeContext(&con);
mjv_freeScene(&scn);
5. Camera Definition & Placement
MuJoCo cameras look down their negative Z-axis:
- -Z: Viewing forward direction
- +X: Right
- +Y: Up
Defining Cameras in MjSpec
# Fixed camera pointing down at ground plane
cam = spec.worldbody.add_camera(
name='overhead',
pos=[0, 0, 3.0],
quat=[0.707, 0.707, 0, 0], # 90 deg rotation around X
fovy=60,
)
# Camera attached to robot wrist
wrist_cam = wrist_body.add_camera(
name='wrist_cam',
pos=[0.05, 0, 0],
xyaxes=[0, -1, 0, 0, 0, -1],
fovy=75,
)
Free Camera (MjvCamera)
For custom interactive or orbital viewpoints:
cam = mujoco.MjvCamera()
cam.type = mujoco.mjtCamera.mjCAMERA_FREE
cam.lookat[:] = [0, 0, 0.5]
cam.distance = 2.5
cam.azimuth = 90.0
cam.elevation = -20.0
renderer.update_scene(data, camera=cam)
6. Framebuffers & Scene Options
Offscreen Framebuffer Resolution
The offscreen rendering resolution cannot exceed the dimensions pre-allocated in
the model. Adjust the buffer limit in the spec before compilation:
spec.visual.global_.offwidth = 1920
spec.visual.global_.offheight = 1080
model = spec.compile()
The Single <visual> Block Rule
MuJoCo uses only the last <visual> block defined in an XML file. Multiple
visual blocks will silently overwrite earlier settings:
<!-- ❌ WRONG — second visual block silently resets offwidth/offheight to default -->
<visual><global offwidth="1920" offheight="1080"/></visual>
<visual><headlight ambient="0.3 0.3 0.3"/></visual>
<!-- ✅ RIGHT — consolidate into one visual block -->
<visual>
<global offwidth="1920" offheight="1080"/>
<headlight ambient="0.3 0.3 0.3"/>
</visual>
Geom Group Visibility & Visualization Flags
Control rendering layers via MjvOption:
opt = mujoco.MjvOption()
opt.geomgroup[:] = False # Hide all groups
opt.geomgroup[0] = True # Show primary geometry (default group)
opt.geomgroup[1] = True # Show secondary visuals
# Toggle visual debugging flags
opt.flags[mujoco.mjtVisFlag.mjVIS_CONTACTFORCE] = True
opt.flags[mujoco.mjtVisFlag.mjVIS_TRANSPARENT] = True
renderer.update_scene(data, camera='overhead', scene_option=opt)
7. Filament Physically-Based Rendering (mjrf)
MuJoCo's Filament backend (mjrfilament.h in C/C++, from mujoco import mjrf
and mujoco.rendering.filament in Python) provides retained-mode PBR with
OpenGL, Vulkan, Metal, and WebGL support, arbitrary mjrfRenderTarget sizes
(independent of <global offwidth offheight/>), and asynchronous
mjrfReadRequest pixel readback:
- Python (
ModelScene + Renderer): Create an mjrf.Context, bind
model lights and renderables once via
mujoco.rendering.filament.model_scene.ModelScene, update in place with
ms.update(data), and render into a NumPy target buffer via
mujoco.rendering.filament.renderer.Renderer — see the complete example in
python.rst (.. _PyFilamentRender:).
- C/C++ & CMake: Build with
-DMUJOCO_USE_FILAMENT=ON (or
-DMUJOCO_USE_FILAMENT_MJR_COMPAT=ON for drop-in mjr_ compatibility) and
consult programming/rendering.rst
(.. _reProgramming:, .. _reSupport:).
- Photometric light-intensity gotcha: If any
<light> has positive
intensity, Filament switches the entire scene from classic headlight +
default environment lighting to photometric mode (turning off the headlight
and darkening zero-intensity lights). For PBR materials, textures, and
lighting authoring, read
programming/rendering.rst
(.. _reAuthoring:, .. _reMaterials:, .. _reLighting:) and inspect the
reference PBR/IBL test scenes in ../../../test/render/testdata/
(pbr.xml, lighting.xml, emissive_bloom.xml, reflect_pbr.xml,
ibl.ktx) and ../../../model/mug/mug.xml.
8. Common Gotchas & Best Practices
- GL context leaks: Always close
mujoco.Renderer or use a with block.
Failing to free renderers in loops exhausts GL contexts.
- Destruction order: In C++,
mjr_freeContext must be called before the
underlying OpenGL context is destroyed (see
programming/rendering.rst,
.. _reContext:).
- Buffer re-use:
renderer.render() returns an internal buffer view. Call
.copy() if storing frames in a list.
- Camera lookup by name: Pass
camera='camera_name' or the integer ID.
Avoid passing raw string IDs that are not present in the model.
9. Key References
Documentation
- Rendering Guide (Filament
mjrf & Classic OpenGL mjr)
(.. _Rendering:, .. _FilamentRendering:, .. _ClassicRendering:)
- Abstract Visualization (
mjvCamera, mjvOption, mjvScene)
(.. _Visualization:, .. _viCamera:, .. _viOption:)
- Python Rendering Bindings (
.. _PyRender:,
.. _PyFilamentRender:, .. _PyClassicRender:)
- MJCF
<visual> & <camera> Reference
(.. _visual-global:, .. _body-camera:),
Modeling Cameras (.. _CCamera:), and
MuJoCo Menagerie (.. _Menagerie:)
- C Rendering API Functions
(
.. _Visualization-api:, .. _OpenGLrendering:,
.. _FilamentRenderingApi:) and
C++ Render Sample (.. _saRender:)
Source Code & Model Examples
1---2name: mujoco-rendering3description: >-4 MuJoCo offscreen image rendering using mujoco.Renderer in Python and the5 MuJoCo C/C++ rendering pipeline (mjrContext, mjvScene, mjr_render,6 mjr_readPixels): RGB, metric depth maps, segmentation masks (mjtObj), MJCF7 offwidth/offheight framebuffer sizing, MUJOCO_GL (osmesa, egl), MuJoCo8 cameras (fixed, tracking, free, MjvCamera), and mjvOption flags/geomgroup.9 Use only for headless camera rendering, dataset recording, and visual10 observations in MuJoCo simulations. Don't use for generic OpenGL/EGL/OSMesa11 offscreen rendering, glReadPixels depth/segmentation post-processing, or12 synthetic dataset pipelines that do not use the `mujoco` library, or for13 interactive viewers/Studio (mujoco-studio) or ImGui controls (mujoco-gui).14metadata:15 source: https://skillmd.com/skills/google-deepmind/mujoco-rendering16---1718# MuJoCo Rendering: Cameras, Contexts & Offscreen Buffers1920> [!TIP]21>22> **Official MuJoCo documentation (`doc/*.rst`):** Read23> [`../../programming/rendering.rst`](../../programming/rendering.rst)24> (`.. _Rendering:`, `.. _FilamentRendering:`, `.. _ClassicRendering:`) and25> [`../../programming/visualization.rst`](../../programming/visualization.rst)26> (`.. _Visualization:`) directly when in a MuJoCo checkout; for large27> reference files like [`../../python.rst`](../../python.rst) (`.. _PyRender:`),28> [`../../XMLreference.rst`](../../XMLreference.rst), and29> [`../../APIreference/functions.rst`](../../APIreference/functions.rst), grep30> the literal `.. _Label:` anchor. Outside a checkout, the same `doc/*.rst` tree31> ships offline in `pip install mujoco` at32> `pathlib.Path(mujoco.__file__).parent / 'doc'`; otherwise fetch33> `https://mujoco.readthedocs.io/en/latest/<path>.html` (or `/en/stable/` for34> released pages; `functions.rst` renders inside35> `APIreference/APIfunctions.html`, and Sphinx anchors lowercase the label,36> e.g. `.. _PyRender:` → `#pyrender`) and browse repo paths (`../../../`) under37> `https://github.com/google-deepmind/mujoco/tree/main/`.38>39> **Related skills:**40>41> - [mujoco-python](../python/SKILL.md) — Core physics simulation, stepping,42> and state management.43> - [mujoco-studio](../studio/SKILL.md) — Interactive simulation, Studio44> viewer apps, and plugin architecture.45> - [mujoco-gui](../gui/SKILL.md) — Dear ImGui UI design and custom controls.4647## 1. Overview: Rendering Backends & Workflows4849MuJoCo provides two built-in 3D rendering backends (compared side-by-side in50[programming/rendering.rst](../../programming/rendering.rst), `.. _Rendering:`):5152- **Classic OpenGL (`mujoco.Renderer` / C `mjr`)**: Immediate-mode OpenGL 1.553 renderer (`mjv_updateScene` -> `mjr_render` -> `mjr_readPixels`), now in54 maintenance mode. Bundled out of the box in `pip install mujoco`, making55 `mujoco.Renderer` the simplest single-class helper for headless RGB, depth,56 and segmentation capture. See57 [programming/rendering.rst](../../programming/rendering.rst)58 (`.. _ClassicRendering:`) and [python.rst](../../python.rst)59 (`.. _PyClassicRender:`).60- **Filament PBR (`mujoco.mjrf` & `mujoco.rendering.filament` / C `mjrf`)**:61 Retained-mode, asynchronous physically-based renderer supporting OpenGL,62 Vulkan, Metal, and WebGL (owns its own headless or windowed GPU context and63 arbitrary-size `mjrfRenderTarget` buffers). Recommended for PBR materials,64 image-based/photometric lighting, and new C++/Studio applications; see §765 and [programming/rendering.rst](../../programming/rendering.rst)66 (`.. _FilamentRendering:`).67- **Interactive Viewers (`mujoco.studio` / `mujoco.viewer`)**: Desktop or68 web-streamed interactive viewers; use [`mujoco-studio`](../studio/SKILL.md)69 instead.7071## 2. Headless Contexts on Linux: `MUJOCO_GL`7273On headless Linux systems (servers, containers), configure the OpenGL context74provider via the `MUJOCO_GL` environment variable **before importing `mujoco`**:7576```python77import os78os.environ['MUJOCO_GL'] = 'egl' # Hardware-accelerated offscreen on NVIDIA GPUs79# os.environ['MUJOCO_GL'] = 'osmesa' # Portable CPU software rasterization8081import mujoco # Must import AFTER setting MUJOCO_GL82```8384Or from the command line:85```bash86MUJOCO_GL=egl python3 my_script.py87```8889## 3. The Python Renderer Class (RGB, Depth & Segmentation)9091`mujoco.Renderer` manages GL context creation, scene geometry synchronization,92and buffer readback. **Always use it as a context manager**:9394```python95import mujoco96import numpy as np9798model = mujoco.MjModel.from_xml_path('scene.xml')99data = mujoco.MjData(model)100101with mujoco.Renderer(model, height=480, width=640) as renderer:102 mujoco.mj_forward(model, data)103104 # 1. RGB Rendering105 renderer.update_scene(data, camera='overhead_cam')106 rgb = renderer.render() # Shape: (480, 640, 3), dtype: uint8107108 # 2. Metric Depth Rendering (distance in meters)109 renderer.enable_depth_rendering()110 renderer.update_scene(data, camera='overhead_cam')111 depth = renderer.render() # Shape: (480, 640), dtype: float32112 renderer.disable_depth_rendering()113114 # 3. Semantic Segmentation Rendering115 renderer.enable_segmentation_rendering()116 renderer.update_scene(data, camera='overhead_cam')117 seg = renderer.render() # Shape: (480, 640, 2), dtype: int32118 # seg[:, :, 0] = object ID (-1 for background)119 # seg[:, :, 1] = object type (mjtObj enum, e.g. mjOBJ_GEOM)120 renderer.disable_segmentation_rendering()121```122123### Rendering Inside Simulation Loops124125Creating a `Renderer` allocates GPU framebuffers. In RL or evaluation loops,126**create the renderer once outside the loop**:127128```python129with mujoco.Renderer(model, height=84, width=84) as renderer:130 for step in range(1000):131 mujoco.mj_step(model, data)132 if step % render_interval == 0:133 renderer.update_scene(data, camera='agent_cam')134 # Call .copy() because the renderer's internal buffer is reused135 frame = renderer.render().copy()136```137138## 4. C++ Offscreen Rendering Pipeline (mjr & mjv)139140In C++, offscreen rendering is performed using the `mjvScene` and `mjrContext`141APIs:142143```cpp144#include <mujoco/mujoco.h>145146// 1. Initialize visualization structures147mjvCamera cam;148mjv_defaultCamera(&cam);149cam.type = mjCAMERA_FIXED;150cam.fixedcamid = mj_name2id(m, mjOBJ_CAMERA, "overhead_cam");151152mjvOption opt;153mjv_defaultOption(&opt);154155mjvScene scn;156mjv_makeScene(m, &scn, 2000); // Buffer up to 2000 geoms157158// 2. Initialize offscreen rendering context159mjrContext con;160mjr_defaultContext(&con);161mjr_makeContext(m, &con, mjFONTSCALE_100);162163// 3. Render frame164mjrRect viewport = {0, 0, 640, 480};165mjv_updateScene(m, d, &opt, nullptr, &cam, mjCAT_ALL, &scn);166mjr_render(viewport, &scn, &con);167168// 4. Read pixels into user buffers169unsigned char rgb[640 * 480 * 3];170float depth[640 * 480];171mjr_readPixels(rgb, depth, viewport, &con);172173// 5. Clean up174mjr_freeContext(&con);175mjv_freeScene(&scn);176```177178## 5. Camera Definition & Placement179180MuJoCo cameras look down their **negative Z-axis**:181- **-Z**: Viewing forward direction182- **+X**: Right183- **+Y**: Up184185### Defining Cameras in MjSpec186187```python188# Fixed camera pointing down at ground plane189cam = spec.worldbody.add_camera(190 name='overhead',191 pos=[0, 0, 3.0],192 quat=[0.707, 0.707, 0, 0], # 90 deg rotation around X193 fovy=60,194)195196# Camera attached to robot wrist197wrist_cam = wrist_body.add_camera(198 name='wrist_cam',199 pos=[0.05, 0, 0],200 xyaxes=[0, -1, 0, 0, 0, -1],201 fovy=75,202)203```204205### Free Camera (`MjvCamera`)206207For custom interactive or orbital viewpoints:208209```python210cam = mujoco.MjvCamera()211cam.type = mujoco.mjtCamera.mjCAMERA_FREE212cam.lookat[:] = [0, 0, 0.5]213cam.distance = 2.5214cam.azimuth = 90.0215cam.elevation = -20.0216217renderer.update_scene(data, camera=cam)218```219220## 6. Framebuffers & Scene Options221222### Offscreen Framebuffer Resolution223224The offscreen rendering resolution cannot exceed the dimensions pre-allocated in225the model. Adjust the buffer limit in the spec before compilation:226227```python228spec.visual.global_.offwidth = 1920229spec.visual.global_.offheight = 1080230model = spec.compile()231```232233### The Single `<visual>` Block Rule234235MuJoCo uses only the **last** `<visual>` block defined in an XML file. Multiple236visual blocks will silently overwrite earlier settings:237238```xml239<!-- ❌ WRONG — second visual block silently resets offwidth/offheight to default -->240<visual><global offwidth="1920" offheight="1080"/></visual>241<visual><headlight ambient="0.3 0.3 0.3"/></visual>242243<!-- ✅ RIGHT — consolidate into one visual block -->244<visual>245 <global offwidth="1920" offheight="1080"/>246 <headlight ambient="0.3 0.3 0.3"/>247</visual>248```249250### Geom Group Visibility & Visualization Flags251252Control rendering layers via `MjvOption`:253254```python255opt = mujoco.MjvOption()256opt.geomgroup[:] = False # Hide all groups257opt.geomgroup[0] = True # Show primary geometry (default group)258opt.geomgroup[1] = True # Show secondary visuals259260# Toggle visual debugging flags261opt.flags[mujoco.mjtVisFlag.mjVIS_CONTACTFORCE] = True262opt.flags[mujoco.mjtVisFlag.mjVIS_TRANSPARENT] = True263264renderer.update_scene(data, camera='overhead', scene_option=opt)265```266267## 7. Filament Physically-Based Rendering (`mjrf`)268269MuJoCo's Filament backend (`mjrfilament.h` in C/C++, `from mujoco import mjrf`270and `mujoco.rendering.filament` in Python) provides retained-mode PBR with271OpenGL, Vulkan, Metal, and WebGL support, arbitrary `mjrfRenderTarget` sizes272(independent of `<global offwidth offheight/>`), and asynchronous273`mjrfReadRequest` pixel readback:274275- **Python (`ModelScene` + `Renderer`)**: Create an `mjrf.Context`, bind276 model lights and renderables once via277 `mujoco.rendering.filament.model_scene.ModelScene`, update in place with278 `ms.update(data)`, and render into a NumPy target buffer via279 `mujoco.rendering.filament.renderer.Renderer` — see the complete example in280 [python.rst](../../python.rst) (`.. _PyFilamentRender:`).281- **C/C++ & CMake**: Build with `-DMUJOCO_USE_FILAMENT=ON` (or282 `-DMUJOCO_USE_FILAMENT_MJR_COMPAT=ON` for drop-in `mjr_` compatibility) and283 consult [programming/rendering.rst](../../programming/rendering.rst)284 (`.. _reProgramming:`, `.. _reSupport:`).285- **Photometric light-intensity gotcha**: If *any* `<light>` has positive286 `intensity`, Filament switches the entire scene from classic headlight +287 default environment lighting to photometric mode (turning off the headlight288 and darkening zero-intensity lights). For PBR materials, textures, and289 lighting authoring, read290 [programming/rendering.rst](../../programming/rendering.rst)291 (`.. _reAuthoring:`, `.. _reMaterials:`, `.. _reLighting:`) and inspect the292 reference PBR/IBL test scenes in `../../../test/render/testdata/`293 (`pbr.xml`, `lighting.xml`, `emissive_bloom.xml`, `reflect_pbr.xml`,294 `ibl.ktx`) and `../../../model/mug/mug.xml`.295296## 8. Common Gotchas & Best Practices2972981. **GL context leaks**: Always close `mujoco.Renderer` or use a `with` block.299 Failing to free renderers in loops exhausts GL contexts.3002. **Destruction order**: In C++, `mjr_freeContext` must be called before the301 underlying OpenGL context is destroyed (see302 [programming/rendering.rst](../../programming/rendering.rst),303 `.. _reContext:`).3043. **Buffer re-use**: `renderer.render()` returns an internal buffer view. Call305 `.copy()` if storing frames in a list.3064. **Camera lookup by name**: Pass `camera='camera_name'` or the integer ID.307 Avoid passing raw string IDs that are not present in the model.308309## 9. Key References310311### Documentation312313- [Rendering Guide (Filament `mjrf` & Classic OpenGL `mjr`)](../../programming/rendering.rst)314 (`.. _Rendering:`, `.. _FilamentRendering:`, `.. _ClassicRendering:`)315- [Abstract Visualization (`mjvCamera`, `mjvOption`, `mjvScene`)](../../programming/visualization.rst)316 (`.. _Visualization:`, `.. _viCamera:`, `.. _viOption:`)317- [Python Rendering Bindings](../../python.rst) (`.. _PyRender:`,318 `.. _PyFilamentRender:`, `.. _PyClassicRender:`)319- [MJCF `<visual>` & `<camera>` Reference](../../XMLreference.rst)320 (`.. _visual-global:`, `.. _body-camera:`),321 [Modeling Cameras](../../modeling.rst) (`.. _CCamera:`), and322 [MuJoCo Menagerie](../../models.rst) (`.. _Menagerie:`)323- [C Rendering API Functions](../../APIreference/functions.rst)324 (`.. _Visualization-api:`, `.. _OpenGLrendering:`,325 `.. _FilamentRenderingApi:`) and326 [C++ Render Sample](../../programming/samples.rst) (`.. _saRender:`)327328### Source Code & Model Examples329330- [C API Headers](../../../include/mujoco/mujoco.h) and331 [`mjrfilament.h`](../../../include/mujoco/mjrfilament.h)332- [C++ Offscreen & Filament Sample](../../../sample/render.cc) and333 [Filament PBR Test Scenes](../../../test/render/testdata/pbr.xml)