Hello again! As I promised months ago, I finally got some of the weapons for the VR arena game (codename: Dark Kingdom) up on the site. However, the reason for my postponing this post is due to the dreaded subject: normal mapping.
Normal mapping is the bane of many 3D artists, and I thought I would share my insight into the particular problems I encountered. I don’t claim to be an authority on normal mapping, but I have learned many things along the way.
For the past couple of years, I believed that the fewest amount of UV seams was the best way to UV unwrap a model. This view changed once I started unwrapping the weapons. I have modeled and unwrapped characters and other organic models in the past, and using the fewest UV seams is often the best approach. Yet, because I never unwrapped a hard surface model before, I was in for a surprise.
I encountered two main problems while I was unwrapping the weapons.
- 1. Hard edges
- 2. Waviness on cylinders
Let’s tackle problem #1 first. All of my models have hard edges – i.e. edges that have a 90° angle or more. When I first started baking (with everything UVed together as much as possible), I was getting blotchy areas where I had hard edges. After googling the problem, I found that I needed to not only harden my edge normals where there were hard edges (90° or more), but also I should cut the UVs where there was a hard edge and separate it from the other UV shells so that a black line wouldn’t appear on the edge. This will ensure that the normal map will not bleed from one edge into another. The following video and blog post from polycount proved invaluable in figuring out this problem.
Now let’s talk about problem #2, waviness on cylinders. I encountered waviness when I started baking the cylindrical details on the hilts, the handles, and the pommels of my swords, as well as the handle of my halberd. Waviness is basically the skewed detail/black curves that occurs when the low poly model does not have enough detail for Maya (or xNormal, etc.) to correctly bake details from the high poly model. With cylinders, this happens when the curvature of the low poly does not match up to that of the high poly. Also, if any parts on the cylinders have 90° angles, the bake can have issues since technically the high poly mesh will be slightly curved at these edges. A great way to fix this is by using the bevel tool at those 90° edges! Just make sure that your high poly and low poly meshes line up and have as little difference as possible. If you have any issues with this, I encourage you to check out the following blog post from polycount (and if you are having any other trouble with normal mapping, hit up the main forum on polycount, as they seem to hold the key to normal mapping).
Before I leave you, I have one last note. If you are texturing your model in Substance Painter, you will want to figure out whether you will be using wear on your edges, and if so, where. Substance Painter is an awesome texturing program, but if you are using generators to create edge wear, you’ll want to be mindful about your UV unwrapping. Generators use a curvature map to read where the edges are so that they can map the texture onto the edges. However, if you cut your UVs at the edges (such as the hard 90° edges of your mesh), the generator will not read curvature on an edge and you may end up with something like this:
In this case, I cut my UVs at the edge to get a better normal bake, but since I did this, the curvature map only read the curve as being on one side of the hilt. There are several ways to solve this issue. Substance Painter recommends that you keep as much of your UVs together as possible to get the most out of their program. In an Allegorithmic tutorial, they split the UVs down the middle of the mesh, to best optimize it for games and Substance Painter. However, I’ve seen other artists going about this differently, including artists at major game studios such as Naughty Dog. It occurs to me that they might be inserting an extra edge loop on the beveled edges of hard surface models and cutting the UVs on this extra edge loop in order for the curvature map to read both edges as curved, even if they are on UV shells. This is just a theory on my part though. In order to remedy the edge wear issue, I ended up painting in my own edge wear, which is slower, but it does solve the problem. If I come up with a better way to keep the normal bake clean as well as use Substance Painter to it’s full potential with edge wear, I will be sure to let you know!