Book Image

Blender 3D: Characters, Machines, and Scenes for Artists

By : Enrico Valenza, Christopher Kuhn, Pierre-Armand Nicq, Romain Caudron
Book Image

Blender 3D: Characters, Machines, and Scenes for Artists

By: Enrico Valenza, Christopher Kuhn, Pierre-Armand Nicq, Romain Caudron

Overview of this book

Blender 3D is one of the top 3D animation software available. As the Blender software grows more powerful and popular, there is a demand to take your modeling skills to the next level. This learning path is divided into three modules that will take you on this incredible journey of creating games. The first module will take you on a journey to understand the workflow normally used to create characters, from the modeling to the rendering stages, using the tools of the last official release of Blender exclusively. You will be making production-quality 3D models and characters quickly and efficiently, which will be ready to be added to your very own animated feature or game. The second module will help you develop a comprehensive skill set that covers the key aspects of mechanical modeling. You will create many types of projects, including a pistol, spacecraft, robot, and a racer. By the end of this module, you will have mastered a workflow that you will be able to apply to your own creations. The final module will help you to create many types of projects using a step-by-step approach. Each project in this module will give you more practice and increase your knowledge of the Blender tools and game engine. This learning path combines some of the best that Packt has to offer in one complete, curated package. It includes content from the following Packt products: ? Blender 3D Cookbook, Second Edition by Enrico Valenza ? Blender 3D Incredible Machines, Second Edition by Christopher Kuhn ? Blender 3D By Example by Romain Caudron and Pierre-Armand Nicq
Table of Contents (5 chapters)
4
Index

Chapter 11. Refining the Textures

In this chapter, we will cover the following recipes:

  • Sculpting more details on the high resolution mesh
  • Baking the normals of the sculpted mesh on the low resolution one
  • The Armor textures
  • Adding a dirty Vertex Colors layer and baking it to an image texture
  • The Quick Edit tool

Introduction

In Chapter 10, Creating the Textures, we have prepared the color and bump texture images for the Gidiosaurus skin. In this chapter, we'll see the process for creating some additional (but equally important, nonetheless) textures, both for the character and the iron Armor.

Sculpting more details on the high resolution mesh

In Chapter 2, Sculpting the Character's Base Mesh, we sculpted the Gidiosaurus character's features, obtaining a high resolution mesh that we re-topologized in the following Chapter 4, Re-topology of the High Resolution Sculpted Character's Mesh, to have a low resolution mesh for easy rigging and texturing.

Because in the following recipe (Baking the normals of the sculpted mesh on the low resolution one) we are going to bake the normals of the sculpted mesh on the low resolution one, we should now add as much detailing and finishing to the sculpted model.

I'm not going to explain every step in detail, here, because the procedure is the same as already seen in the Chapter 2, Sculpting the Character's Base Mesh, so just a quick tour to show what I've done should be fine.

Getting ready

Let's start by preparing the file:

  1. Start Blender and load the Gidiosaurus_painting_BI.blend file; if necessary, go out of Texture Paint mode back to Object Mode and save the file as Gidiosaurus_details_sculpt.blend.
  2. Collapse all the UV/Image Editor windows on the left of the screen and then join them with the 3D viewport (put the mouse pointer on the edge of one of the two windows; as it changes into a two opposite arrows pointer, right-click and in the Area Options pop-up menu, left-select the Join Areas item; then, move the mouse pointer towards the window to be eliminated and left-click to join them).
  3. Join the Material and Texture windows in the main Properties panel, switch to the Object Data window, and enlarge the 3D viewport as much as possible.
  4. Click on the File item in the main top header and then select the Append item (or else, directly press the Shift + F1 keys); navigate to the Gidiosaurus_retopology_02.blend file, click on it, and then click on the Object item (folder) to select the Gidiosaurus item.
  5. Click on the Append from Library button on the top-right of the screen and then go to the Outliner window to click on the eye and the arrow icon buttons (Restrict view-port visibility and Restrict view-port selection) and enable both the object visibility and selection in the 3D viewport.
  6. Move the appended high resolution Gidiosaurus mesh to the 14th scene layer (M key):
    Getting ready

    The appended, sculpted Gidiosaurus mesh

  7. Press N to call the Properties sidepanel and in the Display subpanel, enable the Only Render item; go down to the Shading subpanel, enable the Matcap item, and then select your favorite matcap type (mine is always the brick red colored Zbrush-like).
  8. Enable the 12th scene layer to show the Eyes; however, in the Outliner, just to be sure, disable the selection arrow icon button.
  9. Press N again to hide the Properties sidepanel and then switch to Sculpt Mode and save the file.
    Getting ready

    The Gidiosaurus object ready for the new sculpting session

How to do it…

We are now ready to sculpt again on the Gidiosaurus mesh; first, let's do some more settings pertinent to the sculpt tools:

  1. Go to the Dyntopo subpanel under the Tool Shelf and click on the Enable Dyntopo button; set Detail Size to 1.60 px and check the Smooth Shading box.
  2. Go down to the Symmetry / Lock subpanel to be sure that Mirror is enabled for the x axis.
  3. Click on the Options tab and go to the Options subpanel to enable the Fast Navigate item (the Threaded Sculpt item should be already enabled by default).
  4. Go back to the Tools tab and click on the Brush windows; select the Crease brush (press the Shift + C or 5 keys), zoom to the Gidiosaurus's head, and start to add expression folds:
    How to do it…

    Adding expression folds with the Crease brush

  5. Move to the throat, in the Tool Shelf panel, switch the effect of the brush from Subtract to Add through the buttons at the bottom of the Brush subpanel (or simply by pressing the Ctrl key while sculpting), and add veins to the area:
    How to do it…

    Adding veins under the jaw and on the neck by using the Crease brush again, but with inverted effect

  6. By using the same technique, add veins also on the shoulders and the biceps; then, select the Polish brush (Shift + 4) and refine the elbow a bit:
    How to do it…

    Adding the veins on the arm muscles and polishing the elbow's bulging muscle

  7. By using the Clay brush (C or 3 keys) and also the Crease (Shift + C or 5 keys) and Pinch (P or Shift + 3) brushes, refine the shape and the folds of the palm and add details to the back of the fingers. The Clay brush can be used in Subtract mode too, to carve shapes:
    How to do it…

    Detailing the palm and the fingers of the hand

  8. Similarly, add details and refine the back of the foot and the sole:
    How to do it…

    Detailing the feet

  9. Use the Smooth brush (S or Shift + 7 keys) to gently soften the character's features; when you are done, save the file.
    How to do it…

    Smoothing the added features

    Now, as we have detailed the body of the Gidiosaurus, it would be a good idea to refine the Armor also.

  10. Switch to the 13th scene layer; select the Armor object and go to the Shape Keys subpanel under the Object Data window.
  11. Select the Basis shape key and then click on the icon button to delete it (this leaves the only remaining shape key, Armor_fix, as the base one, so permanently applying the morph to the mesh); then, also select the Armor_fix shape key and delete it.
  12. Repeat the previous steps for the rivets and the Armor_decorations objects as well.
  13. Through the Outliner window, Shift-select the rivets, Armor_decorations, and Armor objects; then, press Ctrl + J to join them as a single object.
  14. Go to the Vertex Groups subpanel and add a new vertex group; rename it as shrinkwrap.
  15. Enter Edit Mode and select the vertices on the outside of the armor body plates, leaving the inside faces of the plates, the bottom of the spaulders, the decorations, the rivets, and the tiers, unselected; if necessary, use the seams to help you to divide the outer from the inner parts of the mesh. Click on the Assign button at the bottom of the Vertex Groups subpanel:
    How to do it…

    Selecting the outer parts of the Armor

  16. Split the 3D view into two windows and change the left one into a UV/Image Editor window.
  17. Go to the UV Maps subpanel under the Object Data window, click on the + icon button to add a new UV coordinates layer, and rename it as UVMap_norm. Then, click on the camera icon on the right-hand side of the name to make it the active UV layer.
  18. 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 on the big OK button at the bottom of the panel.
    How to do it…

    The UVMap_norm UV coordinates layer for the Armor object

  19. Go out of Edit Mode and minimize the UV/Image Editor window as much as possible; press Shift + D to duplicate the Armor object and move the duplicated one to the 3rd scene layer.
  20. Enable the 3rd scene layer; go to the Object Modifiers window and delete the Armature and the Subdivision Surface modifiers; in the Outliner, rename the new object (now Armor.001) as Armor_detailing.
  21. Assign a Multiresolution modifier. Click on the Subdivide button until it reaches level 3; then, check the Optimal Display item and go in Sculpt Mode. Using the same procedure as before, add scrapes, bumps, deformations, and so on, to the armor surface; add some kind of engraving also, for example, on the groinguard.
    How to do it…

    Sculpting the Armor_detailing object

  22. Save the file.

Getting ready

Let's start by preparing the file:

  1. Start Blender and load the Gidiosaurus_painting_BI.blend file; if necessary, go out of Texture Paint mode back to Object Mode and save the file as Gidiosaurus_details_sculpt.blend.
  2. Collapse all the UV/Image Editor windows on the left of the screen and then join them with the 3D viewport (put the mouse pointer on the edge of one of the two windows; as it changes into a two opposite arrows pointer, right-click and in the Area Options pop-up menu, left-select the Join Areas item; then, move the mouse pointer towards the window to be eliminated and left-click to join them).
  3. Join the Material and Texture windows in the main Properties panel, switch to the Object Data window, and enlarge the 3D viewport as much as possible.
  4. Click on the File item in the main top header and then select the Append item (or else, directly press the Shift + F1 keys); navigate to the Gidiosaurus_retopology_02.blend file, click on it, and then click on the Object item (folder) to select the Gidiosaurus item.
  5. Click on the Append from Library button on the top-right of the screen and then go to the Outliner window to click on the eye and the arrow icon buttons (Restrict view-port visibility and Restrict view-port selection) and enable both the object visibility and selection in the 3D viewport.
  6. Move the appended high resolution Gidiosaurus mesh to the 14th scene layer (M key):
    Getting ready

    The appended, sculpted Gidiosaurus mesh

  7. Press N to call the Properties sidepanel and in the Display subpanel, enable the Only Render item; go down to the Shading subpanel, enable the Matcap item, and then select your favorite matcap type (mine is always the brick red colored Zbrush-like).
  8. Enable the 12th scene layer to show the Eyes; however, in the Outliner, just to be sure, disable the selection arrow icon button.
  9. Press N again to hide the Properties sidepanel and then switch to Sculpt Mode and save the file.
    Getting ready

    The Gidiosaurus object ready for the new sculpting session

How to do it…

We are now ready to sculpt again on the Gidiosaurus mesh; first, let's do some more settings pertinent to the sculpt tools:

  1. Go to the Dyntopo subpanel under the Tool Shelf and click on the Enable Dyntopo button; set Detail Size to 1.60 px and check the Smooth Shading box.
  2. Go down to the Symmetry / Lock subpanel to be sure that Mirror is enabled for the x axis.
  3. Click on the Options tab and go to the Options subpanel to enable the Fast Navigate item (the Threaded Sculpt item should be already enabled by default).
  4. Go back to the Tools tab and click on the Brush windows; select the Crease brush (press the Shift + C or 5 keys), zoom to the Gidiosaurus's head, and start to add expression folds:
    How to do it…

    Adding expression folds with the Crease brush

  5. Move to the throat, in the Tool Shelf panel, switch the effect of the brush from Subtract to Add through the buttons at the bottom of the Brush subpanel (or simply by pressing the Ctrl key while sculpting), and add veins to the area:
    How to do it…

    Adding veins under the jaw and on the neck by using the Crease brush again, but with inverted effect

  6. By using the same technique, add veins also on the shoulders and the biceps; then, select the Polish brush (Shift + 4) and refine the elbow a bit:
    How to do it…

    Adding the veins on the arm muscles and polishing the elbow's bulging muscle

  7. By using the Clay brush (C or 3 keys) and also the Crease (Shift + C or 5 keys) and Pinch (P or Shift + 3) brushes, refine the shape and the folds of the palm and add details to the back of the fingers. The Clay brush can be used in Subtract mode too, to carve shapes:
    How to do it…

    Detailing the palm and the fingers of the hand

  8. Similarly, add details and refine the back of the foot and the sole:
    How to do it…

    Detailing the feet

  9. Use the Smooth brush (S or Shift + 7 keys) to gently soften the character's features; when you are done, save the file.
    How to do it…

    Smoothing the added features

    Now, as we have detailed the body of the Gidiosaurus, it would be a good idea to refine the Armor also.

  10. Switch to the 13th scene layer; select the Armor object and go to the Shape Keys subpanel under the Object Data window.
  11. Select the Basis shape key and then click on the icon button to delete it (this leaves the only remaining shape key, Armor_fix, as the base one, so permanently applying the morph to the mesh); then, also select the Armor_fix shape key and delete it.
  12. Repeat the previous steps for the rivets and the Armor_decorations objects as well.
  13. Through the Outliner window, Shift-select the rivets, Armor_decorations, and Armor objects; then, press Ctrl + J to join them as a single object.
  14. Go to the Vertex Groups subpanel and add a new vertex group; rename it as shrinkwrap.
  15. Enter Edit Mode and select the vertices on the outside of the armor body plates, leaving the inside faces of the plates, the bottom of the spaulders, the decorations, the rivets, and the tiers, unselected; if necessary, use the seams to help you to divide the outer from the inner parts of the mesh. Click on the Assign button at the bottom of the Vertex Groups subpanel:
    How to do it…

    Selecting the outer parts of the Armor

  16. Split the 3D view into two windows and change the left one into a UV/Image Editor window.
  17. Go to the UV Maps subpanel under the Object Data window, click on the + icon button to add a new UV coordinates layer, and rename it as UVMap_norm. Then, click on the camera icon on the right-hand side of the name to make it the active UV layer.
  18. 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 on the big OK button at the bottom of the panel.
    How to do it…

    The UVMap_norm UV coordinates layer for the Armor object

  19. Go out of Edit Mode and minimize the UV/Image Editor window as much as possible; press Shift + D to duplicate the Armor object and move the duplicated one to the 3rd scene layer.
  20. Enable the 3rd scene layer; go to the Object Modifiers window and delete the Armature and the Subdivision Surface modifiers; in the Outliner, rename the new object (now Armor.001) as Armor_detailing.
  21. Assign a Multiresolution modifier. Click on the Subdivide button until it reaches level 3; then, check the Optimal Display item and go in Sculpt Mode. Using the same procedure as before, add scrapes, bumps, deformations, and so on, to the armor surface; add some kind of engraving also, for example, on the groinguard.
    How to do it…

    Sculpting the Armor_detailing object

  22. Save the file.

How to do it…

We are now ready to sculpt again on the Gidiosaurus mesh; first, let's do some more settings pertinent to the sculpt tools:

  1. Go to the Dyntopo subpanel under the Tool Shelf and click on the Enable Dyntopo button; set Detail Size to 1.60 px and check the Smooth Shading box.
  2. Go down to the Symmetry / Lock subpanel to be sure that Mirror is enabled for the x axis.
  3. Click on the Options tab and go to the Options subpanel to enable the Fast Navigate item (the Threaded Sculpt item should be already enabled by default).
  4. Go back to the Tools tab and click on the Brush windows; select the Crease brush (press the Shift + C or 5 keys), zoom to the Gidiosaurus's head, and start to add expression folds:
    How to do it…

    Adding expression folds with the Crease brush

  5. Move to the throat, in the Tool Shelf panel, switch the effect of the brush from Subtract to Add through the buttons at the bottom of the Brush subpanel (or simply by pressing the Ctrl key while sculpting), and add veins to the area:
    How to do it…

    Adding veins under the jaw and on the neck by using the Crease brush again, but with inverted effect

  6. By using the same technique, add veins also on the shoulders and the biceps; then, select the Polish brush (Shift + 4) and refine the elbow a bit:
    How to do it…

    Adding the veins on the arm muscles and polishing the elbow's bulging muscle

  7. By using the Clay brush (C or 3 keys) and also the Crease (Shift + C or 5 keys) and Pinch (P or Shift + 3) brushes, refine the shape and the folds of the palm and add details to the back of the fingers. The Clay brush can be used in Subtract mode too, to carve shapes:
    How to do it…

    Detailing the palm and the fingers of the hand

  8. Similarly, add details and refine the back of the foot and the sole:
    How to do it…

    Detailing the feet

  9. Use the Smooth brush (S or Shift + 7 keys) to gently soften the character's features; when you are done, save the file.
    How to do it…

    Smoothing the added features

    Now, as we have detailed the body of the Gidiosaurus, it would be a good idea to refine the Armor also.

  10. Switch to the 13th scene layer; select the Armor object and go to the Shape Keys subpanel under the Object Data window.
  11. Select the Basis shape key and then click on the icon button to delete it (this leaves the only remaining shape key, Armor_fix, as the base one, so permanently applying the morph to the mesh); then, also select the Armor_fix shape key and delete it.
  12. Repeat the previous steps for the rivets and the Armor_decorations objects as well.
  13. Through the Outliner window, Shift-select the rivets, Armor_decorations, and Armor objects; then, press Ctrl + J to join them as a single object.
  14. Go to the Vertex Groups subpanel and add a new vertex group; rename it as shrinkwrap.
  15. Enter Edit Mode and select the vertices on the outside of the armor body plates, leaving the inside faces of the plates, the bottom of the spaulders, the decorations, the rivets, and the tiers, unselected; if necessary, use the seams to help you to divide the outer from the inner parts of the mesh. Click on the Assign button at the bottom of the Vertex Groups subpanel:
    How to do it…

    Selecting the outer parts of the Armor

  16. Split the 3D view into two windows and change the left one into a UV/Image Editor window.
  17. Go to the UV Maps subpanel under the Object Data window, click on the + icon button to add a new UV coordinates layer, and rename it as UVMap_norm. Then, click on the camera icon on the right-hand side of the name to make it the active UV layer.
  18. 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 on the big OK button at the bottom of the panel.
    How to do it…

    The UVMap_norm UV coordinates layer for the Armor object

  19. Go out of Edit Mode and minimize the UV/Image Editor window as much as possible; press Shift + D to duplicate the Armor object and move the duplicated one to the 3rd scene layer.
  20. Enable the 3rd scene layer; go to the Object Modifiers window and delete the Armature and the Subdivision Surface modifiers; in the Outliner, rename the new object (now Armor.001) as Armor_detailing.
  21. Assign a Multiresolution modifier. Click on the Subdivide button until it reaches level 3; then, check the Optimal Display item and go in Sculpt Mode. Using the same procedure as before, add scrapes, bumps, deformations, and so on, to the armor surface; add some kind of engraving also, for example, on the groinguard.
    How to do it…

    Sculpting the Armor_detailing object

  22. Save the file.

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.

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.

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.

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.

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.

The Armor textures

The same procedure used in the previous recipe must be used for the Armor object, to bake the normals of the sculpted high resolution version on the low poly one.

Getting ready

So, in short, we will do the following:

  1. Enable the 13th scene layer; select the Armor object and go to the Object Modifiers window.
  2. Temporarily, disable the Armature modifier both for rendering, and the viewport, and be sure that the Subdivision Surface modifier levels are both set to 2.
  3. Assign a Shrinkwrap modifier with a target to the Armor_detailing object; in the Vertex Group slot, select the shrinkwrap vertex group and, just to be sure, also check the Keep Above Surface item.

Also, in this case, thanks to the shrinkwrap vertex group, only the outside of the armor mesh is conformed to the sculpted mesh; the insides are not important and can even be deleted (only for the baking and, of course, on a duplicated armor object, as we did with the Gidiosaurus_for_baking object). In any case, they will be barely visible.

Getting ready

The Armor object prepared for the baking

How to do it…

Let's now bake the sculpted geometry in a few steps:

  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 norm2.
  2. Go out of Edit Mode, enable the 3rd scene layer and select the Armor_detailing object, and then Shift-select the Armor object.
  3. Go to the Render window, scroll the panel down; in the Bake subpanel, check the Selected to Active item, and set the Margin to 8 pixels, the Bake Mode to Normals, and the Normal Space to Tangent. Then, click on the Bake button.
  4. Click on the Image item on the UV/Image Editor window toolbar to save the baked image as norm2.png, inside the texture_making folder.
  5. Save the file as Gidiosaurus_baking_normals.blend.

In the following OpenGL screenshot, you can see the comparison between the sculpted and the low resolution Armor objects with the assigned normal map:

How to do it…

A comparison between the sculpted and the normal map versions of the Armor

There's more…

Inside the texture_making folder provided with this cookbook, there is also an already seamless iron_tiles.png image to be used for the Armor; it has been made seamless in Gimp, but after the mapping on the model, we'll need to fix some visible seams again by using the Clone brush of the Blender Paint Tool.

I won't go through all the required steps here, because this would be a repetition of recipes already explained in Chapter 10, Creating the Textures.

Note

Just remember that all we have to do is to bake the seamless iron_tiles.png image, which is mapped on the UVMap_rust coordinates layer, on the UDIM UVMap coordinates layer; in this case, shared into two tiles spaces and then fix the visible seams on the baked images.

So, we have to add two materials to the Armor object; each one with its own image texture and assigned to the vertices corresponding to each tile, and then also add the iron_tiles.png image to each affected material.

In short, we have to replicate the steps of the Preparing the model to use the UDIM UV tiles, Baking the tileable scales texture into the UV tiles, and Painting to fix the seams and to modify the baked scales image maps recipes from Chapter 10, Creating the Textures.

To use the Clone brush (press the 1 key to call it after entering Texture Paint mode), press Ctrl + left-click on the area of the mesh you want to clone from; this will place the 3D Cursor in that location. Then, left-click on the seams to clone the texture from the area under the 3D Cursor:

There's more…

The Clone brush is cloning the texture area at the 3D Cursor location

Besides the Clone brush, in this case, it is also possible to fix the seams with the Smear brush (4 key).

When you are done, save the two iron images as iron_U0V0.png and iron_U1V0.png inside the texture folder.

See also

Be aware that the first following link is for Blender version 2.6 (seems there is very little official documentation for version 2.7 at the moment), and a few things in the Paint Tool have changed; in any case, I think it can still be an interesting reading:

Getting ready

So, in short, we will do the following:

  1. Enable the 13th scene layer; select the Armor object and go to the Object Modifiers window.
  2. Temporarily, disable the Armature modifier both for rendering, and the viewport, and be sure that the Subdivision Surface modifier levels are both set to 2.
  3. Assign a Shrinkwrap modifier with a target to the Armor_detailing object; in the Vertex Group slot, select the shrinkwrap vertex group and, just to be sure, also check the Keep Above Surface item.

Also, in this case, thanks to the shrinkwrap vertex group, only the outside of the armor mesh is conformed to the sculpted mesh; the insides are not important and can even be deleted (only for the baking and, of course, on a duplicated armor object, as we did with the Gidiosaurus_for_baking object). In any case, they will be barely visible.

Getting ready

The Armor object prepared for the baking

How to do it…

Let's now bake the sculpted geometry in a few steps:

  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 norm2.
  2. Go out of Edit Mode, enable the 3rd scene layer and select the Armor_detailing object, and then Shift-select the Armor object.
  3. Go to the Render window, scroll the panel down; in the Bake subpanel, check the Selected to Active item, and set the Margin to 8 pixels, the Bake Mode to Normals, and the Normal Space to Tangent. Then, click on the Bake button.
  4. Click on the Image item on the UV/Image Editor window toolbar to save the baked image as norm2.png, inside the texture_making folder.
  5. Save the file as Gidiosaurus_baking_normals.blend.

In the following OpenGL screenshot, you can see the comparison between the sculpted and the low resolution Armor objects with the assigned normal map:

How to do it…

A comparison between the sculpted and the normal map versions of the Armor

There's more…

Inside the texture_making folder provided with this cookbook, there is also an already seamless iron_tiles.png image to be used for the Armor; it has been made seamless in Gimp, but after the mapping on the model, we'll need to fix some visible seams again by using the Clone brush of the Blender Paint Tool.

I won't go through all the required steps here, because this would be a repetition of recipes already explained in Chapter 10, Creating the Textures.

Note

Just remember that all we have to do is to bake the seamless iron_tiles.png image, which is mapped on the UVMap_rust coordinates layer, on the UDIM UVMap coordinates layer; in this case, shared into two tiles spaces and then fix the visible seams on the baked images.

So, we have to add two materials to the Armor object; each one with its own image texture and assigned to the vertices corresponding to each tile, and then also add the iron_tiles.png image to each affected material.

In short, we have to replicate the steps of the Preparing the model to use the UDIM UV tiles, Baking the tileable scales texture into the UV tiles, and Painting to fix the seams and to modify the baked scales image maps recipes from Chapter 10, Creating the Textures.

To use the Clone brush (press the 1 key to call it after entering Texture Paint mode), press Ctrl + left-click on the area of the mesh you want to clone from; this will place the 3D Cursor in that location. Then, left-click on the seams to clone the texture from the area under the 3D Cursor:

There's more…

The Clone brush is cloning the texture area at the 3D Cursor location

Besides the Clone brush, in this case, it is also possible to fix the seams with the Smear brush (4 key).

When you are done, save the two iron images as iron_U0V0.png and iron_U1V0.png inside the texture folder.

See also

Be aware that the first following link is for Blender version 2.6 (seems there is very little official documentation for version 2.7 at the moment), and a few things in the Paint Tool have changed; in any case, I think it can still be an interesting reading:

How to do it…

Let's now bake the sculpted geometry in a few steps:

  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 norm2.
  2. Go out of Edit Mode, enable the 3rd scene layer and select the Armor_detailing object, and then Shift-select the Armor object.
  3. Go to the Render window, scroll the panel down; in the Bake subpanel, check the Selected to Active item, and set the Margin to 8 pixels, the Bake Mode to Normals, and the Normal Space to Tangent. Then, click on the Bake button.
  4. Click on the Image item on the UV/Image Editor window toolbar to save the baked image as norm2.png, inside the texture_making folder.
  5. Save the file as Gidiosaurus_baking_normals.blend.

In the following OpenGL screenshot, you can see the comparison between the sculpted and the low resolution Armor objects with the assigned normal map:

How to do it…

A comparison between the sculpted and the normal map versions of the Armor

There's more…

Inside the texture_making folder provided with this cookbook, there is also an already seamless iron_tiles.png image to be used for the Armor; it has been made seamless in Gimp, but after the mapping on the model, we'll need to fix some visible seams again by using the Clone brush of the Blender Paint Tool.

I won't go through all the required steps here, because this would be a repetition of recipes already explained in Chapter 10, Creating the Textures.

Note

Just remember that all we have to do is to bake the seamless iron_tiles.png image, which is mapped on the UVMap_rust coordinates layer, on the UDIM UVMap coordinates layer; in this case, shared into two tiles spaces and then fix the visible seams on the baked images.

So, we have to add two materials to the Armor object; each one with its own image texture and assigned to the vertices corresponding to each tile, and then also add the iron_tiles.png image to each affected material.

In short, we have to replicate the steps of the Preparing the model to use the UDIM UV tiles, Baking the tileable scales texture into the UV tiles, and Painting to fix the seams and to modify the baked scales image maps recipes from Chapter 10, Creating the Textures.

To use the Clone brush (press the 1 key to call it after entering Texture Paint mode), press Ctrl + left-click on the area of the mesh you want to clone from; this will place the 3D Cursor in that location. Then, left-click on the seams to clone the texture from the area under the 3D Cursor:

There's more…

The Clone brush is cloning the texture area at the 3D Cursor location

Besides the Clone brush, in this case, it is also possible to fix the seams with the Smear brush (4 key).

When you are done, save the two iron images as iron_U0V0.png and iron_U1V0.png inside the texture folder.

See also

Be aware that the first following link is for Blender version 2.6 (seems there is very little official documentation for version 2.7 at the moment), and a few things in the Paint Tool have changed; in any case, I think it can still be an interesting reading:

There's more…

Inside the texture_making folder provided with this cookbook, there is also an already seamless iron_tiles.png image to be used for the Armor; it has been made seamless in Gimp, but after the mapping on the model, we'll need to fix some visible seams again by using the Clone brush of the Blender Paint Tool.

I won't go through all the required steps here, because this would be a repetition of recipes already explained in Chapter 10, Creating the Textures.

Note

Just remember that all we have to do is to bake the seamless iron_tiles.png image, which is mapped on the UVMap_rust coordinates layer, on the UDIM UVMap coordinates layer; in this case, shared into two tiles spaces and then fix the visible seams on the baked images.

So, we have to add two materials to the Armor object; each one with its own image texture and assigned to the vertices corresponding to each tile, and then also add the iron_tiles.png image to each affected material.

In short, we have to replicate the steps of the Preparing the model to use the UDIM UV tiles, Baking the tileable scales texture into the UV tiles, and Painting to fix the seams and to modify the baked scales image maps recipes from Chapter 10, Creating the Textures.

To use the Clone brush (press the 1 key to call it after entering Texture Paint mode), press Ctrl + left-click on the area of the mesh you want to clone from; this will place the 3D Cursor in that location. Then, left-click on the seams to clone the texture from the area under the 3D Cursor:

There's more…

The Clone brush is cloning the texture area at the 3D Cursor location

Besides the Clone brush, in this case, it is also possible to fix the seams with the Smear brush (4 key).

When you are done, save the two iron images as iron_U0V0.png and iron_U1V0.png inside the texture folder.

See also

Be aware that the first following link is for Blender version 2.6 (seems there is very little official documentation for version 2.7 at the moment), and a few things in the Paint Tool have changed; in any case, I think it can still be an interesting reading:

See also

Be aware that the first following link is for Blender version 2.6 (seems there is very little official documentation for version 2.7 at the moment), and a few things in the Paint Tool have changed; in any case, I think it can still be an interesting reading:

Adding a dirty Vertex Colors layer and baking it to an image texture

Let's see now how to add a dirty map through the Vertex Colors tool and how to bake it to an image texture; such a texture map can be useful for the creation of the shaders (which we'll see in the next chapter).

Getting ready

To do this, we are going to use an already set .blend file:

  1. Start Blender and open the Gidiosaurus_baking_normals.blend file; save it as Gidiosaurus_baking_dirty.blend.
  2. Put the mouse pointer in the 3D view and press the Z key twice to switch into Solid viewport shading mode; click on the 14th scene layer to enable the visibility of the Gidiosaurus_detailing object.

How to do it…

