Baking the normals of the sculpted mesh on the low resolution one

At this point, we can transfer all the details sculpted on our high resolution meshes (the Gidiosaurus and the Armor objects) to the low resolution assets; to do this, we have to bake these details as normal maps.

Getting ready

Continue from the previous Gidiosaurus_details_sculpt.blend file:

  1. Split the 3D viewport into two windows and change the left one into a UV/Image Editor window.
  2. Go to the 11th scene layer and select the Gidiosaurus_lowres object; press the Tab key to enter Edit Mode and, if necessary, press A to select all the vertices.
  3. Go to the UV Maps subpanel under the Object Data window, click on the + icon button to add a new UV coordinates layer, rename it as UVMap_norm, and click on the camera icon to make it the active UV layer.
  4. Put the mouse pointer in the 3D viewport and press U. In the UV Mapping pop-up menu, select the Smart UV Project item; in the pop-up panel, click on the Island Margin value (default = 0.00) and set it to 0.001. Leave the other values as they are and click the big OK button at the bottom of the panel.
    Getting ready

    The UVMap_norm UV coordinates layer for the low resolution Gidiosaurus mesh

  5. Deselect all the vertices (the A key again) and zoom to the head; Shift-select the vertices of all the parts that don't actually exist in the high resolution sculpted model such as the inside of the mouth, the mouth inner rims, the tongue, the eyelids, the inside of the nostrils, the teeth, and the talons:
    Getting ready

    Selecting the low resolution mesh parts that don't have a counterpart in the high resolution sculpted mesh

  6. Go to the Vertex Groups subpanel under the Object Data window and click on the + icon button to add a new vertex group; rename it as shrinkwrap.
  7. Press Ctrl + I to invert the selection and then click on the Assign button below the vertex group list window in the Vertex Groups subpanel:
    Getting ready

    Assigning the inverted selection to the "shrinkwrap" vertex group

  8. Go out of Edit Mode and press Shift + D to duplicate the Gidiosaurus_lowres object; move the duplicate to the 4th scene layer and in the Outliner window, rename it as Gidiosaurus_for_baking.
  9. In the Outliner, enable the 3D viewport visibility of the rig; select and move the ctrl_mouth bone upward to close the Gidiosaurus's mouth and then hide the 11th scene layer.
  10. Reselect the Gidiosaurus_for_baking object and go to the Object Modifiers window; click on the Apply as Shape Key button of the Armature modifier.
  11. Go to the Shape Keys subpanel under the Object Data window to find a new shape key at the bottom of the list: Armature, with the value of 0.000.
  12. Rename the new shape key as closed_mouth and set the value to 1.000:
    Getting ready

    The closed_mouth shape key

  13. Go to the Object Modifiers window and assign a Shrinkwrap modifier to the Gidiosaurus_for_baking object; as Target, select the Gidiosaurs_detailing object and then click on the Vertex Group slot to select the shrinkwrap vertex group.

In the following screenshot, you can see the effect of the Shrinkwrap modifier on the low resolution mesh with the Subdivision Surface modifier enabled also for the 3D viewport:

Getting ready

The "shrinkwrapped" low resolution Gidiosaurus mesh

How to do it…

After this quite intensive file preparation, let's go with the baking itself:

  1. Enter Edit Mode and select all the mesh vertices; in the UV/Image Editor window, add a new 3072 x 3072 blank image and rename it as norm.
  2. Go out of Edit Mode, enable the 14th scene layer, select the Gidiosaurus_detailing object, and then Shift-select the Gidiosaurus_for_baking object.
  3. Go to the Render window, scroll the panel down and, in the Bake subpanel, check the Selected to Active item. Set Margin to 8 pixels, the Bake Mode to Normals, and the Normal Space to Tangent; click on the Bake button to start the baking:
    How to do it…

    The baked normals' image map, the two overlapping and selected objects, and the Bake subpanel

  4. Click on the Image item in the UV/Image Editor window toolbar to save the baked image as norm.png inside the texture_making folder.

How it works…

To close the mouth (to conform it to the sculpted mesh), we moved the control bone in the rig and then applied the Armature modifier as a shape key; be aware that a modifier cannot be applied to a mesh with shape keys (you get a warning message), so we had to use the Apply as Shape Key option or delete all the shape keys with drivers and redo them later. In this case, however, it wouldn't have been necessary to duplicate the Gidiosaurus low resolution mesh, but we did it anyway to keep things simpler and cleaner.

Right before the baking, a Shrinkwrap modifier has been assigned to the lowres Gidiosaurus_for_baking object, to conform its surface to the high resolution sculpted Gidiosaurus_detailing object and avoid any possible intersection between the two meshes (that would give ugly artifacts in the baked image); we used the shrinkwrap vertex group to keep the vertices that don't have a counterpart on the high resolution mesh (teeth, eyelids, inner mouth, and so on) out of the modifier influence.

As you can see in the following OpenGL screenshot, comparing the sculpted and the low res Gidiosaurus meshes, the result of the baked normals on the low resolution object is pretty good and effective:

How it works…

Comparison between the high resolution sculpted mesh and the low resolution object with the baked normal map

There's more…

As we reopen the mouth by lowering the close_mouth shape key value to 0.000 or also by simply assigning the baked normal map to the Gidiosaurus_lowres object, we see that something is wrong inside the mouth (and, actually, also on the teeth and talons): the normals have been calculated for those parts too, but they show wrong and weird artifacts because there were no counterparts to take the normals from in the sculpted high resolution mesh.

There's more…

Artifacts of the normal map in some mesh parts

The solution in this case is very simple: we must paint the areas on the baked normal map corresponding to the afflicted parts, such as the teeth, the tongue, and so on, with a flat normal color (R 0.498, G 0.498, B 1.000) to flatten and therefore erase the unwanted details.

We can do this directly in Blender, by selecting the vertices of the areas to be painted on and enabling the mask tool in the 3D viewport toolbar:

There's more…

Flattening the unwanted artifacts by painting on the normal map

Alternatively, we can do it in an external painting software program such as Gimp; in this case, just delete the vertices of the parts that you don't want to change in the mesh and export the UV layer of all the remaining parts to be used as a guide to paint.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.64.192