Adding colors

Now that we have the proper UVs on our objects, let's dive into the fun part, that is, the texturing. It is the more artistic part of the process, so let's start by discovering the Texture Paint tool of Blender.

Basics of the Texture Paint tool

The Texture Paint tool is a mode that allows you to paint directly on a 3D object in the 3D Viewport while applying color to the texture. This requires having textures with a sufficiently high resolution. One of the interesting points is to paint on a 3D polygonal mesh with a low density.

To observe the paint of our textures in 2D, we need to split the 3D Viewport in two and switch the second type editor to UV/Image Editor.

To activate this, we first select an object, click on the Mode drop-down menu in the Header, and switch to the Texture Paint mode.

If you don't have any UVs, a message will warn you in the left panel (T) of the 3D Viewport. You can generate UVs automatically with the Add Simple UVs option, but it is much better to unwrap them yourself as we saw earlier.

In the Slots tab, there is an important parameter, that is, the Painting Mode. It gives a choice between two options. The Material option allows us to paint automatically linked textures to a material in Blender Internal. The Image option allows us to paint the texture without necessarily having a material linked to the object. For this first approach of the Texture Paint tool, we will be especially interested in the Material option.

If in Texture viewport Shading Mode (Z) your object displays a pink color and you see the message Missing Data in the left panel (T). Select Tools, to correct this; you will need to click on the Add Paint Slot option. Here, several texture types are available. This will automatically create a texture corresponding to a slot of the material with the required settings during the painting phase.

We can start testing a Diffuse Color map. Several options are proposed. They are the same as when we create a new texture. You can rename the texture and choose the height, the width, and the color with an alpha value. You can also choose whether you want an alpha layer (it is the opacity), the type of texture to generate, and finally, the 32-bit float option. Press OK to create this texture. A new material is then automatically created if there are none of them. You can visualize it in the Material editor on the right-hand side of the work space.

To modify this, you can change the name with a double left-click on the name.

It is possible to create several stacked textures one above the other like layers in the material. You must select the one that you want to paint in the Slots tab of the left panel. The bottom slot is the one that is first visible. You can also choose the Blend Type to mix pixels. There are the usual Blend Types (add, subtract, multiply, and so on.) that we can find in every decent image editing software. The Slots tab allows us to also change the UV layers, which can be very useful.

Now that you know the basics to generate and manage a texture for painting, we will look at the brushes.

Discovering the brushes

As in the Sculpt Mode that we saw previously, we have multiple brushes in order to paint our texture. They all have some specific purpose that we will test on a simple sphere object in a new scene file. Be aware that the goal here is not to do something beautiful but to test our brushes.

The TexDraw brush

This is the brush that allows us to paint the desired color in a localized manner.

You can use the blender mode in order to create effects. For instance, the Add mode is very useful for lighting texturing effect (refer to 1 on the following screenshot).

The Smear brush

The Smear brush allows us to move the color while blurring it. It is very useful to create some blown or flame painting effects. If you change the strength parameter to a higher value, you can stretch your paint to a higher distance (refer to 2 on the following screenshot).

The Smear brush

The Soften brush

This brush allows us to blur the painting. It is useful to mix the colors and create gradients (refer to 3 in the following screenshot).

The Clone brush

This brush allows you to copy a specific zone on another place. This is very useful when you need to fill some untextured space or when you want to correct the seams. You select the zone that you want to copy by placing the 3D cursor on it with Ctrl and LMB (refer to 4 in the following screenshot).

The Clone brush

The Fill brush

This is a new brush that Blender has had since version 2.72. This brush allows us to fill the whole object with the selected color. With the Use Gradient option, you can do a gradient that stretches over the whole object. Remember to set the strength parameter to 1 to have a sufficient opacity. A line under the mouse cursor will inform you where the start and the end of the gradient will be. You can also use the Multiply Blend mode while using it (refer to 5 in the following screenshot).

