Add textured materials to render context, and refactor mjvGeom to refer to those textures.

PiperOrigin-RevId: 648719103
Change-Id: Idb4425bdeea3cbc1133cda3e4366574ed3bb5ccc
This commit is contained in:
Tom Erez
2024-07-02 08:00:06 -07:00
committed by Copybara-Service
parent af3233f98d
commit 3b73dfe33b
14 changed files with 252 additions and 195 deletions
+5 -1
View File
@@ -232,7 +232,11 @@ class USDExporter:
geom_name = mujoco.mj_id2name(self.model, geom.objtype, geom.objid)
assert geom_name not in self.geom_name2usd
texture_file = self.texture_files[geom.texid] if geom.texid != -1 else None
texture_file = (
self.texture_files[self.model.mat_texid[geom.matid]]
if geom.matid != -1
else None
)
# handles meshes in scene
if geom.type == mujoco.mjtGeom.mjGEOM_MESH: