delta3d

Static Mesh Terrain Creation in 3D Studio Max: Part 1

There are various types of terrain that Delta3D supports. This includes DTED data, procedural terrain, and static mesh terrain. In this tutorial we will cover one way of creating a static mesh terrain in 3D Studio Max. In order to complete the steps involved in this tutorial you should be familiar with the basics of 3D Studio Max and Photoshop. Be advised that this is not rapid generation of terrain and may take an inexperienced user a few hours to complete. The following describes the steps required to create a simple static mesh terrain that can then be imported into the Delta3d Editor.

Heightmaps

In order to create a shape for our terrain with various valleys and interesting crenulations we will need to create a few heightmaps. Heightmaps are images that use the grayscale spectrum of 0 – 255 where 0 (black) represents our highest point and 255 (white) represents our lowest. In this case we are generating an 8-bit heightmap, however 16-bit is also supported.

Open up a copy of Photoshop and create an image that is 256x256. Select the paint bucket tool and then select white as a fill color. Fill the canvas to make it entirely white. Using your brush tool and selecting black as your brush color, paint interesting paths on the canvas. These will be the lowest areas of your terrain. Be aware that you want to create an organic shape for your terrain, which can be achieved by varying the thickness of the black areas. The following is an example:

The smudge tool in fingerpaint mode helps to blend the white into the black. After the image is thoroughly smudged go back through with the blur tool and get rid of any large contrasts.

Make sure to save this file as base_heightmap.psd so we can use this layered file later for texturing our terrain. Creating a blended seamless texture for our terrain requires that we revisit Photoshop in later steps. Create a base_heightmap.jpg file from the layered psd file, make sure the name matches the tutorials since we will be referring to this name later.

Planes

Open up 3D Studio Max and create a plane that is 1000w x 1000h. Make sure that the plane has approximately 75 rows and columns. When the heightmap is applied to the plane the columns and rows will help define the detail. Keep in mind the more rows and columns used will create a mesh with more faces. Too many vertices and faces on a mesh can cause problems with processing in all rendering engines. Depending on the complexity of your terrain you might need to increase or reduce the column and row numbers.

Now we need to apply the heightmap to the plane. To do this we need to use a Displace modifier applied to our plane. Select modifiers>Object Space Modifier>Displace and select the Planar Map type option. Click the Bitmap button under the group Image. Double-click the bitmap map type in the material/map browser that opens, and then select the base_heightmap.jpg file you created earlier. Now under the Displacement group increase the strength to around 100. Your plane should now transform using the heightmap information.

If you feel comfortable with 3dstudio max you can use the paint modifier to push and pull vertices of the plane to slightly tweak the mesh terrain (3dsmax 7). If your version of 3ds max does not have the paint modifier you can use vertex selection and the translate tool. If you’re moving vertices by hand than I suggest you use soft selection to weight the movement of vertices and achieve smoother contours of the landscape.

You do not want to make large changes to the terrain as it will cause problems with texturing in the following steps.

This is what the terrain resembles using the heightmap displayed above.

And here is a shot of our un-textured terrain rendered in smooth mode.

Seamless Texturing

In order to create seamless textures on our terrain we will be applying a blended material. The blending requires that we create a few additional heightmaps that will define where one texture begins and the other ends. Since this is the basics of terrain creation in 3D Studio Max we will only be blending 2 materials (grass and dirt).

Heightmaps Revisited

In Photoshop open up the base_heightmap.psd file you created from the previous steps. We need to define the areas of our terrain where our textures will blend. Duplicate the base_heightmap layer and create a new layer named blend_heightmap. With the new layer selected, increase the contrast and brightness to encroach the white areas of the image into the black. This is a quick way to create a blended heightmap.

You should now have a new heightmap with the desired blending areas defined. Save this file as blend_ heightmap.jpg.

Blend Material

Now jump back to 3D Studio Max and open up the material editor. The material editor can be selected in the Rendering menu or simply by hitting M.

You should now see the following window.

The material editor is a very powerful tool that will allow us to define our terrain textures. Select the first material slot and then click the button labeled “Standard”.

A new dialog will open asking for the type of material to create. Select ‘Blend’ and press the OK button. Now Change the diffuse color for the 2 adjacent material slots, make one material green and the other brown. Next to the eye dropper icon there is a field where you can name your materials. This is a good habit to get into as more complicated scenes can become confusing. Rename the brown texture to dirt and the green material to grass. This will also help us distinguish which materials we need to apply to our blended material.

Click back to the first material slot. We need to modify our blend material and add our modified green and brown materials. The properties for our blend material are as follows.

Just drag and drop the brown slot material on top of the Material 1: button area and the green slot material on top of the Material 2: button area. This will assign our 2 materials to the blend materials. The material name of dirt and grass appear in place of the default values. Now that you have both Material 1: and Material 2: set, click the Mask: button. This will open the material/map browser where you can select the type of material you would like to assign to our current blend Mask. Choose ‘Bitmap’ from the list. When you choose Bitmap you will be asked to locate the file you would like to use, use our blend_heightmap.jpg image that we created earlier. Your heightmap will now be assigned to the blend material. Note that you are in a sub-material menu when you come back from selecting your image. This is where you can set properties that apply to the imported image (blend_heightmap). Go ahead and name the material blend_heightmap and then click the ‘Goto Parent’ button.

After we are at the root of our blend material, drag the material onto our terrain mesh in any of the viewports. When you change the materials in slots 2 and 3 you will automatically update the material in our scene. We only have a few steps left to finish our terrain.

Assigning Bitmaps to Materials

Select the brown texture in material slot 2. Open up the expandable menu heading labeled Maps. Select the Diffuse map. This will open up the material/map browser which you’ve seen previously. Double click Bitmap in the list, this will open up a file dialog. Now find our dirt material labeled grey_dirt.jpg and click OK. Click OK again to return to the material editor. Repeat this process for the green material in slot 02, except in this case choose grass.jpg as our image. Your final blended material should look similar to the following.

Select Render>Render from the main menu. If you do a render of your terrain you should have something that looks like the following.

So far we have learned how to create heightmaps, use the displace modifier in 3D Studio Max, and create a blend material that we applied to our terrain. The following sections will introduce baking textures, using the uvw unwrap modifier and then saving our terrain in a format that’s ready to export into the Delta3D Editor.

If you're ready for the next part of the tutorial click here.

Trackback

Trackback URL for this entry: http://delta3dengine.org/trackback.php?id=2005070111291094

Here's what others have to say about 'Static Mesh Terrain Creation in 3D Studio Max: Part 1':

f-store kortingcode from kortingscode f-store
Verse kortingscodes voor de f-store winkel voor besparingen tijdens het winkelen [read more]
Tracked on Friday, July 18 2014 @ 08:32 AM UTC

Static Mesh Terrain Creation in 3D Studio Max: Part 1 - delta3d from bags QwlkYE
Static Mesh Terrain Creation in 3D Studio Max: Part 1 - delta3d [read more]
Tracked on Friday, October 24 2014 @ 03:39 PM UTC

About delta3d

delta3d is a game and simulation engine appropriate for a wide variety of simulation and entertainment applications. delta3d uses best-of-breed open source technologies to create a fully integrated game engine and with content creation tools.MORE

Twitter

User Functions





Don't have an account yet? Sign up as a New User!

Lost your password?