The Mask brush

As with the Sculpt Mode, it is possible to mark a zone that you want to avoid painting. To do this, you will create a stencil image. Don't worry, Blender will ask you to create the image as soon as you create a mask, if it can't find one. You only need to click on the New button or select a preexisting image in the .blend file and validate the image settings like we are used to. To clear a masked part, press Ctrl and LMB. To remove your mask, you can remove the mask option in the Slot tab. Be aware that the masks are not visible in Material Viewport Shading Mode (refer to 6 in the following screenshot).

The Mask brush

If you have a pen tablet, you can check out the small button on the right of the radius and strength parameters (an icon with a hand). This allows you to vary the amplitude of the parameter according to the pressure sensitivity of your stylus.

The Stroke option

The Stroke option allows us to completely modify the brushes' behavior. It is, therefore, important to focus on this for a little while.

First of all, there is the Stroke Method option that allows us to choose among several methods for applying the colors:

  • Space: This is the basic method with a variable dot space.
  • Curve: This is a new method since Blender 2.72 that allows us to paint in a well-defined curve with controllable points. Press Ctrl and left-click to create the points defining the curve. Each point can be controlled with the transform tools: Grab (G), Scale (S), and Rotate (R). In order to apply your painting, you need to press Return.
  • Line: This method simply allows you to draw lines. You must do a pushed left-click to draw the line from one point to another. The paint is then projected onto the 3D mesh.
  • Anchored: This allows you to drag your stroke. You first need to select the placement of the stroke or the texture you want to paint, and then, without releasing the mouse, you will be able to control its scale. This method is especially interesting when projecting a texture.
  • Airbrush: This method could be used to project a multitude of little spots, for instance, you can change the radius so that it is smaller with Rate of 0.10 and Jitter of 2. It is useful to create skin textures, for example.
  • Drag Dots: This allows you to paint points or spots by placing them one by one.
  • Dots: With a Jitter parameter at 0, you get a textured line to paint. With a Jitter parameter at 1, you will get a multitude of spots.

There is another key element that will determine the settings of your brush. It is the curve located just below the Stroke tab. It works exactly in the same manner as the Sculpt mode that we saw previously. Depending on whether you want a hard or thin brush to paint the details, remember to use and test several curve profiles. There are already several predefined shapes that can meet your needs.

Delimiting the zones of painting according to the geometry

So that we paint in a precise manner, it is possible to limit the zone that we want to paint by selecting polygons.

After you have selected the desired faces in the Edit Mode, you can go to Texture Paint and check the Face Selection Masking for Painting button on the left-hand side of the layers in the 3D View header. The icon shows a small cube with a checker pattern on a side.

You can now paint without fear of overflow.

Delimiting the zones of painting according to the geometry

Painting directly on the texture

If for any reason you have difficulties when painting directly on the mesh in the 3D View, you can also paint on the texture.

You simply need to select your texture in the UV/Image Editor, click on the Mode drop-down menu, and choose Paint. The View Mode is the one by default.

You have all the painting tools that you already know in the left panel (N). For your comfort, you can always set your view in full screen with Shift + Space.

Painting the scene

We are now ready to apply what we've learned previously about the Texture Paint tool on our haunted house. Let's start!

Laying down the colors

For any image that uses colors, it is necessary to lay down a color palette. This means that we will need to find the colors that will make up our image. In our case, for the house, we have chosen the following color codes:

  • R: 0.259 – G: 0.208 – B:0.149
  • R: 0.180 – G: 0.141 – B: 0.102
  • R: 0.149 – G: 0.102 – B: 0.082
  • R: 0.337 – G: 0.318 – B: 0.310
  • R: 0.188 – G: 0.145 – B: 0.055
  • R: 0.251 – G: 0.192 – B: 0.075
  • R: 0.780 – G: 0.596 – B: 0.231
  • R: 0.212 – G: 0.267 – B: 0.373
  • R: 0.176 – G: 0.063 – B: 0.067

