Implementation:Google deepmind Dm control Labmaze Textures
| Knowledge Sources | |
|---|---|
| Domains | Reinforcement_Learning, Locomotion |
| Last Updated | 2026-02-15 04:00 GMT |
Overview
Composer Entity wrappers for loading LabMaze (DeepMind Lab-style) texture assets, providing skybox, wall, and floor texturing for maze arenas in the dm_control locomotion system.
Description
The labmaze_textures module provides three composer.Entity subclasses that serve as bridges between the labmaze texture asset library and the dm_control Composer framework. Each class loads textures from the labmaze.assets package for a specified style and wraps them in an MJCF root element that can be attached to arena models.
SkyBox loads six-face skybox textures (left, right, up, down, front, back) for a given style using labmaze_assets.get_sky_texture_paths(style). The textures are added as a single skybox type texture element in the MJCF asset section. WallTextures loads wall texture files as 2D textures by iterating over the dictionary returned by labmaze_assets.get_wall_texture_paths(style). FloorTextures similarly loads floor textures from labmaze_assets.get_floor_texture_paths(style).
Each entity stores the loaded textures as accessible properties, allowing maze arena builders to reference them when assigning materials to wall and floor geoms.
Usage
Use these classes when constructing maze arenas that require rich visual textures from the DeepMind Lab texture library. Create instances with a desired style string, then attach them to the arena or reference their textures when building wall and floor materials.
Code Reference
Source Location
- Repository: Google_deepmind_Dm_control
- File: dm_control/locomotion/arenas/labmaze_textures.py
- Lines: 1-84
Signature
class SkyBox(composer.Entity):
def _build(self, style):
...
@property
def mjcf_model(self):
...
@property
def texture(self):
...
class WallTextures(composer.Entity):
def _build(self, style):
...
@property
def mjcf_model(self):
...
@property
def textures(self):
...
class FloorTextures(composer.Entity):
def _build(self, style):
...
@property
def mjcf_model(self):
...
@property
def textures(self):
...
Import
from dm_control.locomotion.arenas import labmaze_textures
from dm_control.locomotion.arenas.labmaze_textures import SkyBox, WallTextures, FloorTextures
I/O Contract
Inputs (_build for all classes)
| Name | Type | Required | Description |
|---|---|---|---|
| style | str | Yes | The texture style name, used to look up texture paths from labmaze.assets
|
Outputs
| Name | Type | Description |
|---|---|---|
| SkyBox.texture | mjcf.Element |
The skybox texture element with six face images |
| WallTextures.textures | list of mjcf.Element |
List of 2D wall texture elements |
| FloorTextures.textures | list of mjcf.Element |
List of 2D floor texture elements |
| mjcf_model | mjcf.RootElement |
The MJCF root containing the loaded texture assets |
Texture Entity Classes
| Class | Asset Source Function | Texture Type | Description |
|---|---|---|---|
SkyBox |
labmaze_assets.get_sky_texture_paths |
skybox |
Six-face environment skybox (left, right, up, down, front, back) |
WallTextures |
labmaze_assets.get_wall_texture_paths |
2d |
Wall surface textures, one per variation |
FloorTextures |
labmaze_assets.get_floor_texture_paths |
2d |
Floor surface textures, one per variation |
Usage Examples
from dm_control.locomotion.arenas import labmaze_textures
# Load skybox textures for a specific style
skybox = labmaze_textures.SkyBox(style='sky_03')
skybox_texture = skybox.texture
# Load wall textures
wall_tex = labmaze_textures.WallTextures(style='style_01')
for texture in wall_tex.textures:
print(texture.name)
# Load floor textures
floor_tex = labmaze_textures.FloorTextures(style='style_01')
for texture in floor_tex.textures:
print(texture.name)
# Attach texture entities to an arena
# (typically done internally by maze arena builders)
arena.mjcf_model.attach(skybox.mjcf_model)
arena.mjcf_model.attach(wall_tex.mjcf_model)
arena.mjcf_model.attach(floor_tex.mjcf_model)