Search Unity

Creating a material w/ diffuse, spec, and normal?

Discussion in 'Editor & General Support' started by techbinge, Dec 7, 2006.

  1. techbinge

    techbinge

    Joined:
    Jul 22, 2006
    Posts:
    88
    I'm having a hard time creating a material w/ a Diffuse, spec and normal maps. I can get a normal bump w/ a spec, but then when I add a diffuse to the picture my normal ceases to exist. Is this possible?
     
  2. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    What hardware are you running on?

    In builtin Unity's shaders, base texture's RGB is the color, A is the gloss (spec) map, and normal map's RGB is the normal (A is the height if Parallax shaders are used).

    Can you do screenshots of how your material looks, and what's wrong with the rendering?
     
  3. techbinge

    techbinge

    Joined:
    Jul 22, 2006
    Posts:
    88
    sure can. Give me a few to boot over and snap a few photos. I'm sure I'm just being dumb. BTW, its running on an 0SX86 w/ Nvidia 7900GS
     
  4. techbinge

    techbinge

    Joined:
    Jul 22, 2006
    Posts:
    88
    Ok, so heres is a screenshot. I can't seem to figure ut how I'm supposed to add all three maps. I would like to use my diffuse, spec, normal, and glow (emissive) on some models as well.

    Thanks in advance!
     

    Attached Files:

  5. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    I guess running the whole thing on OSX86 might cause some issues with rendering. Tried building a web player and trying that on pure windows for example?

    How does it look without the base texture?

    About three maps: the diffuse and specular maps should be packed into a single base texture. RGB = diffuse, A = specular. Most games go that way; it's much faster to render both from a single texture, takes less memory etc. If you really want to use separate textures, it's of course possible to write a custom shader that does that (by slightly modifying the builtin BumpedSpecular one).
     
  6. techbinge

    techbinge

    Joined:
    Jul 22, 2006
    Posts:
    88
    Thats what I was missing, spec in the alpha channel. Really, the only reason I wanted to know if I could use a separate map was because I wanted to have my spec level map in the alpha channel of the diffuse and then have my spec color map in a different channel. Just glad I could get the spec map to work. Thanks again!