Search Unity

Textures on objects

Discussion in 'Editor & General Support' started by xacto, Jul 31, 2005.

  1. xacto

    xacto

    Joined:
    Jul 20, 2005
    Posts:
    112
    Have a question about shaders...

    If I create a cube object within Unity and apply the "Box_red_4" Shader to it, the texture shows up. If I import a cube created in Lightwave and exported as a FBX and apply the same shader, the texture does not show up. (however the color turns red - like the texture) How do I get the texture to show up on my imported FBX object?

    Thanks!
     
  2. Richard_B

    Richard_B

    Joined:
    Jul 22, 2005
    Posts:
    436
    This usally happens if the material has lost the texture file. Click on the object which you are trying to texture (so you can see the material properties in the Inspector viewport) and the drag the texture file ( in the Project viewport ) onto the Base (RBG) swatch of the material (in the Inspector viewport).

    There is supposed to be a way of setting up the directory structure so that Unity always finds the texture file (see the manual), but it doesn't seem to work for me).

    Richard.
     
  3. xacto

    xacto

    Joined:
    Jul 20, 2005
    Posts:
    112
    I double checked my settings... looks like the texture is there and not lost. hmm..?

    Take a look of the two boxes below... the one on the left has been crated directly in Unity while the one on the right was imported. Both have the same texture.

    Now if I were to drag the "ForestFloor" texture onto both, the unity cube would show the forest texture, while the imported box would just turn green.

    Could it be something with the imported mesh?
     

    Attached Files:

  4. Richard_B

    Richard_B

    Joined:
    Jul 22, 2005
    Posts:
    436
    Was the original LW object UV - mapped?

    richard.
     
  5. xacto

    xacto

    Joined:
    Jul 20, 2005
    Posts:
    112
    No, the LW object does not have an UV map. :?

    Does that mean you can not apply a texture to an imported object without a UV map?
     
  6. Richard_B

    Richard_B

    Joined:
    Jul 22, 2005
    Posts:
    436
    As far as I know any object you want to texture has to be UV mapped. In LW just select the object and use something simple like atlas mapping to UV it.

    Richard.
     
  7. xacto

    xacto

    Joined:
    Jul 20, 2005
    Posts:
    112
    Ok, I will have to try the UV then...

    Thanks Richard for all the help! :)
     
  8. arton

    arton

    Joined:
    Jun 11, 2005
    Posts:
    38
    I've found that in C4D I had to create a material and apply an actual texture file to it before I export. If that's done, then other textures will apply to it correctly. UV mapping really is a necessity though. Otherwise the texture doesn't know how to apply itself to the mesh correctly.