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:
committed by
Copybara-Service
parent
af3233f98d
commit
3b73dfe33b
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user