Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Google deepmind Mujoco Filament Object Manager

From Leeroopedia
Knowledge Sources
Domains Rendering, Resource Management
Last Updated 2026-02-15 04:00 GMT

Overview

Centralizes creation and lifecycle management of all Filament rendering resources including built-in shapes, materials, textures, meshes, and skyboxes.

Description

object_manager.cc implements ObjectManager, the resource hub for the Filament rendering backend. During initialization it creates all built-in primitive shapes (line, box, line-box, cone, disk, dome, tube, plane, sphere, triangle) and loads compiled Filament material binaries via the Asset helper class which reads resources through MuJoCo's mju_openResource API. The manager provides shape, material, and texture lookup by index, and handles GPU resource upload for model-specific meshes and textures.

Usage

Instantiated once per FilamentContext during rendering initialization. All other Filament subsystems (Drawable, SceneView, GuiView) obtain their rendering resources through the ObjectManager rather than creating them directly.

Code Reference

Source Location

Key Functions

ObjectManager::ObjectManager(const mjModel* model, filament::Engine* engine, const mjrFilamentConfig* config);
// Creates: kLine, kBox, kLineBox, kCone, kDisk, kDome, kTube, kPlane, kSphere, kTriangle
// Asset loading via mju_openResource for material binaries
Material* GetMaterial(MaterialType type);

Import

#include "experimental/filament/filament/object_manager.h"

I/O Contract

Inputs

Name Type Required Description
model const mjModel* Yes MuJoCo model for mesh and texture data
engine filament::Engine* Yes Filament engine for GPU resource creation
config const mjrFilamentConfig* Yes Rendering configuration

Outputs

Name Type Description
shapes_ Shape array Built-in geometric primitives as Filament buffers
materials Material pointers Compiled Filament material instances
textures Texture pointers Uploaded Filament textures

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment