Is it possible to add a png as logo?

Discussion in 'Modeling' started by Wei Ding, Jan 19, 2019.

  1. I was trying to put a logo png file to one <body> element.
    I tried to use the png file as texture, then define a material using that texture

    <texture name="test" type="2d" file="logo.png"/>
    <material name="logo" texture="test" shininess="0.8"/>

    Then in my body section, I used
    <geom type="mesh" mesh="femur_rs" material="logo" pos="-0.27 -0.012 0.05" quat="0.707 0 0.707 0" rgba="1 0.424 0.004 1" contype='0' conaffinity='0'/>

    But the logo got structured in a weird shape. Is there anyway to just put the png on a body without distortion?

    Thank you!
     
  2. Emo Todorov

    Emo Todorov Administrator Staff Member

    Define a cube map with one side being your logo and their sides empty (say all-black images). That will map nicely on a cube.

    The general solution is to define your own texture coordinates for a mesh -- then you can map textures however you want.