Let's first go with the creation of the Vertex Colors layer:

  1. In the Outliner, select the Gidiosaurus_detailing object and then click on the mode button in the 3D viewport toolbar to select the Vertex Paint mode:
    How to do it…

    Selecting the Vertex Paint mode item

  2. Now, click on the Paint item in the 3D viewport toolbar and from the menu, select the Dirty Vertex Colors item; the Gidiosaurus mesh, first filled with a plain white color, gets shaded in grayscale tones:
    How to do it…

    Using the Dirty Vertex Colors tool

  3. Expand the last operation panel at the bottom of the Tool Shelf and press Ctrl+click on the Dirt Angle slot to enter the value 90°; the grayscale shading on the mesh gets a lot more darker and contrasted:
    How to do it…

    Tweaking the settings for the Dirty Vertex Colors tool

  4. Go back in Object Mode and then move to the Material window, where the Body material is already assigned to the high resolution mesh. Scroll down the panel to reach the Shading subpanel and enable the Shadeless item; then, reach down the Options subpanel and enable the Vertex Color Paint item:
    How to do it…

    The Shadeless and the Vertex Color Paint items

    To understand the effect of the items we enabled in the Material window, just switch to the Rendered viewport shading mode; the mesh surface is self-illuminating and showing the dirty Vertex Colors layer:

    How to do it…

    The Dirty Vertex Colors layer visualized in the Rendered preview

    Note that the Shadeless item is not actually mandatory for the baking, but is only required to see the object in the Rendered viewport shading mode as in the previous screenshot.

  5. Also, enable the 4th scene layer (Shift+left-click) and in the Outliner window, select the Gidiosaurus_for_baking object. Go to the Object Data window to be sure that the UVMap_norm layer is the active one and then go to the Render window and scroll down to the bottom, to the Bake subpanel; click on the Bake Mode slot to select the Textures item from the pop-up menu:
    How to do it…

    Baking the Dirty Vertex Colors layer to Textures

  6. With the Gidiosaurus_for_baking object still selected, enter Edit Mode and select all the vertices; in the UV/Image Editor window, add a new 3072 x 3072 blank image renamed as vcol.
  7. Go out of Edit Mode and in the Outliner, select the Gidiosaurus_detailing object; then, Shift-select the Gidiosaurus_for_baking object and go to the Bake subpanel under the Render window to click on the Bake button:
    How to do it…

    The final baked "vcol.png" image map

  8. Save the baked image as vcol.png into the texture_making folder.
  9. Enable the 3rd scene layer, select the Armor_detailing object, and repeat the procedure; save the baked image as vcol2.png in the texture_making folder and also save the file:
    How to do it…

    The baked vertex color layer for the Armor

How it works…

The Vertex Colors tool can add a color to each vertex of the mesh, so it's actually possible to paint an object without the need for an image texture; the denser the mesh, the better this works.

The Dirty Vertex Colors tool uses the proximity and the depth of folds and creases on the mesh surface to calculate grayscale values to be assigned to the vertices; thanks to the Vertex Color Paint item, enabled in the Material window, this grayscale shows up in the rendering and so it's also possible to bake it into an image.

Getting ready

To do this, we are going to use an already set .blend file:

  1. Start Blender and open the Gidiosaurus_baking_normals.blend file; save it as Gidiosaurus_baking_dirty.blend.
  2. Put the mouse pointer in the 3D view and press the Z key twice to switch into Solid viewport shading mode; click on the 14th scene layer to enable the visibility of the Gidiosaurus_detailing object.

How to do it…

Let's first go with the creation of the Vertex Colors layer:

  1. In the Outliner, select the Gidiosaurus_detailing object and then click on the mode button in the 3D viewport toolbar to select the Vertex Paint mode:
    How to do it…

    Selecting the Vertex Paint mode item

  2. Now, click on the Paint item in the 3D viewport toolbar and from the menu, select the Dirty Vertex Colors item; the Gidiosaurus mesh, first filled with a plain white color, gets shaded in grayscale tones:
    How to do it…

    Using the Dirty Vertex Colors tool

  3. Expand the last operation panel at the bottom of the Tool Shelf and press Ctrl+click on the Dirt Angle slot to enter the value 90°; the grayscale shading on the mesh gets a lot more darker and contrasted:
    How to do it…

    Tweaking the settings for the Dirty Vertex Colors tool

  4. Go back in Object Mode and then move to the Material window, where the Body material is already assigned to the high resolution mesh. Scroll down the panel to reach the Shading subpanel and enable the Shadeless item; then, reach down the Options subpanel and enable the Vertex Color Paint item:
    How to do it…

    The Shadeless and the Vertex Color Paint items

    To understand the effect of the items we enabled in the Material window, just switch to the Rendered viewport shading mode; the mesh surface is self-illuminating and showing the dirty Vertex Colors layer:

    How to do it…

    The Dirty Vertex Colors layer visualized in the Rendered preview

    Note that the Shadeless item is not actually mandatory for the baking, but is only required to see the object in the Rendered viewport shading mode as in the previous screenshot.

  5. Also, enable the 4th scene layer (Shift+left-click) and in the Outliner window, select the Gidiosaurus_for_baking object. Go to the Object Data window to be sure that the UVMap_norm layer is the active one and then go to the Render window and scroll down to the bottom, to the Bake subpanel; click on the Bake Mode slot to select the Textures item from the pop-up menu:
    How to do it…

    Baking the Dirty Vertex Colors layer to Textures

  6. With the Gidiosaurus_for_baking object still selected, enter Edit Mode and select all the vertices; in the UV/Image Editor window, add a new 3072 x 3072 blank image renamed as vcol.
  7. Go out of Edit Mode and in the Outliner, select the Gidiosaurus_detailing object; then, Shift-select the Gidiosaurus_for_baking object and go to the Bake subpanel under the Render window to click on the Bake button:
    How to do it…

    The final baked "vcol.png" image map

  8. Save the baked image as vcol.png into the texture_making folder.
  9. Enable the 3rd scene layer, select the Armor_detailing object, and repeat the procedure; save the baked image as vcol2.png in the texture_making folder and also save the file:
    How to do it…

    The baked vertex color layer for the Armor

How it works…

The Vertex Colors tool can add a color to each vertex of the mesh, so it's actually possible to paint an object without the need for an image texture; the denser the mesh, the better this works.

The Dirty Vertex Colors tool uses the proximity and the depth of folds and creases on the mesh surface to calculate grayscale values to be assigned to the vertices; thanks to the Vertex Color Paint item, enabled in the Material window, this grayscale shows up in the rendering and so it's also possible to bake it into an image.

How to do it…

