This blog describes my journey exploring storytelling - words, images and the sensations they generate. The lot, basically.

Thursday, January 16, 2014

MARI: Distressed painted metal texture from scratch - Part 3

"Start with what is known, and what is hidden will be revealed."  - Rembrandt van Rijn

 

We'll take Rembrandt's wisdom and the approach of building up our textures layer by layer in order create the last of the secondary maps (bump) we need for the jerry can. For the first part of this tutorial, which looks at the diffuse colour maps for our jerry can, please go to http://marquepierre.blogspot.co.uk/2013/10/mari-distressed-painted-metal-from.html and for the second part, which covers the spec maps, please see http://marquepierre.blogspot.co.uk/2013/12/mari-distressed-painted-metal-texture.html.

Imperfection is key to successfully achieving the ilusion of realism and avoiding that computer generated look, and as such wear and tear is an important consideration for a texture artist. Which brings us to the bump maps. When people use the word "texture" outside of CGI, the meaning they refer to is pretty much what we use a bump map to illustrate: The texture of a surface, in terms of bumpiness, roughness and other smaller topographic details in the surface. The bump map adds lovely details, which are mostly only visible when the object is fairly close to the camera. It helps us to break up specular highlights and many other things. In a bump map 50% grey means that the surface is smooth and has neither indentations nor protrusions. White means details that protrudes out from the surface and black of course means details are recesses upon the surface.


Anyway, let's put together the bump map for the jerry can, using what we already have of information in the diffuse map.

To this end duplicate the Diffuse channel and use the duplicate for our bump map. In the Channel palette, right click on the Diffuse channel. Select Copy from the menu. Right click in the empty space on the Channel palette and select Paste from the menu. Now we have a duplicate of the Diffuse channel. Double-click on the new channel named "Diffuse Copy" and rename it to something suitable, like Bump or BMP.

First things first. When I paint secondary maps I set my Mari viewport to 50 percent grey. This allows me to visually gauge how far I am from my 50 percent grey midpoint. Beats bringing out the Color Picker all the time (although that certainly is useful to double-check values with). So right click on any empty and unused part of your Mari viewport. Select Display Properties.
 Under Display Properties, under Background we have two colour swatches, which combined can create a gradient in the background of your viewport. Click each of them (Top and Bottom) and select a 50% grey, and hit Ok.

If you work in flat lighting mode (F1) then you will always be able to quickly compare the values of your bump map against the even grey background of the viewport. 
Building our layers, we want to work from a 50% grey bottom layer - which in a bump map would represent a perfectly even surface. That wil be our starting point, upon which we will add dents, scratches and all the other goodness a bump map allows us to portray. So start by adding a Procedural Layer - Basic - Color and set it to 50% grey. 

So a 50% grey object set on a similarly coloured background, and your viewport should look like the right side (the flat lighting) of this image:

Let's start adding in our details from the creation of our colour map.

The first thing we want to use is the paint on the metal. That paint would sit slightly higher than the underlying metal itself. More specifically, as the green paint layer was a procedural basic color layer masked out in places, we need to use the mask. So right click on the mask symbol and then Layer Mask - Make Mask Stack. This turns our mask into a proper layer, which we can copy and add other layers to in a regular layer stack style.

Also it changes the icon from the mask icon to the mask stack icon:


Now, if you click on the new mask stack icon, a new layer window will open. Select the layer there in and copy it  (right clicking on it, will give you a copy, paste etc. menu). Paste it into our bump channel above the 50% grey procedural colour layer. Create a layer group for it and drag our mask layer into the group. Now change the blend mode for the layer group to Multiply and the opacity to something like that 0.3. This is what my bump map looks like so far:

In summary, what we have done here is creating a difference in height between the paint on the can and the aluminum underneath. Notice that the rubber spout is darker all over. This comes from our original mask, which of course masked away the paint from the rubber spout. In any case, we can leave it for now, as bumps very much work off differences in values. Globally on the spout we right now have a darker value, but the values of the details we will add on top of this darker value will still have the correct differences anyway. Kinda like adding 2 to 0 or 2 to 2, both will give a value which has increased with 2. That is how I see it. Does that make sense?

Moving on...

Move your aluminum base layer to sit on top of what we have so far. Change the blend mode to Overlay and the opacity to something like 0.25. What that does it gently add a bit of variation to our jerry can. Obviously a used jerry can is not completely smooth even on the big swathes of painted metal. We need to break those surfaces up ever so slightly, and preferably in an organic way. Our aluminum base will do this nicely.

Just as we want to break up the even spaces on the metal, so we also need to add a bit of similar detail to our rubber spout. Let's see what we can reuse of existing layers on the spout.

Your rubber base and rubber detail layers could be useful here. I took the rubber base layer and changed the blendmode to Multiply and lowered the opacity all the way down to 0.043. The rubber details layer I used with the blendmode of Color Dodge and an opacity of 0.07. So only adding these details in very, very lightly, but enough to break up the rubber spout, so it will not look like smooth porcelain etc. Here is what I got so far:


Remember our general dirt layer? We used a nice concrete texture to help paint it. As an object becomes dirty, that dirt will also add to the shape or roughness of the object. Drive your shiny new car through a muddy field, and what was previously smooth painted metal will now have bumpy mud on it. On a much smaller scale, we will use that dirt layer to add the bumps corresponding to the information in the colour map. Of this needs to be on a very small scale. Turn on that dirt layer and change the blend mode to Hard Light (as we want both the light and the dark information). I dialed my opacity all the way down to 0.043. You can barely see these details with the naked eye (unless you got a swanky 4K monitor), but with bump maps, little scratches can quickly end up looking like massive gouges in the render, so subtlety is imperative. Here is my bump map at this point:

Speaking of bump maps and scratches, let's move on to this more meaty subject. For the scratches on the can, I want to both use the general scratches we painted and also use a higher contrast version of those. With the higher contrast scratches I want to create a smaller number of more pronounced scratches. So we need to copy our scratches layer and place it in a new layer group. Add on top of the scratches layer in there an adjustment layer - contrast. Adjust your contrast to fit. Here are my scratches post contrast adjustment on their own:


Then change the blend mode of the layer group to Soft Light and the opacity to something like 0.2. Put together with the other layers, this is what it should look like:

That is a nice subtle start to our scratches. Let's turn it up a notch. So if we go back to our original scratch layer, here we will get the majority of the information, which will drive our scratches' bumps. To make sure the bigger details of the texture come out, I changed the blend mode to Hard Mix and took the opacity down to 0.3. In close up, it looks like this:
 
 All told, this is my jerry can so far:

Let's bring in the rust details. Make a layer group for your rust layer, and add an adjustment layer - HSV on top, crank the saturation down to 0. Or you could also add an adjustment layer - Luminosity, which does the same job, or if you are an enemy of non-destructive editing, you could run a filter on your rust layer (Hue or Luminosity for example). You get the point... So with our rust detail all converted to greyscale, change the blend mode of the rust layer group to Color Burn and the opacity to something like 0.236. Now our rust details will have a suitably bumpy surface.
 

Actually. I am still not happy with the way the rust is portrayed bump-wise. I want something more grainy. Rust has that crystalized kind of surface. I am thinking, generate some noise and overlay with the rust bumps we already have to get that grainy feel. Create a layer group and add a procedural layer - Noise - Cellular. Depending on your overall rust look, the noise needs to be quite small. 

Add a layer mask to the rust noise detail layer group and set it to hide all. What I did next was to take a rust texture and using the paint through tool and an organic brush, I painted into the mask where I wanted this noise detail on top of my rust. Here is what I painted onto my layer mask:
Change the blend mode of the layer group to Multiply and take the opacity down to something like 0.227. Up close you can see (compare with the rust bump close up above) the added detail provided by the noise layer:


That takes my bump map to its final stage:

Which rendered out, contributed to this look:


In my final instalment of this mini-series, I will go over setting up our shaders and lighting. Then I am looking forward to seeing your renders of this simple Mari texturing project.




Did you find this useful? Leave me a comment, share the post via your favourite social media or drop me an email about things you'd like to see covered.