Metallic material for games in 3ds Max and Photoshop
In this lesson I will describe the theoretical basis for creating a material for a wall of metal plates. To create this material I will use 3ds Max and Photoshop. Such materials are usually used in computer games.
The material we create will be a matte metallic surface with signs of wear. We will also create a reflective texture so that you can apply a cube reflection map to the material. It is desirable that it be very blurred - so it will be better reflected by metal.
Modeling process.
We start with a simple plane. We will complicate this simple form with the help of several levels of a bevel (tool «Bevel»).
Here is the basic shape, as you can see, I basically used 45 degree angles. Usually, I model the entire base model without using polygon smoothing groups - this is how I see better what I create. Try not to use large angles (more than 45 degrees) when modeling, since this geometry will not be visible beyond a flat surface.
Also, do not create too deep details in the model, because we will still create a normal map, and this will require a projection of the main model on a flat surface. The normal map works best with small details and angles of 45 degrees or less (of course, sometimes you can not do without increasing the degree of angles).
Now all the corners are very sharp due to the fact that we tried to make everything easier and not to use the Chamfer tool (adds additional edges, or edges). Now we need to start adding “supporting edges.” They are edges that are located near the corner edges on each side of the corner.
If you do not need smooth transitions at the hollow corners, then in such cases you should use polygons with different smoothing groups. But I still recommend using one smoothing group for the entire model, but with the use of supporting ribs. The distance between the supporting ribs must be varied to obtain the desired sharpness of the corner ribs.
Here is the result of applying supporting edges to one object (only one smoothing polygon group is used):
We will now create smaller details to make the surface more interesting. I created several separate objects suitable for our main model. I will not describe their creation - it will take several operations “Bevel” and “Extrude” to simulate them.
Notice that the extreme edges of the bolt and square knob are so squeezed out in order to get a smooth transition along the edge (they must be placed as “floaters” - objects that are not adjacent to the main model).
These parts should hang in the "air". Things may get a little more complicated if you have to place them on some circular model when rendering a texture (the “Render To Texture” function). But you can solve this problem by changing the floater distance relative to the main model. You can also visualize them separately and then add them to the main texture in Photoshop.
Here is how I posted additional details:
Now we need to get the texture of the main part with the effect of “Ambient Occlusion”, using the function “Render To Texture”. We also need a normal map. The mental ray visualizer has such an opportunity, so it’s best to use it. Usually, before I start rendering the texture, I make several copies of the main object and place them on each side of the original. This is done so that when rendering textures (with the effect of “Ambient Occlusion”), the edges of the main object are darkened like a fragment of a wall.
Diffuse, reflective and glossy texture.
First of all, we should now have a rendered texture with an “Ambient Occlusion” effect. She will help us a lot in creating the rest of the textures.
In Photoshop, create a copy of the blue channel of the normal map, increase the contrast of this channel. Then click the “Select-> Color Range” command, select the dark parts of the texture, increase the selection area a little using the “Refine Edge” command, create a new layer and fill the selection area with white color. Then make a mask from a non-enlarged selection area.
After this, you will get a very good map with distinct edges, which will also contain unnecessary concave parts from the normal map (we masked them with a mask).
There is another way (easier) to create maps with distinct edges in Photoshop. To do this, you will need the “xNormal” filters (the program is free and easy to find on the Internet), namely, the “Normal2Cavity” filter (in the filter menu, find xNormal). You need to apply this filter to our normal map. I usually use the “EMB” method of this filter, because it extracts the lighting information (convex edges) and dimming (sunken edges) into two different layers.
However, I did not use this method in this lesson, because I don’t want to expand on additional programs, although this is a faster way to get the base layer for convex and hollow edges from the normal map. The program "xNormal" also contains many other useful tools for rendering textures (actually it is used for this).
Here is the “Normal2Cavity” filter dialog:
Next you need to start throwing colors in the main layer (the lowest) for the diffuse texture:
Add some top layers with different textures to detail the surface.
Now it would be nice to add a little rust and damage to the edges. To do this, simply add several layers with a suitable texture, using a sharp brush (opacity 70-100%) to mask unnecessary details. For detailing textures, you can use any photo (any damaged, scratched surfaces), for the mask you can use a layer with an edge map (made on the basis of the normal map) or a texture with an “Ambient Occlusion” effect (obtained in 3ds Max).
I also added a black and white gradient that goes from bottom to top. Typically, this will give your texture depth, but this gradient, however, is not suitable for all types of textures. For example, some textures can be repeated vertically too often, and adjusting the gradient doesn't work that way.
Here is the texture of damage and rust created using the technique described above (using fill textures or photos using masks):
It's time to do a reflective texture, on the image at the bottom, I highlighted the main areas of interest. The edges are painted brighter than the other parts in order to slightly distinguish the shape of the metal tile. Be careful when it comes to metallic materials, because too much detail on the reflective texture can make all the material unnatural. Also paint should be made more reflective than the unpainted part of the metal. This is needed to create a contrast between the metal base and the paint - so the metal parts look more realistic.
In addition, I usually try to change the brightness between different parts of the material in order to avoid the feeling that it all consists of one big piece of metal. Such variations should be available in all textures.
You can do a lot with the glossy texture when it comes to metal. I made the paint brighter, so it looks smoother than a rough metal surface. All the extreme parts I made dark, because they must be very uneven and rough. You can experiment a bit with this texture.
There are many different types of metal, but large wall segments and plates are usually very dull, so in such cases you will often have to work with dark glossy textures and half-light reflective textures. But it is always interesting to tinker with different bright details for a glossy texture (you do not even have to tune the details of the reflective texture to achieve such variations), because it greatly influences the overall effect of the material.
Finally, I made a few large bevels in the normal map to make the metal parts more uneven. To do this, you need to create a new layer, filled with black or white, and draw on it a few large blurred drops in the opposite color. You can also use the filter "Clouds" (located in "Filters-> Render") and blur the result. Do not forget that you need to work in 16-bit color mode (menu “Image-> Mode-> 16 Bits / Channel”) if you want the gradients to be smooth. When finished with the details, you can back up to convert the image to 8 bits - the smoothness of the gradients will remain.
Here are all four finished textures for comparison:
Use textures (using Directx Shader material in 3ds Max):
Metal surface material preparation in 3ds Max and Photoshop