We have the ability to create a color palette by clicking on the + (plus) button near the color wheel. However, in order to have an idea of the whole color scheme, we will start by fulfilling the 3D mesh that we had unwrapped object with the colors. This is done as follows:

  1. We will select one of our objects.
  2. We will split our screen into two, and we will open UV/Image Editor, if it's not already the case.
  3. In the Edit Mode, we will move the UV in a corner. We will keep a space for a margin, and we will not place our UVs too close to the border.
  4. We will create a new diffuse map with a resolution of 4096x4096.
  5. With the Fill brush, we will apply the corresponding base color for the object.
  6. We will select another 3D mesh.
  7. In the Edit Mode, we will select Diffuse Map for this mesh, and we will move the UV near the UVs of the previous mesh. This will be easy as you will see the previous fill.
  8. Again, with the fill brush, we will apply our color for this new object.

We redo these steps for all the objects. Since our objects' UVs are proportionally scaled, their size should be sufficient in order to place the maximum number of objects on the same diffuse map.

Be careful to not select the tiling layer for the UVs while filling your objects.

Tiled textures

It's now time to take advantage of our tiled UVs by painting our own tiled textures by hand! In this section we are going to show you how to create the roof texture step by step, and as the process will be very similar for the wood plank, ground, brick wall, and rock texture, we will only give you some advice in order to get a nice result. So let's get started by setting up our painting environment.

The settings of our workspace

One of the strengths of the Blender painting tool is to be able to paint in the UV/Image Editor in such a way that the strokes that you paint repeat themselves on the borders.

  1. We will first open the UV/Image Editor, and make it full screen by pressing Ctrl + Space while hovering over it. After that we will create a new 1024 x 1024 Texture with a greyish dark blue color (Image | New Image).
  2. We now need to enter the Paint mode by choosing it in the header drop-down menu. By default the mode is set to View.
  3. Now we will activate the Wrap option in the Option tab of the UV/Image Editor (T). This allows our stroke to repeat to the other side while painting on an edge.
  4. Another nice feature is to check the Repeat option located in the Right panel (N) under the Display subpanel. It allows us to see the tiling effect.
  5. Let's try this by painting on our texture with the basic brush and a different color. As you can see our strokes are repeated and we can see the tiling effect! Press Ctrl + Z to undo your testing strokes.
    The settings of our workspace

    The Wrap option in the Options tab

Advice for a good tiled texture

Before starting the painting of our roof texture, we will give you some good advice that can lead you with a nice tiled texture. We first need to remember that the goal of a tiled texture is to give the impression of a pattern that repeats on a surface but in real life, even with a perfect wall pattern for instance, we can see differences between each brick. That's why we need to have a pretty homogenous texture.

We will need to balance the contrast of our tints so they don't disturb our eyes after the tiling. Another important thing to remember is that the pattern should be repetitive in some way. We cannot paint a computer keyboard texture in a tileable manner for instance, because the keys are not the same size and don't contain the same letters. But it can work with a lot of things such as a brick wall, concrete, wood, and so on. We also need to think about the scale of the elements that compose the pattern. For instance, in the case of our roof tiles, we don't want to have one that is very small compared to the others; it will break the illusion of repetition. So now that we know the pitfalls of the tiled texture art we can start working on our roof-tiled texture.

Painting the roof-tile texture

