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 Drawable

From Leeroopedia
Revision as of 12:45, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/Google_deepmind_Mujoco_Filament_Drawable.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Sources
Domains Rendering, 3D Graphics
Last Updated 2026-02-15 04:00 GMT

Overview

Manages the creation, transformation, and rendering of drawable entities (geoms, decorations, arrows, capsules, cylinders) in the Filament rendering backend.

Description

drawable.cc translates MuJoCo visualization scene objects (mjvGeom) into Filament renderable entities with correct transforms, materials, and textures. It handles composite shapes such as capsules (tube plus two domes), cylinders (tube plus two disks), and multi-part arrows by computing sub-entity transforms. The file also manages texture mapping, including special handling for infinite plane tile sizes to ensure UV scaling matches MuJoCo re-centering increments.

Usage

Called during each render frame by SceneView to convert the MuJoCo abstract scene representation into concrete Filament renderables. Each mjvGeom in the scene is dispatched to the appropriate drawable creation path based on its geometry type.

Code Reference

Source Location

Key Functions

static float GetPlaneTileSize(const mjModel* model, int matid, float texrepeat);
// Drawable creation and transform logic for:
//   Capsule (kCapsuleTopDome, kCapsuleBottomDome)
//   Cylinder (kCylinderTopDisk, kCylinderBottomDisk)
//   Arrow variants (kArrow0Cone, kArrow1Cone, kArrow2TopCone, etc.)

Import

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

I/O Contract

Inputs

Name Type Required Description
geom const mjvGeom* Yes MuJoCo visualization geometry to draw
model const mjModel* Yes MuJoCo model for material and texture data
object_mgr ObjectManager* Yes Provides shapes, materials, and textures
engine filament::Engine* Yes Filament engine for entity creation

Outputs

Name Type Description
entity utils::Entity Filament renderable entity added to the scene

Related Pages

Page Connections

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