Smart Terrain

Welcome to my first tutorial for 3ds max. Here we will try to achieve something that looks like the picture below, by relying mostly on 3ds max's procedural maps. No plugins are required.

Skill level: Intermediate;
Duration: 20 minutes;

I will assume that you know the basics of this software. If not, I suggest you get started with the tutorial cd, and return here in about a month, or when you feel you know your way around and understand things like displacement, meshsmooth and procedural mapping.

Let's start simple. Create a plane, of 550 width and length, with 50 length and width segments. We will be segmenting it to 200 later on, but we don't want any stuttering in the workflow until we set things up. Rename the plane to "Ground01".

Go to the Material Editor. In a new material, create a Smoke procedural map and give it a Size of 200, with 20 Iterations and an Exponent of 2,5. It won't matter if it's in a Diffuse map, or Specular Level map, or whatever. We just need this map configured for the next step

Now, add a Displace modifier to Ground01. Attention not to add a Displace Mesh (WSM) modifier, that's a completely different thing and it's not what we're going for this time. Set the Strength to 180 and then click on Map in the Image tab. The Material/Map Browser will appear and we will Browse from Mtl Editor. We only have the Smoke map we set up previously, so we choose that one

Now the ground should be displaced by our Smoke map. It looks pretty low poly, so we're going to set Ground01 to have 200 Length and Width segments, instead of 50. But make sure to save your scene before doing this. You could experience performance problems if you increase the segments, so if you simply cannot maneuver well, leave it at 50 segments and you will only set it to 200 when you render.

A test render should look like this:

Looks good from the distance but not so great when you get really close. We will solve that by adding a Turbosmooth modifier, but beware, Ground01 will now have 320000 faces and there may be more of those performance issues, so in the Turbosmooth options, set the Iterations to 0 and the Render Iterations to 1, so it only applies the Turbosmooth when we render.

Now off to the mapping. Select a new material and name it GroundMaterial, then apply it to Ground01. Add a Mix type material in the Diffuse Color Map. In the Mix material, set the first color to R:35 G:15 B:0 and the second color to
R:255 G:205 B:100. These will be the colors that the terrain will have at higher and lower altitude. We will make this possible by selecting a Falloff map for the Mix Amount map

Now comes a tricky part. We will go into the Falloff map. Leave the Falloff Type to "Perpendicular", but set the Falloff Direction to "Viewing Direction ( World Z-Axis )". Next, in the Mix Curve tab, we will press Add Point and add a new point to the curve, which we will then right click and set to be "Bezier-Smooth". Set the curve points to look something like this:

Rendering should yield this result:

I'm going for a desert type terrain, where the wind has swept the sand off the cliffs and we can see the dirt beneath it. The next step is adding some bump maps to make it look a lot more detailed. So drag the whole Mix map from Diffuse Color slot and Copy it to the Bump slot of our GroundMaterial.

Let's go into this new Mix map and modify it to suit the Bump we expect to
achieve. For Color #1, add a Noise map. For this Noise map we need to set the Noise type to Fractal, Size to 10, Levels to 10, High Noise Threshold to 0.7 and the X axis Tiling to 2.

Now, go back to the parent map, the Mix map for the Bump slot. For Color #2, add another Noise map, and for this one set the Noise type to Fractal, Size to 2, Levels to 4 and we will also be changing the two colors to R:0 G:0 B:0 and R:60 G:60 B:60. This is so that this noise map is weaker as it will be assigned by the falloff to the sandy areas of the terrain, where we don't need too much bump.



Another change we will make for the bump map is in its Falloff map in the Mix Amount slot. We need to move the first point of the Mix Curve to the top, like this

We're now done with the bump map settings. The last thing to do with it is to set the bump amount to 60, with the slider next to the Bump slot in the Material Editor.

Another render should look like this.

Now we're getting there. It looks a lot more detailed and we can even go closer for a better look. From this angle it looks like a screenshot from a Starcraft Broodwar level in the Desert. What a convenient coincidence.

With the 200 segments and the Turbosmooth modifier, Ground01 looks good at close distance, and the bump map's adding that extra item of detail to it. This is as far as procedural maps go. To make the scene better looking, there are a few more things to do.

Add a Camera, set it to be Free and give it a FOV of 60. Then add a texture of a sky map to the background. There are a few sky maps that come with 3ds max, and if you don't like those, the internet is full of them. You could even grab a digital camera and take a picture of the sky yourself. Next, because the area is windy and dusty, add some Fog from the Environment tab and set it to Layered, a color of R:165 G:150 B:135, then set Top to 120, Bottom to -100, Density to 20 and Falloff to Top. With this Fog type, make sure not to place your Camera too high in the scene, or you will be literally above the fog layer and it won't look too good when rendering. If you're going to do need to place a high camera, then add Volume Fog instead and control it with Sphere Gizmos.

Add some lights to the scene to set a better mood for it. Try to match the lighting of the sky map you chose as a background. Let's render and see how it looks now. Just make sure to use the "Catmull-Rom" filter when rendering with scanline, for a sharper look to your images. To select it, press F10 to bring up the Render options, go to the Renderer tab, and find it in the Antialiasing subtab over at the Filter dropdown list.

Another improvement over what he had earlier. But procedurals can do only as much, and they can look a bit
repetitive. So you should get hold of a tilable ground map, preferrably of sand, and apply it over the Color #2 slot in GroundMaterial's Diffuse Color Mix map. Tile it about 10 times over the X and Y axis, and you should get something like this.

Congratulations! This is it. You can now adjust the Displacement strength and you will see that the procedurals will make sure the high peaks will be noisy and stripped of sand, while the fields will be finer and sandy. Play around with all the options and personalise your terrain.

Now you've got a terrain generator directly within 3ds max. You can do anything you want to the scene, like add characters, some buildings, special effects and more. Your imagination's the only limit now.

Snow? Easy, just change the texture. Mountains? Easy, just increase displacement strength. It's all there now, ready for you to modify and adapt to your desire.

Fetching comments...

Post a comment