Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG. Can not visualize texture. #236

Open
Riften opened this issue Dec 22, 2024 · 1 comment
Open

BUG. Can not visualize texture. #236

Riften opened this issue Dec 22, 2024 · 1 comment

Comments

@Riften
Copy link

Riften commented Dec 22, 2024

Genesis can not visualize texture for the MJCF model attached.

import genesis as gs
import os
gs.init(backend=gs.cuda)
scene = gs.Scene(show_viewer=True)
mjcf_morph = gs.morphs.MJCF(file=os.path.join('texture_bug', 'floor_room.xml'))
scene.add_entity(mjcf_morph)
scene.build()

Genesis result:

genesis

Mujoco (3.2.5) result:

mujoco

MJCF file with texture image:

texture_bug.zip

MJCF file

<mujoco model="base">
  <option impratio="20" cone="elliptic" density="1.2" viscosity="0.00002" timestep="0.002" />
<compiler angle="radian" meshdir="meshes/" inertiagrouprange="0 0" autolimits="true" />
<size nconmax="5000" njmax="5000" />
<asset>
    <material texrepeat="2 2" texuniform="true" reflectance="0.1" shininess="0.1" name="floor_room_wall_mat" texture="floor_room_wall" />
  <texture type="2d" name="floor_room_wall" file="light_wood_planks_long.png" />
  </asset>
<worldbody>
    <body pos="2.15 -2.5 -0.02" name="floor_room_main" quat="0.707 0 0 0.707">
      
    <geom conaffinity="0" contype="0" mass="100" material="floor_room_wall_mat" type="box" size="2.54 3.19 0.02" pos="0 0 0" group="1" name="floor_room_g0_vis" />
    <site type="sphere" group="0" pos="0 0 0" size="0.002 0.002 0.002" rgba="1 0 0 1" name="floor_room_default_site" />
    </body>
  </worldbody>
</mujoco>
@OIEIEIO
Copy link

OIEIEIO commented Dec 22, 2024

maybe try this example in rendering folder - see if it imports texture like this ?
Screencast from 2024-12-22 12-35-40.webm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants