Hello and welcome to the second installment of my tutorial! In this tutorial, I will be walking you through the process of texturing the bucket full of potatoes on dry muddy soil.
In the previous installment, we have modelled and laid out UVs for the following shot:
By the time we are done, the result will look somewhat like this:
The softwares we will be using are 3D Studio Max 2009 and Adobe Photoshop CS4. Certain plug-ins will become necessary. While some of those plug-ins do have free equivalents, they do not deliver equal or even comparable quality. Most textures I have used here were originally taken from Mayang.com or CGTextures.com but none of those have been used here in pristine form.
Other than some very basic navigation skill, no other form of prior knowledge in 3D Studio Max has been assumed.
So, let’s get started with the bucket. This is how the bucket UVs look:
The bucket comprises several planks. This approach simplifies modelling as well as laying out the UVs. It is easy to relate where the edge of the each plank is. Also, you can easily spot the holes (where a handle used to be, or maybe a rope).
To start painting on this map, we need to ‘stamp’ this map on an image that we can use in Photoshop to paint textures in the right places. For this, there is a free plug-in named TexTools that you can
grab from ScriptSpot.com
Once installed, (just drag and drop the mzp file on Max to install) assign some handy shortcut to it.
Select the bucket, fire up TexTools, type in the resolution of the stamped image (1024 x 1024 in this case) and click on ‘wire’.
1. Create a new image of resolution 1024×1024.
2. Paste the stamp, which will be white on black background.
3. With the stamp layer selected, press Ctrl+I to invert it.
4. Select the white part with magic wand (W) and delete.
5. Double click on the layer to open the styles dialog and check the ‘Stroke’ style.
6. Delete the locked background layer below it.
Now the file is ready for texture painting.
This is the base plank texture I used. Naturally, planks on the bucket are more than 5. But, not all of them can be seen through the camera at the same time. Cut the planks and position them strategically under the stamp.
Tip: Holding down Ctrl while creating a new layer will create the new layer below the selected layer.
Same plank texture can be assigned to opposite planks. If you can see the outside of one, you will only be able to see the inside of the other. So no repeats will ever be noticed.
The places where nails are showing should be painted over with clone stamp or masked out. Nails are not likely to show on the surface of a bucket.
This is how it looks like at this stage. Now we need to paint in some signs of weathering and handling.
Above the base plank texture layer, create a solid colour layer and add a layer mask to it.
Fill the mask with white, and carefully paint with black soft brush following the grains and knots close to the edge.
Set the blend mode of this layer to Linear Burn with about 50% opacity.
The hue of the solid colour layer is a matter of personal preference.
In this case I used R 158 G 147 B 147.
Also, similarly, cover the holes. Now, naturally, water could not have leaked from there since it is off limits. But the idea is, when there was a handle, and it was wet, and the bucket was carried for long hours, water has rolled down the
handle and made the vicinity of the hole wet for long hours too.
Now it’s time to paint some moss around the base of the bucket, since the bucket is likely to be in muddy/wet areas a lot.
Select and take out pieces from the above texture, paste it on the base plank texture, set the blend mode to Multiply and adjust the opacity of the layer as you prefer. Then either erase or mask out the transition with a soft brush so that it does not look too abrupt.
So, when all is done, let’s hide the stamp and save the texture, which looks like this:
For the bump map, save a copy of the base layer of the diffuse texture, desaturate it, add a levels adjustment layer such that very minor details are not considered, and also so that there is no area that is 100% black. To emphasize certain deep grains and knots, paint over certain areas with burn tool. Always follow the surface topology of the planks to avoid abnormal looking results.
The rings on the bucket are done in a very similar way. The texture is not square. The UVs, when in proper scale, take so little of the square UV space, that it’s a waste to assign a huge square texture. Max will give a stretched out view of it though, to keep UVs to scale. So the UVs of the ring will have to be scaled up vertically (see above image).
In the UV view, select the UVs, press R for scaling, hold down Shift and LMB drag upwards or downwards to scale vertically only.
This is what we are going to use on the lower ring. But moss, when dried up, is not just a dull presence. It has a bit of shine to it. So we will have to create a specular map too, this time.
First, the bump map. This is the desaturated base texture with some levels adjustment done so that the details in the mossy area show up. However, the wood parts are overblown.
Doing a colour range selection on the base texture for picking up just the wood part, filling that selection with black and copying that on top of the above map would look like this. But still the wood grains are white.
For the specular map, first desaturate the base texture and then invert (Ctrl+I), which looks like above. But again the grains look white, and naturally, we do not want them as bright highlights.
So, doing a colour range selection on slightly off white colours, copying that to a new layer and filling it with black will help. After adding a little bit of contrast, it looks like above. It is our final specular map.
And we will also copy this black grain layer on top of our bump map. That gives us the final bump map.
Now, to finalize the diffuse map, we will just duplicate the base texture on top of itself and change the blend mode to Multiply. You can also desaturate a little bit according to your taste.
The upper ring is much easier to texture. We take this random plank texture as our base texture.
Desaturating and adding a little contrast gives us the bump map. Also, you can carefully remove the grimes from the plank because that does not really affect the bump.
Now, we will add a dirt layer on top of the base texture.
Set the blending mode to Multiply and opacity somewhat low to get our diffuse map.
The shading process so far is pretty straight forward. For the bucket’s main body and the upper ring, I have used Mental Ray Arch & Design shader, which is also known as mia_material. Add the diffuse map to the diffuse slot, bump to the bump slot and take reflectivity all the way down to zero.
Tip: In 3DS Max, right clicking on a value slider beside a parameter will assign 0 to that parameter.
Each time you add an image map, Max opens the attributes assigned to that image. In there, make sure the ‘blur’ is minimum. (Zero is not allowed. If you type 0, Max will make it as close to zero as allowed.)
The procedure for the upper ring is exactly the same. For the lower ring, we need specular highlight. The simplest way to achieve this is using a Blinn shader. It remains under the general container that we see as the standard material.
From the basic parameter dropdown, set shader type to Blinn.
There is a lock button to the left of Ambient and Diffuse colours that locks them. Turn it off and set Ambient colour to black.
Assign Diffuse and Specular maps just like before, setting blur to a minimum.
Give the material a low specular highlight. You can also raise the soften value, but on a tiny ring, it will barely show.
The standard Blinn is a 3DS Max native shader. It is not a MentalRay shader. Therefore, for best results, we will have to assign a Bump shader to the Blinn’s bump slot first and then assign the bump map to that bump shader’s map slot. The bump shader is a MentalRay shader, so it will give us optimized results for MentalRay.
And now it looks like this:
For the potatoes, the process is relatively more complex. Since they have just been collected, they should have some earth on them, but not too much. Where the potato skin does get exposed, it will have a dull specular, which will vary depending on the viewing angle.
So, here we will make two different materials and blend them. The first one is potato skin, which we will do again with a standard material, but the difference is, the specular gets noticeable more and more as viewing angle increases.
This is a potato skin texture that I have created by copying bits and pieces of potato photographs found on the internet. It is tileable. Not very high resolution, but one potato will take very small space in the render and it will be partially covered with earth, so we will get away with it.
The specular map and the bump map in this case will be pretty much the same, because only in those small depressions and places will light not be able to make it shine.
There are long dark patches on the potato skin. Simply desaturating it to make bump/specular map will give unexpected results. So to keep only the small deformities, we will use a high-pass filter in Photoshop.
Most of the very large patches and variations have been taken away by this filter. But most of the smaller surface details still remain.
Desaturate and add some contrast.
Paint on the depressions with Burn Tool.
We can also use this map as our specular map, by raising the contrast a tiny bit. Potatoes can have fairly strong (though soft) specular under bright sun. So we do not want to change the dark regions, but we do want to lighten up the midtones and highlights more in the specular map.
This is not something we have to make a separate map for. We will easily do it in Max. When you have added the image, under the image ‘output’ settings, there is a curve adjustment tool, which is disabled by default. Check the box ‘Enable Color Map’ to enable it. Some simple changes will do the job.
So, this time, we will use the standard material again, and choose Oren-Nayar Blinn instead of the simple Blinn. The basic difference between the two is that Oren-Nayar Blinn takes into account the roughness of the surface. When roughness is high, you get a more diffused, distributed specular highlight.
The diffuse and bump are just like the Blinn shader used on the lower ring of the bucket. Advanced diffuse should be way up high, roughness also maximum, specular level pretty high as well with low gloss and a bit of softness. Now, we need to make this whole effect viewing angle dependent.
Two things are driving the highlights here:
i) our specular map, and
ii) viewing angle
When more than one texture/procedural maps control a parameter, we use a ‘Composite Map’ for that.
By default, the composite map only has one empty layer: the base layer. This works exactly like Photoshop. So here we need to add a ‘falloff map’ that will give us the viewing angle dependency. This map works in many modes. For now, we will use the Perpendicular/Parallel mode.
The principle is simple. Where the points are low, it’s more toward black. Where the points are high, it’s more toward white. Steeper slope means quicker transition from black to white or vise versa. So here, when we are looking straight, there is practically no specular highlight. It slowly grows as we are halfway toward the circumference. Then it stays steady until the very edge of the object.
On top of the base layer, we will add the specular map in multiply mode (The contrast correction is not showing here but it is there actually). Adjust the opacity to your taste and the result looks somewhat like this:
With the base skin done, all that is left to do is the earth on top. For that, we have to use a displacement map, because if there is not change in height due to the soil/mud deposition, it will look totally fake.
This is the mud texture I have used on the potatoes. I have searched online a lot for texture of the kind of mud you can typically find under such circumstances, but could not find any. So I took a very small sample of a photo of muddy soil and used the PixPlant plugin for Photoshop to create this mud texture. Here the repeats are rather apparent. But when applied on the potatoes, it looks just fine.
Making the displacement map by manually editing the source image in Photoshop is often very tricky and gives bad results. There are many plugins and standalone softwares that let you create displacement maps. PixPlant, the plugin I have mentioned above, also can make displacement maps along with many other kinds of maps. Some other tools like CrazyBump and ShaderMap Pro can also do it. The interface and options are pretty much identical in all 3. Whichever of these you use, you will get pretty much the same end result. The following screenshots are from the demo version of CrazyBump (http://www.crazybump.com).
When you select the diffuse map, it will ask you whether certain details on the map are being pulled up or pushed down. Here they are being pushed down. So we will choose the second shape.
There is hardly any point in keeping very large detail or fine detail. We are mostly interested in medium detail. It is wise not to raise depth too much, because we desire only a slight change of thickness.
It is always the best to save it as a 32bit TIFF.
Creating the mud material is simple. Back in Max, take an Arch & Design material, set reflectivity to 0, add the displacement map to the displacement slot and diffuse map to the diffuse slot and that’s pretty much it. Just one thing to keep in mind though. A 32bit displacement map is supposed to be in the linear colour space always. So, when adding it as bitmap, make sure gamma is always 1.
In pretty much any rendering engine, bump and displacement maps are scale dependent. Since the model here is not in real world scale, but much smaller than that, we will also have to use a very small displacement value. In this case. 0.02 works all right and gives us a render like this:
Now we will mix the mud material and the base skin so that they both show in places. For this, we will use a Blend material.
A Blend material is just like a 2 layer composition in Photoshop, where there is a mask applied to the upper layer so that some of the background layer shows up as well. In Max, we can use graphs, gradients and texture maps, among many things, as that mask.
I have made a colage of random grunge textures desaturated and painted over. When applied on the potatoes, it looks like this:
So, drag the potato base skin material to Material 1 slot as instance, and mud material to Material 2 slot as instance as well.
Two basic things should be kept in mind about the mask. First, since we are interested in chunks of soil, there should not be much of midtones in the image. Either pretty much white, or almost black. Second, we are not interested in fine detail. That will make the potatoes look abnormal. So we will use a tiny bit of blur with a tiny bit of blur offset here. I have used 0.05 and 0.01 respectively. And here is the final result:
It is a matter of personal preference whether that specular map contrast correction should be done or that mask should be blurred. But we are already in the ballpark.
The final thing left is the ground. Unless truly humongous 8k or higher resolutions are used, it will be hard to do justice to the fine details on the ground. I have used these 4k textures tiled 2×2 with the Arch & Design material with reflectivity turned down to zero. Displacement amount is 0.08 in this case. It looks all right here, but as soon as the scale of the scene changes, it will not. So please keep that in mind.
As you can see, in certain parts the displacement is too strong. It can be fixed in many ways. You can blur those areas with the Blur tool in Photoshop, or take a solid 50% gray layer and add it on top of the displacement map in ‘Colour’ blend mode and paint a mask for it. There can be other methods too, but since we will add pretty strong DoF to the final render, I did not worry about it. There is no point carefully adjusting the detail that will not finally be seen.
In the next and final installment, I will walk you through multipass rendering, putting the passes back together in Fusion, and adding finishing touches.
For questions or comments, feel free to write me to [email protected]. My gratitude goes to CGCookie team for making this tutorial available. Thank you for reading!