In this tutorial I want to show a relative easy technique for making a chain mail 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 little artifacts as possible using a simple Arch & Design material. The idea is that you can use this setup to create a tile-able chain mail texture like I used on this knight. (more pictures here)
Step 1: Modeling
To get started, decide on a chain mail type, i.e. the ring layout. Then create the first basic rings using the torus primitive.
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 appropriate name. You can play around with some variations in the rings for more realism etc. just keep in mind that it makes a tile-able version of the material more difficult to pull off.
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 position it on top of your rings.
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)
Nr.1 : Make sure you see the name of your plane here. (shows name of selected object in Max)
Nr.2 : Click the Pick… button and select your rings. The options menu here you can play around with the “Min and Max Height” settings to get a greater range in your displacement map.
Nr.3 : Choose “Use Existing Channel” in the mapping coordinates menu, otherwise new ones will be auto generated.
Nr. 4: Assign a file name and destination. Choose tiff file format and make sure you select 16 bit texture to get best result. Then you choose Displacement Map in the Target Map Slot.
Nr. 5: Set the element Background color to black.
Nr. 6: Set your image resolution and click render.
Set the image resolution high, 2048×2048 or higher.. although you might want to do a test render at lower resolution first.
Note: that 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 chain mail. 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 done it should looks something like this:
Step 3: Creating Material
Now that we have our displacement map we need to create a 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.
Setup an Arch & Design shader and assign your maps.
And 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 setup a small scene to render our chain mail 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.
A screenshot from my test scene.
The result of the first render.
Not exactly a pretty sight, there are almost no definition of the rings and the edges look all fuzzy. Fear not, we just need to tweak a few things. Most important is the displacement map, the generated map have very little range, so use Photoshop to manipulate levels and contrast so it looks more like this.
Alternative, you can play around with the Hight map settings when you generate the Displacement map. Here:
Render again, and you should have a more defined result.
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 and select the Renderer tab and scroll to the bottom (Press F10) Rendering > Render Setup > Renderer.
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 relative 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 lower a bit more until you get a desired result. Setting too low can cause you to run out of memory and the render can’t complete. Lowering “Edge Length” 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.
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.
That should give you a result similar to this, depending on your render scene and light setup.
That’s it from me, but keep playing around with the material settings, create a diffuse layer with rust and dirt, add a specular map. The scene setup will be important too since metal is reflective, maybe you need to add a environment map. Plenty of ways to improve the look.
Thanks for reading.