Baking High-poly features into normal map [Blender]

Introduction

Welcome to this tutorial on optimizing game performance through the creation of Normal maps in blender. For the purpose of this tutorial, it is required that you have blender installed, (v. 3.0.0+ recommended) And it is also recommended that you have some basic understanding of how to program works, as shortcuts will not always be provided.

Below is the final result, which can be achieved by following this tutorial, and its associated ressources. Hope you have fun!

Final Product

Only 12 triangles!

Download Blender File:
Crate.blend (1.6 MB)

Tutorial

Part 1: Setting up

Start of your project by making a new general purpose .blend file. As always you will be greeted by the default cube, however we do not need this fella, so we will press X, and click delete to exterminate him. We can also delete the camera object, as it will not be needed.

After that has been done, we will now create a cube by using Shift + A and navigating through Mesh/Cube. Name this cube “LowPolyCube” in the navigation bar on the right side of the screen.

Now select the “UV Editing” at the top of the screen, and select the LowPolyCube. Press Tab to open editing mode, and press U > Smart UV Project to quickly unwrap this cube.

Now press Tab again to exit edit mode, and press Shift + D to duplicate LowPolyCube. Quickly succeed with a RMB click, to keep the new cube from going elsewhere. Rename the new cube object “HighPolyCube” in the navigation bar, and press the Hide button on LowPolyCube.

Your screen should now look something like this:

Part 2: Modeling

Great job! Now you are ready for the modeling of your crate. This part is largely customizeable, as it really is up to you to decide how your crate should look, but I will just be going through how i made mine here.

First of all, make sure that the HighPolyCube is selected and press RMB > Shade Smooth on it, and then enter edit mode with Tab. Go to the properties window on the leftside of your screen and select the Modifiers tab. Add two subdivision surface modifiers. Set the first one to level 2, and second to level 1. Make the top modifer a “Simple” modifier, and the bottom one a Catmull-Clark. (If you’re feeling lucky, you can put the subdiv levels higher up than that, it doesn’t really matter how highpoly it is, as we will not actually be using this mesh for the game, only a baked normal map from it)

When you’re done it should look like this:

Now, go back to your mesh and select one of the faces. Press I > "0.2" to insert a face, and then press E > "-0.1" to extrude the face inwards. Repeat these steps for all 6 faces of the HighPolyCube.

When you are done with that, Select all the inserted faces, and scale them ever so slightly together. (0.95 should do) Now, we need to add some extra details to the faces.

From two sides, make 6 loopcuts through the mesh with CTRL + R + ScrollWheel and press RMB to lock them in place. Now select every second face around the cube in the inserted faces, and use RMB > Extrude Faces Along Normals to extrude them all -0.05 inwards. For the Top and bottom face, we will select the faces in a gridlike fashion, and extrude them 0.05 upwards.

See below for reference:

Now it is time to complete the industrial look by adding some bolts to the side of the crate.

First, we need to model the Bolt. Exit edit mode with tab and press Shift + A > Mesh/Cylinder to add a cylinder. Quickly before you place it, change the “Verticies” property in the “Add Cylinder” menu that will pop up, to 6. Place the shape down and rotate it 90 degrees with R > Y + 90. Shade it smooth. Now enter edit mode again while having the cylinder selected. And G > X + 1 move it along the X axis a bit. Scale it down a bit, S > 0.05 and a bit more on the X axis (S > X + 0.5) and Grab it -0.9 along the Y axis to where it needs to be on the rim of the crate.

Now select the front face of the Bolt, and Insert a face scaled down about 0.01. Extrude this face -0.015 inwards, and scale it down a bit (0.8). Now move the Bolt -.85 downwards, and you should have something that looks like this:

Good job! Now it’s time to add some modifiers. Go back to the modifiers tab on the right side, while having the bolt selected. Add the following modifiers:

  • Bevel modifier, with amount set to 0.002 m
  • Array modifier, with count set to 6, and Relative Offset set to XYZ: (-4, 0, 0)
  • Mirror modifier, with Axis X and Y selected. Change mirror object to “HighPolyCube”

Now lets go crazy with these Bolts! Apply all modifiers with Ctrl + A, and select the Bolt Set. Click RMB > Set Origin > Origin to Geometry on the bolts, and press Shift + D to duplicate the set. Rotate it along the Z axis 90 degrees. Now duplicate the first one once more, and rotate it 90 degrees along the Y axis. Select all 3 and press Ctrl + J to join them all into one object. Your finished HighPolyCube should now look like this :smiley:

Part 3: Baking

Now comes the fun part! Go into the shading tab in the top of your screen. Reenable the visibility of your LowPolyCube, and create a new material for it. Press Shift + A > (Search) Image Texture and Shift + A > (Search) Normal Map Select the Image texture, and press the plus, to create a new texture. Name the texture “NormalMap”. Now Click and connect the nodes like below. Make sure by the end, that the image texture is selected!

Now go back to Layout, and select the three objects (Bolts, HighPolyCube and LowPolyCube) Make SURE that LowPolyCube is selected LAST, so it will remain the currently active object.

Go into Scene Rendersettings on the right side panel, and change the rendering engine to Cycles (GPU). It might also be a good idea to turn down the sample amount to something like 300, so it wont take ages. Scroll down to the dropdown called “Bake”, and change Bake type to “Normal”. Change Space to “Object”, and check “Selected to active”. Click the Selected to active dropdown, and change the “Extrusion” to 1. Now press the big “Bake” button, and let the magic happen.

Once this has been done, go to the UV editing tab, and click Image > Save and save it somewhere on your computer. This is so you dont lose it :slight_smile:

Go back to the Shading tab, and on the Image Texture node, change the Color Space to Non-Color. At this point, you can also delete the Bolt and HighPolyCube object, if everything worked out, and you don’t plan on saving them.

Now your Crate is ready for some cool renders in blender, or to be exported to roblox studio using Surface apperance.

image

Key takeaway

Use Blender baked normal maps to include a higher level of details in your models, that would otherwise exceed the 10k triangel limitation.

Hope you found this useful :smiley:

Be sure to post your crate / other things you have used baking normal maps for, in your roblox game below!

time was spent on this :woozy_face:

14 Likes

Very usually you should make the raw shape of the low-poly version the base of the high-poly one overlapping eachother else it will look a goofy. There will be some extra geometry but if youre not going to spam the same model like 1000 times theres not that much of an issue, specially if the player is going to be close of it and it has a considerable size.

So the low-poly should look like the second image of the Part 2, but you add a bevel modifier with only 1 segment cause tecnically an edge is infinitely sharp, so it will cause some shading issues when baking. I also think that it would be better if the high-poly one had a bevel modifier instead of subdiv but with more segments so the segments will be baked at the low-poly one. The best option is to make the bevels width the same, just adding more segments.

You make the high-poly as the second image of the Part 2, add a bevel modifier with like 6-8 segments increasing or decreasing the width if you want to. For the low-poly one you duplicate the high-poly one with Shift + D, then decrease the segments to 1. With them overlapping eachother you bake it following the tutorial.

1 Like