Let's start our roof tile texture from the texture that we've created in the UV/Image Editor in the previous section.

  1. Before starting to paint our texture we will change our curve to be a little bit pointier. We can easily select a curve preset in the Curve subpanel.
  2. The first thing that we need to lay down is the tile pattern. In order to trace that we will use the same tint as the background color that we chose when creating the texture but darker. We then re-size our brush size (F) and start to paint a row of 'U' shapes for the first top tiles. We need to space them proportionally according to the size of our texture. For the next rows we will do the same thing with a little offset. The top-left part of the 'U' shape needs to touch the middle of the above ones. Note that if you are lost while having the repeat option activated, you can always help yourself with small helping markers that you can erase later (refer to 1 in the following screenshot).
  3. Now that we have the basic pattern drawn, we can start to add a little bit more detail with the shadows. For this we are going to select a darker color, but still in the blue shades. Because shadows will be faded, we are going to decrease our strength a little bit (Shift + F). Here, the shadows that we are going to paint are projected because of the tiles that are placed above. This will act like contact shadows (refer to 2 in the following screenshot).
  4. Now that we have our shadows we can start to add some scratches on the tip of each tile. You need to remember the fact that it needs to be as homogeneous as possible, so don't paint big scratches or it will break the tiling effect (refer to 2 in the following screenshot).
  5. The last thing that we are lacking here is some highlights. When painting highlights we use a white color and decrease our strength and size. We then slightly paint the highlights where we think we have hard edges. For instance we can emphasize the scratches (refer to 2 in the following screenshot).
  6. That's all, you've now completed your first hand-painted texture (refer to 3 in the following screenshot).
    Painting the roof-tile texture

    Steps for the roof tile texture creation

Quick tips for other kinds of hand-painted tiled textures

We aren't going to show you step by step how to do each tiled texture as it would require a lot of space and it would be a very repetitive task. Indeed when we are doing such a texture we first always create a texture with a flat color, and then lay down the pattern with a darker color. Once we are satisfied with the pattern and the way it tiles, we add the shadows, more details, and finally the highlights (the specularity).

As you can see on the wood texture, it is quite difficult to add the ribs and having a good tiling, so later we will need to take this problem into account on the objects that will receive the texture. But we can't add ribs on wood or it will look strange. For the ground we can add a little bit more detail, such as small rocks and crackles. The bricks are quite easy to do, but if you feel you can add more detail, you can easily paint moss between each brick.

Quick tips for other kinds of hand-painted tiled textures

Examples of other tiled textures painted in the UV/Image Editor

Baking our tiled textures

We are now going to project our tiled textures on other textures that correspond to the UVs of our different objects.

Why bake?

As we saw it with the Alien character, texture baking is very useful in order to capture relief, shadow, or color information. In the case of our haunted house, we are going to capture the color information of the tiled textures in order to have them on a large texture with the proper UVs. This lets us achieve our tiled patterns on one big map in order to add all the tweaks that we want later on. We could for instance paint the window contact shadows, add some grunge, and age our objects.

In our scene we aren't going to bake everything. So some objects are still going to use their tiling UV layer. It will simplify our work and still leave us with a nice result.

How to do it?

To obtain a successful bake, the manipulations will be quite similar to what we've done with the normal and ambient occlusion map of the alien. We will start by doing the baking of the walls.

  1. We select our walls joined as one object and we go into Edit Mode.
  2. In the UV Map subpanel under the Data tab we click on the camera icon on the right of the Tiling layer. This will tell Blender to use this layer for the render and baking process. We then select the first layer in order to project the details on it with the proper UVs that are normalized.
  3. Still being in Edit Mode, we create a new map that we call Color_walls_01 with a 4096 x 4096 resolution. We also un-check the Alpha checkbox. This image will contain the result of our bake.
  4. We now go to the Bake tab from the Render tab.
  5. Under the Bake button we select Texture as the Bake Mode.
  6. In the Margin option we choose 10px.
  7. Repeat those steps with the objects that share the same UV space.
  8. We can now click on Bake in order to start the process. Voilà! Your baked texture is now ready to be placed as a diffuse color texture on a material.

Creating transparent textures

One thing we haven't learnt until now is how we can produce texture with an alpha channel. Indeed this could be very useful in order to add some details on the previously baked texture (grunge or leaks, for instance) or even grass.

The grass texture

