Uploaded by Bradley Dean

Normal-Mapping-101

advertisement
Normal Mapping 101 – Common Misconceptions
Nicholas Etheridge
This is not a normal map tutorial. It will not tell you how to bake a normal map
using a 3D app (there are plenty of tutorials for that), but it will highlight some
common misunderstandings that some beginner to intermediate users have,
often spreading them around as fact.
1. (The most common misconception) “My low poly mesh has to have just
1 smooth group (soft edges) to work with a normal map!”
It is indeed best to have as many soft edges as possible, but you certainly don’t
have to have them all smooth. Like most modelling, an edge of a 90 degree
angle or more, generally should be a hard edge. This is to avoid weird
smoothing/lighting errors.
Above shows a low poly mesh with all 1 smooth group that will be normal
mapped using the high poly mesh next to it. Below on the left is the result
rendered in 3D S Max. It looks like it did a good job, but when you view the
model in the real-time viewport in the image on the right, you can see some very
iffy lighting issues. This is because the smoothing groups have “distorted” the
normals around the mesh, and you can see this in the normal map. Most, if not
all game engines, will show something similar to the image on the right, so hard
edges are required.
“Distorted normal map”
“But when the edges are hard, I get nasty
black lines on my model!”
When you have hard edges in your low poly,
you need to separate the edges in the UV
unwrap. That way you get a clean normal
map and a clean mesh ☺. See below.
2. “Meshes with normal maps cannot be mirrored/flipped” Yes and No, see
the NOTE at the end of this section.
I know many people who have wasted a lot of UV space simply because they
think they cannot flip or mirror a mesh with a normal map. Here is a rather happy
high poly mesh that will be normal mapped onto HALF a low poly mesh. (really
you only need half the high poly as well.)
When the mesh is flipped it looks something like this below, which is clearly
wrong. What you need to do is attach both sides as the same object but NOT the
same element. I.e don’t weld the verts, or you’ll get something like the image in
the right. Sometimes having it as a completely separate object works. E.G.
Unreal 3.
There’s the mesh working and normal map, proving it works.
NOTE: Flipping normal mapped meshes like this does not work on ALL game
engines. Before starting a large project you should check if this method works in
the game engine you want to use. Some engines will give you flipped normals
and some may look ok but have slightly iffy lighting. As far as I know, Max and
Maya are fine with this. It also works ok with Unreal 3, but can sometimes have
some lighting issues (can be solved by having the meshes as completely
separate objects. I haven’t tested it in Marmoset fully yet. If anyone knows any
other engines in which this does work, please let me know.
If you really want to save a lot of texture
space you could do something like this cube,
which was made from just 1 normal mapped
face and duplicated. This kind of thing works
well with cylinders that don’t mind repetition.
E.G. If you have an 8 sided table leg you
could just texture 1 side and duplicate 8
times.
Remember, splitting UV’s and having hard
edges increases memory usage on you
mesh. However, it can save a lot of texture
space so I consider it worthwhile in the long
run.
3. “Normal maps won’t show up well without specularity” or “You can’t see
any specularity without normal maps”
These statements aren’t true, although normal and specular maps do help each
other come through more. A more accurate statement would be:
“Normal or Specular maps don’t show up when there isn’t any lighting
information”
Since even the Wii has a lighting system it’s not really a problem. The lion in the
middle has no specularity at all, but as you can see the normal map is doing just
fine. The one on the right shows a normal and specular map, and you can see
that the specular maps does help push those normals a bit further, and define the
material more. Generally a normal map will help the specularity when there are
curved surfaces and the low poly doesn’t have those curves.
4. “The high poly needs to be all 1 solid mesh” or “The low poly needs to
be all 1 solid mesh”
Often you can make a complex normal map using simple high poly shapes. They
do not need to be welded together, this is what many people call “Floating
Geometry”. Below shows a high poly mesh with green floating geometry and the
normal mapped low poly.
4b. “But I can’t use floating geometry for parts that go inwards; I have to
cut into the high poly”
The beauty of normal maps is that it is a texture so it can be edited in many
ways. For example you can flip the red and green channels in photoshop to
change the direction of the normals. So the circular ring coming out of the object
is now a ring dipping into the object!
5. “A low poly mesh needs to follow the high poly mesh very closely.”
Generally you do want your 2 meshes to be very similar. But the point of a
normal map is that it creates detail that isn’t in the low poly mesh. It all really
depends on how many polygons you want to use, but you may be surprised at
how much you can fake with a normal map. While this is true, you can’t do
everything with a normal map. For example you can’t get away with modelling in
grooves with 90 degree angles as the bake just wont pick them up.
6. “I’ve baked the high poly onto the low poly mesh, my normal map is now
finished”
Aside from errors you may get that need fixing in Photoshop, there’s a lot more
you can do to a normal map to make it much better. Unless you’re using millions
of polygons in Zbrush, it’s very hard to produce small surface details in geometry.
Programs like Crazybump or Nvidias photoshop plugin are a great way to add
small surface details without having to model them. Here I’ve drawn a simple
black and white image and plugged it into Crazybump. I’ve added the normal
map produced to a previous example. You can also add surface detail like rusty
metal, rough stone etc. using photos.
7. “My normal map just isn’t working properly! ”
Here are some common reasons why your normal map looks weird or doesn’t
seem to be working.
Make sure your normal map is plugged into the normal bump channel in your
material editor. For Max it means adding a Normal Bump to the bump channel,
then add your bitmap to the Normal Bump. Often people plug their bitmap
straight into the Bump which should only be used for a greyscale bump map.
(Also make sure the value is set to 100)
For Maya make sure your bump2d node is set to Tangent Space Normals.
If your model still looks iffy you may need to flip the red or green channels in
Photoshop. Different 3D apps bake normal maps slightly differently so if you’re
bringing a model from 1 program to another you need to check this. Same with
game engines.
Lastly, make sure the smooth groups on a model stay the same. You can’t
change them after you’ve baked a normal map otherwise you will get lighting
issues or black lines.
8. “Normal maps are the best thing evaaa!”
OK I don’t think I’ve heard anyone say that except myself ☺. Normal maps are
indeed very useful, but there not the only thing in your arsenal to make great
materials. Remember specular maps are very good in defining materials and
parallax mapping is now becoming a standard, used in most new engines
including Unreal 3. There’s also a step up from that called Relief Mapping which
is quite interesting.
That’s everything I can think of at the moment. If you have any feedback on this,
errors to point out or queries, just drop me an email.
nicholasetheridge@hotmail.com
Have fun Baking!
Mist
www.nicholasetheridge.co.uk
Download