Let's first go with the creation of the Vertex Colors layer:

  1. In the Outliner, select the Gidiosaurus_detailing object and then click on the mode button in the 3D viewport toolbar to select the Vertex Paint mode:
    How to do it…

    Selecting the Vertex Paint mode item

  2. Now, click on the Paint item in the 3D viewport toolbar and from the menu, select the Dirty Vertex Colors item; the Gidiosaurus mesh, first filled with a plain white color, gets shaded in grayscale tones:
    How to do it…

    Using the Dirty Vertex Colors tool

  3. Expand the last operation panel at the bottom of the Tool Shelf and press Ctrl+click on the Dirt Angle slot to enter the value 90°; the grayscale shading on the mesh gets a lot more darker and contrasted:
    How to do it…

    Tweaking the settings for the Dirty Vertex Colors tool

  4. Go back in Object Mode and then move to the Material window, where the Body material is already assigned to the high resolution mesh. Scroll down the panel to reach the Shading subpanel and enable the Shadeless item; then, reach down the Options subpanel and enable the Vertex Color Paint item:
    How to do it…

    The Shadeless and the Vertex Color Paint items

    To understand the effect of the items we enabled in the Material window, just switch to the Rendered viewport shading mode; the mesh surface is self-illuminating and showing the dirty Vertex Colors layer:

    How to do it…

    The Dirty Vertex Colors layer visualized in the Rendered preview

    Note that the Shadeless item is not actually mandatory for the baking, but is only required to see the object in the Rendered viewport shading mode as in the previous screenshot.

  5. Also, enable the 4th scene layer (Shift+left-click) and in the Outliner window, select the Gidiosaurus_for_baking object. Go to the Object Data window to be sure that the UVMap_norm layer is the active one and then go to the Render window and scroll down to the bottom, to the Bake subpanel; click on the Bake Mode slot to select the Textures item from the pop-up menu:
    How to do it…

    Baking the Dirty Vertex Colors layer to Textures

  6. With the Gidiosaurus_for_baking object still selected, enter Edit Mode and select all the vertices; in the UV/Image Editor window, add a new 3072 x 3072 blank image renamed as vcol.
  7. Go out of Edit Mode and in the Outliner, select the Gidiosaurus_detailing object; then, Shift-select the Gidiosaurus_for_baking object and go to the Bake subpanel under the Render window to click on the Bake button:
    How to do it…

    The final baked "vcol.png" image map

  8. Save the baked image as vcol.png into the texture_making folder.
  9. Enable the 3rd scene layer, select the Armor_detailing object, and repeat the procedure; save the baked image as vcol2.png in the texture_making folder and also save the file:
    How to do it…

    The baked vertex color layer for the Armor

How it works…

The Vertex Colors tool can add a color to each vertex of the mesh, so it's actually possible to paint an object without the need for an image texture; the denser the mesh, the better this works.

The Dirty Vertex Colors tool uses the proximity and the depth of folds and creases on the mesh surface to calculate grayscale values to be assigned to the vertices; thanks to the Vertex Color Paint item, enabled in the Material window, this grayscale shows up in the rendering and so it's also possible to bake it into an image.

How it works…

The Vertex Colors tool can add a color to each vertex of the mesh, so it's actually possible to paint an object without the need for an image texture; the denser the mesh, the better this works.

The Dirty Vertex Colors tool uses the proximity and the depth of folds and creases on the mesh surface to calculate grayscale values to be assigned to the vertices; thanks to the Vertex Color Paint item, enabled in the Material window, this grayscale shows up in the rendering and so it's also possible to bake it into an image.

The Quick Edit tool

It's time to talk a bit about a very useful Blender tool: the Quick Edit tool.

Through this tool, it's possible to export a screenshot of the model in our favorite 2D painting software (Gimp or Photoshop, or whatever), paint on it using a new alpha background layer, and reassign the painted layer to the model in Blender, which is UV-mapped on the selected UV coordinates layer. All this, in just a few clicks.

Getting ready

In our case, we don't actually need to use this tool to refine the textures for the Gidiosaurus, so this recipe is going to be just an example. By the way, to fully understand how to use the tool, I suggest you to follow all the steps; just don't save the file at the end (or save it with a different name in a different directory if you want to keep it). So, carry on with the following:

  1. Start Blender and call the User Preferences panel (Ctrl + Alt + U); go to the File tab and, in the Image Editor slot (Path to an image editor), write the path to your 2D image painting software installation (this is also done by clicking on the open/browse button at the right end of the slot). The path, of course, changes based on your OS; in my case, in Linux Ubuntu, it's enough to write gimp:
    Getting ready

    The Image Editor path in the File tab of the User Preferences panel under Linux Ubuntu

  2. Click on the Save User Settings button at the bottom-left of the panel and close it.

How to do it…

Once you've set the path to the image editor, let's load our Gidiosaurus file:

  1. Load the Gidiosaurus_painting_BI.blend file and maximize it as much as possible in the 3D viewport.

    You can use both the User or the Camera view; it doesn't make any difference for the tool to work. By the way, it would be a good idea to use the Camera view so as to have a fixed point of view for any other case.

  2. If necessary, press the T key to call the Tool Shelf panel; select the Gidiosaurus object and then go in Texture Paint mode.
  3. Go to the External subpanel under the Tools tab; set a size for the screenshot to be exported (by default, it's 512 x 512 pixels; I set it to 3072 x 3072 pixels) and then click on the Quick Edit button:
    How to do it…

    The External Image Editor subpanel

    After a while, the image editor automatically starts (in my case, it's Gimp 2.8) and opens the screenshot of the model:

    How to do it…

    The screenshot previously visible in the Blender Camera view opened in Gimp

  4. Add a new transparent layer and start to paint on it, adding some kind of tribal make-up decoration to the Gidiosaurus:
    How to do it…

    Tribal painting on the Gidiosaurus warrior

  5. When you are done, deselect the visibility for the export layer and export the transparent painted one by saving it with the same name as the exported one. That is, the Quick Edit tool exported the screenshot by saving a .png image inside the blend file directory with the name Gidiosaurus_painting_BI_02_Gidiosaurus_lowres.png; export the painted layer by saving it as Gidiosaurus_painting_BI_02_Gidiosaurus_lowres.png as well:
    How to do it…

    The Gimp layer with the tribal painting "a solo"

    This is necessary for Blender to find it in the next step.

  6. Back in Blender, click on the Apply button under the External subpanel and watch the new layer added to the model in the 3D viewport:
    How to do it…
  7. To make the textures editing permanent, click on the Save All Images button, both under the Slots tab and the Image item on the UV/Image Editor window toolbar:
    How to do it…

    The tribal painting transferred on the 3D model

    The editing we did in Gimp is now correctly transferred on the image textures:

    How to do it…

    The tribal painting transferred on the image map

How it works…

As you have seen, the Quick Edit tool worked like a charm on all the 5 different materials assigned to the Gidiosaurus model for the painting. Be careful that, at least at the moment, this doesn't seem to work with nodes materials (which we'll see in the next chapter).

Getting ready

In our case, we don't actually need to use this tool to refine the textures for the Gidiosaurus, so this recipe is going to be just an example. By the way, to fully understand how to use the tool, I suggest you to follow all the steps; just don't save the file at the end (or save it with a different name in a different directory if you want to keep it). So, carry on with the following:

  1. Start Blender and call the User Preferences panel (Ctrl + Alt + U); go to the File tab and, in the Image Editor slot (Path to an image editor), write the path to your 2D image painting software installation (this is also done by clicking on the open/browse button at the right end of the slot). The path, of course, changes based on your OS; in my case, in Linux Ubuntu, it's enough to write gimp:
    Getting ready

    The Image Editor path in the File tab of the User Preferences panel under Linux Ubuntu

  2. Click on the Save User Settings button at the bottom-left of the panel and close it.

How to do it…

Once you've set the path to the image editor, let's load our Gidiosaurus file:

  1. Load the Gidiosaurus_painting_BI.blend file and maximize it as much as possible in the 3D viewport.

    You can use both the User or the Camera view; it doesn't make any difference for the tool to work. By the way, it would be a good idea to use the Camera view so as to have a fixed point of view for any other case.

  2. If necessary, press the T key to call the Tool Shelf panel; select the Gidiosaurus object and then go in Texture Paint mode.
  3. Go to the External subpanel under the Tools tab; set a size for the screenshot to be exported (by default, it's 512 x 512 pixels; I set it to 3072 x 3072 pixels) and then click on the Quick Edit button:
    How to do it…

    The External Image Editor subpanel

    After a while, the image editor automatically starts (in my case, it's Gimp 2.8) and opens the screenshot of the model:

    How to do it…

    The screenshot previously visible in the Blender Camera view opened in Gimp

  4. Add a new transparent layer and start to paint on it, adding some kind of tribal make-up decoration to the Gidiosaurus:
    How to do it…

    Tribal painting on the Gidiosaurus warrior

  5. When you are done, deselect the visibility for the export layer and export the transparent painted one by saving it with the same name as the exported one. That is, the Quick Edit tool exported the screenshot by saving a .png image inside the blend file directory with the name Gidiosaurus_painting_BI_02_Gidiosaurus_lowres.png; export the painted layer by saving it as Gidiosaurus_painting_BI_02_Gidiosaurus_lowres.png as well:
    How to do it…

    The Gimp layer with the tribal painting "a solo"

    This is necessary for Blender to find it in the next step.

  6. Back in Blender, click on the Apply button under the External subpanel and watch the new layer added to the model in the 3D viewport:
    How to do it…
  7. To make the textures editing permanent, click on the Save All Images button, both under the Slots tab and the Image item on the UV/Image Editor window toolbar:
    How to do it…

    The tribal painting transferred on the 3D model

    The editing we did in Gimp is now correctly transferred on the image textures:

    How to do it…

    The tribal painting transferred on the image map

How it works…

As you have seen, the Quick Edit tool worked like a charm on all the 5 different materials assigned to the Gidiosaurus model for the painting. Be careful that, at least at the moment, this doesn't seem to work with nodes materials (which we'll see in the next chapter).

How to do it…

Once you've set the path to the image editor, let's load our Gidiosaurus file:

  1. Load the Gidiosaurus_painting_BI.blend file and maximize it as much as possible in the 3D viewport.

    You can use both the User or the Camera view; it doesn't make any difference for the tool to work. By the way, it would be a good idea to use the Camera view so as to have a fixed point of view for any other case.

  2. If necessary, press the T key to call the Tool Shelf panel; select the Gidiosaurus object and then go in Texture Paint mode.
  3. Go to the External subpanel under the Tools tab; set a size for the screenshot to be exported (by default, it's 512 x 512 pixels; I set it to 3072 x 3072 pixels) and then click on the Quick Edit button:
    How to do it…

    The External Image Editor subpanel

    After a while, the image editor automatically starts (in my case, it's Gimp 2.8) and opens the screenshot of the model:

    How to do it…

    The screenshot previously visible in the Blender Camera view opened in Gimp

  4. Add a new transparent layer and start to paint on it, adding some kind of tribal make-up decoration to the Gidiosaurus:
    How to do it…

    Tribal painting on the Gidiosaurus warrior

  5. When you are done, deselect the visibility for the export layer and export the transparent painted one by saving it with the same name as the exported one. That is, the Quick Edit tool exported the screenshot by saving a .png image inside the blend file directory with the name Gidiosaurus_painting_BI_02_Gidiosaurus_lowres.png; export the painted layer by saving it as Gidiosaurus_painting_BI_02_Gidiosaurus_lowres.png as well:
    How to do it…

    The Gimp layer with the tribal painting "a solo"

    This is necessary for Blender to find it in the next step.

  6. Back in Blender, click on the Apply button under the External subpanel and watch the new layer added to the model in the 3D viewport:
    How to do it…
  7. To make the textures editing permanent, click on the Save All Images button, both under the Slots tab and the Image item on the UV/Image Editor window toolbar:
    How to do it…

    The tribal painting transferred on the 3D model

    The editing we did in Gimp is now correctly transferred on the image textures:

    How to do it…

    The tribal painting transferred on the image map

How it works…

As you have seen, the Quick Edit tool worked like a charm on all the 5 different materials assigned to the Gidiosaurus model for the painting. Be careful that, at least at the moment, this doesn't seem to work with nodes materials (which we'll see in the next chapter).

How it works…

As you have seen, the Quick Edit tool worked like a charm on all the 5 different materials assigned to the Gidiosaurus model for the painting. Be careful that, at least at the moment, this doesn't seem to work with nodes materials (which we'll see in the next chapter).