Two sided skin on a 2d grid/cloth composite object

Discussion in 'Support requests' started by Julius Hietala, Jul 31, 2020.

  1. Hi,

    Is there a way / what would be the recommended way to have a two sided skin (i.e. different colors/files on each side) on a 2d grid/cloth composite object?

    Using the type "cube" texture with "fileup", "filedown", "..." sounds promising, but seems that it does not apply the texture at all to the composite. Here's a minimal repro only using one file (image of result as "cube_texture.png", cube_texture.png ):


    HTML:
    <?xml version="1.0" encoding="utf-8"?>
    <mujoco>
    
        <asset>
            <texture name="combined" file="../textures/red.png"/>
            <material name="combined" texture="combined"/>
        </asset>
      
        <worldbody>
            <geom pos="0 0 0" size="1 1 1" type="plane" condim="3"></geom>
    
            <body name="B0_0" pos="0.2 0.2 0">
                <freejoint />
                <composite type="cloth" count="9 9 1" spacing="0.03" flatinertia="0.01" >
                    <skin material="combined" texcoord="true" inflate="0.002" subgrid="1" />
                    <geom type="sphere" size="0.004"/>
                </composite>
            </body>
    
        </worldbody>
    </mujoco>

    Then on the other hand using the type "2d" texture does not seem to have an obvious way to use two different files/colors on each side of the 2d grid/cloth composite.

    Let me know if this is possible or if I'm missing something obvious, thanks in advance!
     

    Attached Files: