Search Unity

Using Normal Maps

Discussion in 'Formats & External Tools' started by joacoerazo_legacy, Apr 7, 2006.

  1. joacoerazo_legacy

    joacoerazo_legacy

    Joined:
    Apr 5, 2006
    Posts:
    214
    Hi to all,

    It's dificult to use normal maps on Unity? I made them on Maya and it's relatively easy but I don't know if I need programing skills to use them on Unity.

    Sorry if this is a stupid question
     
  2. jeremyace

    jeremyace

    Joined:
    Oct 12, 2005
    Posts:
    1,661
    No programming needed. Just add one of the bumpmap shaders to your object (parallax is cool too, there is a demo that comes with unity) and add your normal map image to the required texture slot in the inspector. If you are importing a black and white hightmap that you want to use for the bump shaders, you have to change the import settings for it. What you do is right-click on your image file in the project file list, select import settings, and make sure generate bumpmap is selected. What unity will do is turn it into a normal map as it needs it. It wont actually do anything to your file, it will still be black and white.

    Hope that helps,
    -Jeremy
     
  3. bryantay

    bryantay

    Joined:
    Mar 25, 2006
    Posts:
    44
    Hi, this might be a dumb Q but what is a normal map? I've seen this referenced in the forums a few time but I'm not sure what it refers to.

    Is this different then using the UV information and textures exported from a 3D app?

    thanks
     
  4. socksy

    socksy

    Joined:
    May 21, 2005
    Posts:
    244
    A normal map is a sort of more advanced type of bump map. It's like, if you have a texture with a lot of bumps on it, normally if you move a light above the material then it will all be flat, with the shadows of the texture being lit. However, with a bump map the light only lights parts of the texture and leaves the rest as shadows - giving the effect of actual geometry when it's actually a plain surface.

    Imaging having a mesh like this that reflects light off it like this so the end result looks like this.
     
  5. bryantay

    bryantay

    Joined:
    Mar 25, 2006
    Posts:
    44
    OK.... cool, but what's the difference between a bump map and a normal map with bump.  Does a normal map act like a displacement map where it appears that the edge of the geometry has been displaced?
     
  6. socksy

    socksy

    Joined:
    May 21, 2005
    Posts:
    244
    No, a bump map is an old technique where a grey scale map was used for bumps, a normal map is when values of how the light hits each point in different directions is calculated.

    They both do exactly the same thing, except one's more calculation friendly and the other's more user friendly. Because of this, Unity will automatically convert grey scale type bump maps in to normal maps. They will also accept the normal normal maps (no pun intended) as they will be autogenerated by some modelling programs, such as ZBrush.
     
  7. bryantay

    bryantay

    Joined:
    Mar 25, 2006
    Posts:
    44
    Ah!!! (light bulb)

    I get it now... Thanks for the education.
     
  8. greenland

    greenland

    Joined:
    Oct 22, 2005
    Posts:
    205
    I had no idea unity made normal maps from bump maps. :eek:

    I am, apparently, also educated.