Join Aaron F. Ross for an in-depth discussion in this video Mapping a gradient ramp, part of 3ds Max: Advanced Materials.
- [Instructor] To begin our chapter on advanced mapping, we will look at an interesting technique for remapping colors. This way, we can map brightness onto a ramp to create a new color palette. In this case, we will apply different colors to this sculpture based upon the ambient occlusion pass that we rendered in the previous chapter. We will make it so that the crevices are darker, and that's also known as dirt map. Let's open up the material editor. We've got a physical material for each one of the three objects in the sculpture, the helmet, the hair, and the body.
They're all identical right now. Double-click on one of them, and we can see that we have a little bit of subsurface scattering, down to a depth of zero point five centimeters, and we have a reflection roughness of point five, and also a base color, or diffuse roughness of point five. Next to each one of these, I've got an ambient occlusion map, once again, that we've created in the previous chapter. Let's do the body first. We're going to create a gradient ramp node.
It's found in maps, general, gradient ramp. Drag that over, and then connect the bitmap output to the source map input over the gradient ramp. Then, connect the gradient ramp to both the base color, and also the subsurface scattering colormap. If we look over in our viewport, notice that we cannot see the map applied onto the surface. If we connected this bitmap up directly, it would show in the viewport, but because we're using this gradient ramp in this special mapping mode, it's not supported by the viewport.
Double-click on that gradient ramp, and rename it, call it body ramp, and then immediately go down into the gradient ramp parameters, to gradient type, and switch that over to matte. Now we see a thumbnail of that image inside the gradient ramp node in the view. Double-click on the thumbnail just to make it larger. This is what we get with a default linear black and white ramp.
If we start moving these flags around here, we can see that it's changing the color in the preview here. Let's change up these flags. The flags at either end cannot be moved, and they are always going to be at positions of zero, and 100, but we can move flags around, and we can create them as well. Additionally, we can change the interpolation type, and that's the transition between these different color flags.
Let's switch that to ease in. That's going to give us a bit more contrast. This leftmost flag, I can select, and right-click, and go into edit properties, and here we can see its position is locked to a value of zero. Click on the color swatch. I've got some values I figured out would work well here. How about a hue of 25, and a saturation of 128, and a value of 200.
We can click okay, and now you can see the black background has been re-mapped onto this color. Let's copy that color. Right-click and choose copy, select the middle-most flag, and we're just going to paste that color in. Right-click, and choose paste. Also, change the position of the flag here. Let's set it to a value of 33. That has moved it over to one third the distance.
Last, let's set a value for the rightmost flag. Select it, and click on its color swatch, and change out the values here. Hue again of 25, saturation of only 30, and a value of 255. Okay, we've set up air gradient ramp. We can close the flag properties. We want gradient ramps for these other bitmaps as well. The values for those are going to be slightly different, based upon the intensity of the original ambient occlusion pass, but I'm just going to duplicate this one.
Hold down the shift key, and drag, and connect the hair to its source map, and connect to the base color, and the SSS color map. Double-click on that to make some changes. We can rename it to hair ramp. Let's just delete this middle flag. Select it, right-click, and choose delete. Then, the leftmost one, select it, right-click, and edit its properties. Go into its color swatch, and we will just reduce the saturation a bit here, to 64.
Click okay, close that flag properties dialog, and we will do one more duplicate. Shifts dragged the body ramp node, bring that up, connect the helmet to the source map input, connect the output of the gradient ramp, once again, to the base color map, and to the SSS scale map, double-click the gradient ramp, and rename it helmet ramp. We can customize this one as well.
Select that middle flag, right click it, and edit properties. Just move its position down a bit, to 84, and now it's moved down here. Okay, we've set up his materials according to parameters I had established in advance. Normally, of course, you would need to do a lot of test renders, or maybe have active shade running while you adjust the materials, but this should look pretty good. Let's close the material editor, and go back into our render set up, and just change the file output name.
Click on files. I'm just going to change the filename to 05 01 gradient map 02 dot png, and click render. Okay, here are the before and after renders. We can see that the gradient ramp is darker, and more saturated in the crevices of the sculpture.
- Streamlining material editor workflow
- Managing XREFs and materials
- Laying out a scene for material testing
- Using the Physical Material
- Controlling highlights with Roughness
- Directing reflections and refractions
- Simulating translucency and scattering
- Building a shading network
- Combining and color correcting maps
- Baking maps such as ambient occlusion
- Procedural mapping with Substance
- Using relief maps: bump, normal, and displacement