Implementation:Google deepmind Mujoco Filament Scene View
| Knowledge Sources | |
|---|---|
| Domains | Rendering, 3D Scene Management |
| Last Updated | 2026-02-15 04:00 GMT |
Overview
Manages the main 3D scene view in the Filament renderer, handling camera setup, draw mode switching (normal, depth, segmentation), color grading, lighting, and scene composition.
Description
scene_view.cc implements SceneView, which owns the Filament scene, camera, view, and associated visual settings. It supports multiple draw modes (normal, depth, segmentation) indexed by DrawMode constants, and configures Filament ColorGrading from ColorGradingOptions using a comprehensive builder chain covering exposure, contrast, vibrance, saturation, white balance, channel mixing, shadows/midtones/highlights, and tone mapping. The class converts MuJoCo viewport rectangles to Filament viewports and manages skybox, indirect lighting, and light entities within the scene.
Usage
Created by FilamentContext during initialization. Each render frame, SceneView is updated with the current MuJoCo scene state and camera parameters, then rendered via the Filament renderer. It serves as the primary bridge between MuJoCo's visualization abstraction and Filament's rendering pipeline.
Code Reference
Source Location
- Repository: Google_deepmind_Mujoco
- File: src/experimental/filament/filament/scene_view.cc
- Lines: 1-411
Key Functions
static filament::Viewport ReadViewport(mjrRect rect);
filament::ColorGrading::Builder ToBuilder(const ColorGradingOptions& opts);
// DrawMode enum: kNormal, kDepth, kSegmentation
// Scene, camera, view, skybox, and light management
Import
#include "experimental/filament/filament/scene_view.h"
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| engine | filament::Engine* | Yes | Filament engine instance |
| object_mgr | ObjectManager* | Yes | Resource manager for materials, shapes, and textures |
| viewport | mjrRect | Yes | MuJoCo viewport rectangle for camera and view setup |
| color_opts | ColorGradingOptions | No | Post-processing color grading parameters |
Outputs
| Name | Type | Description |
|---|---|---|
| view_ | filament::View* | Configured Filament view ready for rendering |
| scene_ | filament::Scene* | Filament scene containing all drawable entities |