'3D Studio Max'

.
"Brushed metal using procedurals" by Peter Åsberg


Hello again and welcome to the second installment of my procedural tutorials. In this tutorial we'll be making a brushed metal. It will focus both on the procedurals used and on the Raytrace material together with Shellac. Here's a preview of the finished result:
If you don't have a clue what I'm talking about when I say procedural, I suggest reading the help file that comes with 3dsmax. Or you can look through part 1 of this series, Procedural Wood.
Beware; my style is not to write number specific tutorials. Personally I hate that. Which means this can get a little lofty at times, but fear not, I'll be using lots of pictures. Good luck.
Maps used
First of all, lets review what we'll be using for this shader.
Noise map.
A very handy map that appears in almost every single material I make. Very useful little bugger.
Mix map.
This map is impossible to do without. The ability to mix maps is essential to a good material.
Falloff map.
The falloff map is another map that is incredibly useful. You can use it to fade between two colours or maps depending on light/shadow, perpendicularity to the camera etc etc. Read all about it in the documentation.
Raytrace material.
The raytrace material is the basis for this shader. Read more about it's features in the documentation. I will only touch a few of the features in this tutorial.
Shellac material.
I used this to get an anisotropic highlight. The Raytrace material doesn't support anisotropic highlights, which means a workaround is needed.
And that's it. All you need to get a good looking shader that is entirely procedural.
What do we want?
First of all, lets stop and think about how brushed metal look. In my head, I had an image of almost parallel grains, which creates anisotropic highlights. After confering with a few friends, I found out that I was not quite right. It needed more randomness and more of a crosshatch pattern.
The easiest way to simulate this is by using maps with parallel lines that are layered, each layer having a slightly different angle and size. I did this by tweaking the tile and angle values in the noise map. As you will see, noise is a very versatile and useful map. The mistake most people make is to just slap it on and think it's enough to change the noise type from regular to fractal, maybe change the phase and size. Usually you can tell it's a noisemap a mile off if you leave it at that. The noise map is great, as long as you mix it with other noise maps and other procedurals. United we stand, divided we fall kind of. Single noise map is (in my world) a big no-no. Anyway, enough rambling and onto material making.
Noise noise noise
First, open the raytrace material and name it Brushed. Click the bump slot and pick the mix map. To make it easier to navigate, name it "bigmix". Click slot 1 and pick mix map again, name this one "grain01". I did this to get more control over the grain. Now we can mix two different grains with different angles and get a richer, more random surface. Click slot 1 again and this time pick a noise map, name it "grain01_1" (I know, the naming sucks, but it matches the screenshots :).
Depending on the angle you want the grains to "travel", you'll have to change the tile values. I wanted horizontal grain and adjusted the noise accordingly. Experiment with different tile values to see how it affects the grain. It's a good idea to adjust the phase and offset values to make sure the rest of the noise maps doesn't look the same.
Back up one level and copy grain01_1 to slot 2. Name it "grain01_2". Change the tiling values again. I only changed the z value to 50. Change phase and offset to make it unique. Back up again, copy a noise map to the mix slot, name it "grain01_mix". Again change the tile values, offset and phase to differentate it from previous noise maps.
Now we have a decent grain map. In order to add more random streaks, back up to bigmix and copy grain01 to slot 2, rename it "grain02". Now you just have to go through the three noise maps and change the values and rename them from "grain01_1" to "grain02_1", "grain02_2" and "grain02_mix". I was a little lazy and the only things I changed were the Angle values. Look at the images for specific values.
Go back to the bigmix level. It's time to add the final mix map. Copy grain01 to the mix slot. Rename it to "grain mix". "Bigmix" should look like this now. Dive right in and change the noise values once again. To keep things orderly, change the names of the noise maps to "grain mix_1", "grain mix_2" and "grain mix_mix".
And the final bigmix map should look like this:
Whew... That's all the work we do with the grain for now. Go back to the root of the mat.ed. and instance the "bigmix" map to the specular slot. Now for diffuse.
Click the diffuse slot, pick the mix map, name it "diffuse mix" and put an instance of the "bigmix" map in slot 1. Put a noise material in slot 2, name it "diffuse-color". I used light blue/grey tones in this map to give the surface a slight variation. It's more or less obscured by the reflections though. But you have the map there for future use if needed.
As you see, it's almost all about tweaking the values until it looks good. I spent a good part of two days fiddling with noise values, specular values, reflections etc. But it pays off. What you must keep in mind is that the material might not fit all models straight away. You will probably have to adapt it to your specific scenes. But once you've created a good looking material, it's not that hard to resize and refine it for other models and/or scenes.
Next up are the material settings, including shellac, raytraced reflections and more.
Highlights
Lets start with the highlights. Brushed metal has anisotropic highlights. In short it means that the highlight isn't a round white spot, but instead lots of small parallel lines. I won't go into detail on how it works, Neil Blevins has an excellent explanation of that. Suffice to say that the anisotropic highlight option is the one we need for this job. Unfortunately, the raytrace mat doesn't support it which means we'll have to use the Shellac material. Click the Raytrace button and pick Shellac, Keep old material as sub-material. It should look like this.
Click the Shellac material, name it "Anisotropic Highlight". Change the ambient and diffuse colours to black and tweak the specular and glossiness settings. You can use the image as a guide. Place an instance of the bigmix map in the bump slot and the specular slot.
The reason for this is to break up the highlight and add to the realism. It's important to remember that the shellac material isn't affected by the bump map in the underlying material, which means you have to instance the bump map if you want the highlight to react according to the underlying surface. In short, without a bump map, the highlight would just "glide" on top of the bump map in the Brushed material. Which would look bad. Another good thing is by using instances, you get fewer maps to edit which speeds up any changes you make. Lastly, turn on supersampling. Hammersley is a good choice for bumps which we have a lot of in this material.
Go back to Raytrace material (Brushed) and adjust the highlights. Since the shellac material (Anisotropic Highlights) creates the main highlight, we don't need a strong specular on the raytrace mat. I used very low values overall.
The reflections
And now for the render intensive part: blurry reflections. The raytrace material supports blurry reflections, although they are evenly blurred and not anisotropic blurry reflections. But they are sufficient for this material. Open the Raytrace Controls rollout. Here you can add a neat effect: reflection falloff. It fades the reflection to a specified colour or the background after a set distance. This together with blurry reflections adds a lot to the scene. To get the blurry reflections, turn on Global Antialiasing Settings. Click the three dots to open the Global Raytracer settings. Select the Fast Adaptive Antialiaser, click the three dots in to open the F.A.A. settings dialog. Here you can specify the defocusing and blurring of the reflections. I really recommend that you sit down and render a few tests with it and read the documentation about these settings. You might need to adapt these settings to your scene in the future.
To give the reflections a final touch, put a Falloff material in the reflect slot, name it fresnel. Change the falloff type to fresnel and uncheck "Override Material IOR". Change the IOR in the Basic Parameters to something around 8,0. This makes the object more reflective on the sides and less reflective head on.
The last map is another Falloff map in the Ambient slot. This uses the default values and is just a nice touch to fake bounced light from the environemnt. You can leave it out if you feel like it or if you are using a true GI solution.
That's it. With some luck, your material should look like this when magnified in the Mat.ed.
Here's the mat.tree in all it's glory. If you look at the names, you'll see that it's all instances... Full mat tree.


3DTotal Advertisement - We need your support!

As well as you tutorial hungry people eating through a terabit of bandwidth each month we also have many additional staff and running costs involved in creating these free pages. We want to continue bringing you many free tutorials and resources everyday, so PLEASE check out our products and amazon affiliate schemes via the above banners. Many thanks!



This last paragraph is for professionals only, USE AT YOUR OWN RISK!
The short short short version
You can do it like this, or as a friend of mine (named Iain) put it:
1.
Create sphere.
2.
Apply grey material.
3.
Periodically show it to people who are never satisfied and tweak it until it looks great.
I hope this tut has helped you in some way. If you have any questions, comments, praise and/or job offers, feel free to mail me or drop by #maxforums @ EnterTheGame.com or #CgTalk @ Freenode.netI usually go by the nick Urgaffel or Urg|(something).
Big thanks go to the Maxforums Posse, the Brazil Posse and all the ladies in da houze!
 
3D Total Homepage