'Displacement Map Chainmail'


Software Used :

3ds Max and mental ray

Step 1 : Modeling

In this tutorial I want to show a relatively easy technique for making a chainmail in 3ds Max using a displacement map and mental ray. In this example I’ll show how to make the displacement map and how to get a good quality render with as few artifacts as possible using a simple Arch & Design material. The idea is that you can use this setup to create a tileable chainmail texture like I used on this knight (Fig.02).

Once you have positioned the first few, duplicate out. How many you create is up to you, depending on the variation and size of your final texture. Merge all the rings together and give them an appropriate name. You can play around with some variations in the rings for more realism etc., just keep in mind that it makes a tileable version of the material more difficult to pull off (Fig.03).


Step 2 : Generating Displacement Map

First you must create a surface with UV coordinates as a target for your displacement map. You can do this by simply creating a plane and positioning it on top of your rings (Fig.04).


Position so it just barely touches the rings, and assign mapping coordinates. With the plane you created selected, open the Render To Texture dialog box (Rendering > Render To Texture (press 0)) (Fig.05):
  • Make sure you see the name of your plane here (shows name of selected object in Max).
  • Click the Pick… button and select your rings. In the options menu here you can play around with the Min and Max Height settings to get a greater range in your displacement map.
  • Choose Use Existing Channe” in the mapping coordinates menu, otherwise new ones will be auto generated.
  • Assign a file name and destination. Choose tiff file format and make sure you select 16 bit texture to get best result. Then choose Displacement Map in the Target Map Slot.
  • Set the Element Background color to black.
  • Set the image resolution to 2048×2048 or higher (you might want to do a test render at a lower resolution first). Then click render.
Note: The image you see rendering on screen is not the displacement map, but rather a default map 3ds Max puts up. You can disregard this map, or you can assign a nice metal shader to your rings and use this map for creating a diffuse map for you chainmail. To get the actual displacement map, find it at your File Name and Type location.
It can take some time to render depending on your resolution. When the render is complete, it should look something like this (Fig.06).









Step 3 : Creating Material

Now that we have our displacement map, we need to create an Alpha map. I won’t go into detail, but I simply modified the Brightness and Contrast settings in Photoshop to make the alpha from the displacement map. Alternatively you can generate one from the Render to Texture menu in Max.
And here’s the Alpha map (Fig.07).


Set up an Arch & Design shader and assign your maps (Fig.08).
Give the displacement map a Strength of 1.0 to begin with. We’ll go back and tweak textures and material settings once we get some test renders done.


Step 4 : Rendering

It’s time to set up a small scene to render our chainmail material. I created a simple setup using the plane we created to generate the displacement map with a camera, a couple of lights and a background. How you set it up is up to you.
Here’s a screenshot from my test scene (Fig.09).

 The results of the first render (Fig.10).
Not exactly a pretty sight! The rings aren’t very well defined and the edges look all fuzzy. Fear not, we just need to tweak a few things. The most important is the displacement map. The generated map has very little range, so use Photoshop to manipulate the levels and contrast until it looks more like this (Fig.11).
Alternatively, you can play around with the Height map settings when you generate the Displacement map (Fig.12).

Render again and you should have a more defined result (Fig.13).

There are still a fair amount of artifacts, so we need to play around with some render settings to get a better result. Open the Render Setup menu, select the Renderer tab and scroll to the bottom (Press F10) Rendering > Render Setup > Renderer (Fig.14).

The settings here are very important to the quality of the displacement. The important numbers are the Edge Length and Max Displace. The Edge Length controls the number of polygons per pixel in your render, and the Max Displace controls the maximum amount of displacement you get. Since our render is relatively simple; we can set the Max Displace low and speed up our render a bit. To get rid of artifacts in our render, we need to lower the Edge Length value, Try to set it to 1 and do a new render. If you don’t like the result then lower it a bit more until you get the desired result. Setting the Edge Length value too low can cause you to run out of memory and mean the render can’t complete. It can also increase your render time, so keep that in mind.
Here is a comparison between Edge Length 0,2 and the default 2,0 from our first render (Fig.15).

It might also help here to adjust the strength of the displacement map in your material to get a better effect. When you’re happy with the shape of the rendered mesh, it’s time to add some metal shading to the result - here are some quick settings you can try (Fig.16).

That should give you a result similar to this, depending on your render scene and light setup (Fig.17).

That’s it from me, but keep playing around with the material settings: create a diffuse layer with rust and dirt and add a specular map. The scene setup will be important too since metal is reflective, so maybe you need to add an environment map. There are plenty of ways to improve the look.
Thanks for reading!