Top 3 Products & Services
Dated: Aug. 12, 2004
Related Categories3D Studio Max
By Terry Ferra
This tutorial will show you how to make a somewhat complex procedural material that would work for some strange organic object. I will assume you have a little knowledge of procedural textures and displacement maps before I start. You will also need the electric plugins from maxplugins.de.
Here is the material that we will be making:
To start, make a sphere, this will be the object we are using to test the material on. Next setup some lights around it so it gives even lighting and more interesting highlights. Also on the sphere add a displacement approx modifier and click on the high button in its rollout. Basically what this is doing is subdividing your object so that when you use the displacement map it will subdivide it as needed when it renders but still show the lower density sphere in the viewports. A warning about using the modifier, if you make the subdivision too high your mesh will be extremely dense. This will cause a long delay before renders start.
Now that you have your scene all setup it's time to start making the material. First thing to do is to select the first material slot. Now change the name to something like "organic" just so you can keep track of it if there are many materials in your scene. Now what I do is unlink the ambient and diffuse slots. Change the ambient to black (this is just something I'm used to doing so you don't have to). Now change the diffuse colour to a brownish colour. This will not actually affect your materials look at the end but it makes it more easily distinguishable in the viewports.
First thing I'm going to show you is how the displacement approx modifier is used. So click on the slot for displacement under the maps rollout and choose cellular. Now once in the cellular map screen set the size to around 8-8.5 and the spread to 0.2-0.4. These values worked well for me but you can experiment with them. Now go back up to the root of your material and set the displacement value down to about 10. This will keep the displacement fairly low but still give a nice effect. If you leave it at 100 it will look really strange because there will be massive lumps coming out of your material. Somewhat like this:
Now that you have it setup, name this map "Cell Displacement" so it is easy to find later when we use it in another part of the material. Now apply this material to your sphere and render. Notice how the preparing objects took a while? And notice how the face count is around 240,000 faces! This is from a sphere that had only 960 if you left it at its normal setting before you put the displacement approx modifier on it.
Now you should have something like this:
Okay for now uncheck the box beside the displacement slot to disable displacement. This will speed up the material editor updates.
Next thing to do is to add a diffuse map. Now we want it to be cellular much like the displacement map but with different textures for the flat parts and for the bumped parts. To do this you use a mix map or multiple mix maps in this case. So click on the slot beside diffuse and add a mix map to it. Call this mix map something like "Diffuse mix 1". Remember about 5 minutes ago when I told you to name the cell map, well this is why. Click on the mix amount slot and when the pick map scene comes up click on the "Mtl Editor" radio button.
Now you see all the maps in your material editor. Select the cell one you named earlier. It will come up asking you whether to instance or copy, select copy because you'll have to invert this map. Once it comes up go down to the output rollout and check the button that says invert. Now go back up to the mix map.
In the mix map set the second colour to blue for now. Once you do this click on the first colour slot (where you add a map) and select another mix map. Name this mix map Diffuse Mix 2. In this mix map add a gradient ramp to the mix slot. This is where we're going to make each cell fade from dark to light. In the gradient ramp material, set the colours to something like this:
Then add some noise to the gradient ramp by setting the amount to 0.33 and leave all the other settings alone.
Once you have the colours set up go to the dropdown menu that is called gradient type and set it to mapped. Now underneath the grayed out source map slot is now usable. Now you want to put the cell map you already used in the other mix slot in here. So click it and use the same method as earlier to get the already used map. This time you'll also want to copy it not instance it. (If any sub-maps show up when you put your already used cell map in click on the cell colour slot and then click where it says cellular under the preview window and click none in the map selection).
Now you ask why did we put the gradient map inside the cell map? Well this is because this material works backwards of what would seem to be the way to do it. The first thing I tried when making this was adding a cellular map, then in the cell colour slot adding a gradient of falloff material. But to make it work correctly the gradient map has to be applied first. This will make a gradient over the entire material. Now you want the gradient to be mapped to the individual cells. This part is what confused me and I had to get help from a friend with. Since it works backwards of what I thought would make sense (gradient inside of the cell map) you must put the cell map inside the gradient. To do this you have to set the gradient type to mapped. This is so that this gradient becomes mapped inside the different parts of a black and white map (our cellular map). It's a little confusing at first but if you take some time to play with it, it will make more sense.
Now you have a mix map the will mix maps within each cell. Pretty cool right?
Now we're going to put in some colour. Go back up to Diffuse Mix 2 and in the first colour slot add an electric map. Name this map Cell Colour 1. In the electric map make the first colour a pink colour and the second a light cream colour. Set the size of the map to 1.0, the width to 0.11, and center to 0.185. Finally change it from fractal to regular. This is all for the electric map. Since this one will be the light part at the top of the cells it should have an interesting look to it instead of just one colour.
Now in the second colour slot of the mix material add a noise map. Name this map Cell Colour 2. Set the first colour to a dark red and the second to a dark blue. Set the size to 4.2, high to 0.95, and low to 0.15. That's all for this map. This map is used to blend from the black base of the material to the light part of the cells.
Now back out to the Diffuse Mix 1 map.
Remember when I said we would get back to do blue? We'll that's what we're going to do now. Click on the slot for colour 2. Now in here put an electric map. Now set the map to turbulence, the size to 2.4, the width to 0.13, and the center to 0.87. The first colour should be black and the second should be a tan colour. That's all for the electric map, name it "Between Cells".
Now go back out to the root of the material. Now you have your cells and a dark material in between with spots. It looks okay but it still needs more work. It's quite flat right now even with displacement so we'll fix that first
Add a noise map to the bump slot. Now leave the colours the same and set the size to 4.5 and set it to fractal and you're done. This will just add a little variation to the surface. If you want more variation you can put a mix map here with two different sizes of noise in each slot and put the cellular map in the mix amount again but this works fine for now.
Now that we fixed up that part lets add the part that makes it look more organic. Add a falloff map to the self-illumination slot. Now set the type to fresnel since this is an effect that occurs very often in nature and in the white slot change the colour to a very light cream. Make sure it's barely cream, just enough so it's not pure white. Now go back to the root of your material. The self-illumination map didn't affect it much here since the displacement isn't turned on. Go ahead and turn it on. Still not much effect? That's because for some reason you have to check the little box up under basic parameters so the manual entry box turns into a black colour swatch. Now you can see it. Now it's a little to bright so turn the value down to 75 in maps rollout.
There you have the material. Now if you want to change the colour of it you can add an rgb tint to the diffuse slot. To do this click on the diffuse slot. It will bring you to the mix map you had. At the top where it says mix click the button that says mix. Now it should have a list of maps. Click on rgb tint. It should ask you whether you to discard the old map or keep it as a sub-map. Keep the old map. Now you'll have the rgb tint and all the other diffuse maps you made below it. To adjust the colour just play around with the rgb values in the rgb tint map.
This is just a quick example of what procedural textures can do if you spend some time playing around with them.
* Note - I realize this resembles a Neil Blevins tutorial but I did not copy it, I made most of this material before I saw his tutorial, his only gave the idea of using an rgb tint material instead of changing colours manually. I give him full credit on the look of the tutorial though and you should really go read his tutorial to since it gives some information mine doesn't but he also assumes you know a lot in his to so they work together sort of. His site is www.neilblevins.com you should go check it out.
Now that you've gotten free know-how on this topic, try to grow your skills even faster with online video training. Then finally, put these skills to the test and make a name for yourself by offering these skills to others by becoming a freelancer. There are literally 2000+ new projects that are posted every single freakin' day, no lie!