Tutorial: Baking Smooth Curved geo onto blocky Low geometry


We have all been there- you try to bake a smooth cylindrical object onto something little better than a box- and things get wavy and weird in your baked textures.

Fear not- in this tutorial I will show you how.

 
Fig 1.

Fig 1.

You often get geometry on your high res like that on the left- collars, cuffs and around armor plates. No matter how you try and fit your low poly model, you are never going to get a clean bake.

 
Fig.2  No fit, no how

Fig.2 No fit, no how

fig.3 Note the wavy lines on the sides and the ray misses on the top

fig.3 Note the wavy lines on the sides and the ray misses on the top

If we sit the two models snugly over each other, you can see where there will be ray misses from the top cap, and an undulating distance around the sides as the low mesh gets closer and then further away. This is what gives the wavy, messy bake. Okay… let’s fix that

 

Adding Helper Edges

fig 4.  Helper edges added

fig 4. Helper edges added

The solution is to add additional “helper” edges to your low polygon mesh just for the baking step- they are not in the final game asset. The trick is to make sure the helper edges are added after the UV unwrap- and do not disturb the UVS. As you see in the figure above, even though the low poly is now a smoother cylinder- the UVs of the cap stay hexagonal.

Let’s give it a bake and see…

Fig. 5    Bake result with helper edges

Fig. 5 Bake result with helper edges

As you can see, now we are not getting any ray misses on the cap, and the wave has all but vanished. Obviously, the mesh now fits snugly- but what happens when we switch this low poly mesh with the version without helper edges?

Fig.6  Great success!

Fig.6 Great success!

Great success. You can see the baked texture works fine with the low geo- no hugely noticeable distortion or ray misses.

Why does this work? Well, baking is simply about firing a ray from the low poly mesh to sample some data from the high poly mesh. That data is then writing to a pixel of a texture using the UV coordinates.

Here, the data is written to same place it would be on the low poly, because the UVS have not changed.

Remember- your bake mesh does not have to be identical to your in-game mesh. It just has to do the work of translating data to a texture.

 
Fig.7  The texture maps are baked to the unchanged UV space.

Fig.7 The texture maps are baked to the unchanged UV space.

If you take a look at the texture, you can see the data has been baked into the hexagonal looking space created by the UVS. It’s like the edges were never there.

If this tutorial help you out- I am super stoked! You can always help support me making more tutorials by clicking the SUPPORT ME Ko-Fi button on the bottom right. Remember- tippers make great lovers!

Stay frosty.