Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

layered shader

Discussion in 'Shaders' started by tovesin, May 6, 2008.

  1. tovesin

    tovesin

    Joined:
    Feb 15, 2008
    Posts:
    10
    hello guys :)

    Im trying to get my 3dguy to wear a layered shader in Unity

    A shirt
    A shorts
    Socks
    skin color
    shoes

    all these in different shaders with transparency.
    (I have made PNG files in photoshop for all the texture files)

    I want it to be different shaders so that I can combine all these together in several different ways without having to make all the combinations together as one texture file. The user should be able to pick skin color and type of shirt and so on..

    Is this possible? And in that case, does anyone know how to do this?

    (I using Maya to create the FBX files)

    Thank you !!!!
     
  2. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    Why not simply use several materials on the model?
     
  3. tovesin

    tovesin

    Joined:
    Feb 15, 2008
    Posts:
    10
    Hi :)

    That is probably a good idea, but I tried to apply several materials, but It seems like I only get to add one single material?!??

    How do I apply more materials to an object?

    Thanks!! :)
     
  4. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    Make the mesh use several materials in your 3D modeling application.
     
  5. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    ... and be sure to set "One material for every material in scene file" in the import settings:
     

    Attached Files:

  6. tovesin

    tovesin

    Joined:
    Feb 15, 2008
    Posts:
    10
    Hi

    Thanks!! :)

    Im trying to figure out how to use several materials on my model in Maya. But it seems like the only option is "layered shader" or "layered texture". But after importing into Unity, it behaves like its only one material.

    Does anyone know how to add more materials to an object either in Unity or in Maya?

    I tried to add more numbers to the "size" under materials (see ref. pic under) - if this is the right way to go, what are the appropriate settings?

    transparent/diffuse? or?

    thank you so much for help people :)
     

    Attached Files:

  7. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    How many materials do you want to have on this object? You already have 4 in the object, but you've only assigned the same Unity material to all 4 object materials. You can have different Unity materials assigned to each of the different object materials (Elements 0, 1, 2, 3). If you need more object materials than this, you'll need to create them in your 3D modeling app.