Sunday, December 16, 2012

Baking Normals with Handplane


The more and more I bake normals for my models, the better they are turning out. Most of this has to do with understanding how the low poly, smoothing, and uv unwrapping can effect the outcome of a bake. If anyone is interested in the pages upon pages of normals discussion, check out the Who Put the Waviness in My Normal Map thread and You're Making Me Hard thread on Polycount.

Recently, I started to incorporate HandPlane into my workflow. Some of the advantages include having your normals synced to an engine, using object space info to bypass some of the errors that the low poly model can create in a normal map, and using a higher polygon model for creating more accurate normals.

Baking Process

Here I'll try to outline the steps of my current process. Please feel free to leave any comments if this seems confusing or you have questions. I'm also assuming you have an understanding of the baking process in general and XNormal. As a sidenote, this is my process and not necessarily the proper way. It's just what I found to work for me. :D
  1. Have your high poly and low poly (unwrapped) completed
    1. When unwrapping the low poly, I tend to split the UVs on hard edges in my smoothing groups and along 90 degree angles.
  2. Export the high poly as an .obj and low poly as an .obj and .fbx
  3. Import the .objs into XNormal under the high poly/low poly settings
  4. Set the low poly settings to smooth using Average Normals
  5. Go to the Tools window and click the Ray Distance Calculator
  6. Click again to have XNormal start calculating the ray distance
    1. Press stop after around 90 sec. of calculating
  7. Set your baking options and render out an Object Space normal map (uncheck tangent in the normal settings)
  8. Open Handplane and import the low poly .fbx and the Object Space normal map
  9. Set +/-Y direction if needed. Also toggle the engine you are using
  10. Press render and now you should have a tangent map with minimal errors
Baking Results

Old way of baking where I had to create a cage to avoid normal seams.  Usable results, but some errors are present.

Using the old method (cage), I generated an Object Space map and converted it to tangent using HandPlane. Immediately some of the errors disappeared, though cage distortion still present.

New way of averaging the normals instead of using a cage. Baking the Object Space and converting to tangent. Way better results with almost no distortion due to lack of cages. Also faster workflow!
Not only does this technique speed up my baking workflow, but it produces results that are synced to a specific engine. So for my case, it's a win/win situation. Hopefully others will find it useful or clarify any errors I have in my process. Also I didn't touch upon the benefit of baking using a higher polygon model. I have yet to use this technique, though check out this video for more info!