Usually, when doing grass, fur, or hair, we use the integrated particle hair system of Blender, but in our case we will show you a technique that can do the job as well and can save us render time. It will also accommodate very well with the style of our scene. This technique will simply consists of a plane mesh on which some grass strands will be projected; using the alpha we will be able to just render the strands. Note that this is a very common technique in the video game industry. So let's start our grass texture by first setting up our transparent texture!

  1. We will first go in the UV/Image Editor and create a new texture. In the color setting of the texture, we will change the alpha channel to 0 in order to have a full transparent image. We then leave the 1024 x 1024 resolution and validate our settings.
    The grass texture

    The grass texture settings

  2. We can now use a pointy curve and start to paint some strands starting from the bottom of the texture to the top with a de-saturated green. We really need to think about painting a dense grass mound.
  3. In order to add more realism to our grass texture, we can add some touch of yellow. We also need to add some white on the tip of each strand. It is quite important to use a reference when painting some textures; it helps to develop our sense of perspective and come with more believable results.
  4. Remember to save your texture on your hard drive or you will lose it (Image | Save as image)!
  5. We can now place our texture on a new plane (Shift + A). We do a quick UV on it by simply pressing U and selecting Unwrap in the Edit Mode.
  6. We will now create a new material that will use our texture. To do that, go to the Material icon in the Properties editor and press the plus icon. If you already have a default material, you can delete it with the minus icon.
  7. So our material can understand the alpha channel, we will have to activate the check box of the Transparency subpanel and select the Z-Transparency mode with its Alpha value set to 0.
  8. Now we will tell our material to use our grass texture. To do this we click on the texture icon of the Properties editor and click on the first available texture slot. Under the Image subpanel we click on the far left drop-down menu and select our grass texture. The last thing we need to do is to activate and set the Alpha slider under the Influence subpanel to 1.0.
  9. We can have a preview of our texture in the 3D Viewport by activating the GLSL mode in the right panel of the 3D View (N) under Shading. Note that you will need to be in the Texture Shading mode (located under the Viewport shading drop-down menu in the 3D View header) and you also need to have lights.
  10. We can now duplicate the plane object as an instance to have more grass. Note that you can also add a subdivision to the plane and in the last tool options you can change the Fractal slider in order to add a little bit of randomness. Remember that the render in the viewport is a preview, not the final render.
    The grass texture

    The final grass texture in the viewport (left) and in the UV/Image Editor (right)

Note

More about the color wheel window

When selecting a color in Blender we have many options. You can of course select the color that you want with the color circle or by changing the slider's values. In RGB Mode we can act on each red, green, and blue component plus on the Alpha channel. In HSV Mode we can change the hue (the tint), the saturation, and the value of the color. If you put the saturation down to 0 the color will be on a gray scale. The Hex Mode allows you to type a hexadecimal value such as FFFFFF (white) or FF0000 (red). Hexadecimal simply means that instead of counting from 0 to 9 we count from 0 to F. It represents 16 possible values. The easy thing to remember when dealing with hexadecimal colors is that the first two digits represent the Red value, the next two digits represent the green, and the last two represent the Blue: RR GG BB. FF is the full color, 00 means no color. For instance 00FF00 is full green.

The grass texture

The grunge texture

The grunge texture will be useful in order to add details on the wall texture of the house. The technical process is the same as the grass texture. For the painting we simply use a dark brown color and paint some vertical leaks from the top to the middle of the texture.

Now we can stamp this texture on our wall.

  1. We select the wall and ensure that its baked texture is selected in the UV/Image Editor while being in Edit Mode. Another thing you may want to do if you are still in GLSL mode is to create a new material with the baked texture set.
  2. In order to paint our leaks we will use the Anchored stroke method located in the Stroke subpanel. It allows us to precisely place our leaks near the top and the bottom of the wall.
    The grunge texture

    The grunge placed on the house in the viewport (on the left) and the grunge in the UV/Image Editor (on the right)

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

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