delta3d

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

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 World Builder.

Baking Textures

In order to get our terrain ready for our map in the Delta3D Editor we need to bake the terrain textures. This will result in 1 image that will cover the entire terrain. Please note that we will not be going into any advanced UV mapping since it is beyond the scope of this tutorial.

The first step is to apply an Unwrap UVW modifier to our terrain. With the terrain selected add an Unwrap UVW modifier from the modifier drop down list. Once the modifier has been added, open up its sub-menu and select ‘Select Face’.

We now need to select all the faces of our terrain. To make your life easier, just hit ctrl-a to ‘Select All’. You can also ‘Select All’ from the main menu under Edit. The faces of your terrain should now be selected, indicated by red.

From here we need to click the Planar Map button located under the Sub Object Params: for the Unwrap UVW modifier.

Under the Parameters section, press the ‘Edit…’ button to open up the “Edit UVWs” window. This is the area that allows you to modify the UVW coordinates applied to your model. We are only interested in orienting the texture so that it fits within the blue bounding box. You can see this in the following image.

Rotate the selected UV’s so that they fit within the blue border.

I just want to point out one thing before we finish the UVW process. When you applied your Unwrap UVW modifier to the terrain you had it set to Map Channel: 1. This is important to remember because we will be using this channel to bake our models texture.

The final step to finish the mapping of our terrain is to collapse the model. Click on the Utilities tab and hit the Collapse button. In this section hit the ‘Collapse Selected’ button.

Your terrain is now ready to be baked! We are almost done.

With your terrain selected, click on the ‘Render>Render to Texture’ from the main menu. The Render to Texture dialog window will open.

Wow! Look at all those settings! Luckily we are only interested in a few options. Under general settings go ahead and select a path for the baked material output. You will need the output file in later steps. If your terrain is NOT in the ‘Objects to Bake’ menu then you need to select it in the viewport now.

Under the Mapping Coordinates group change the Object: property from ‘Use Automatic Unwrap’ to ‘Use Existing Channel’. The Channel needs to be 1.

Click the ‘Add…’ button located in the Output section and select DiffuseMap from the list. We are going to be creating a diffuse map for our output and then assign it to our terrain in later steps.

Select Diffuse Color in the Target Map Slot: drop down menu.

Go ahead and select a decent image size, I chose 2048. A larger image will result in a clearer textured terrain.

For the File Name and Type: give the output file a name that is simple. I named mine ‘terrain.tga’. This will be the baked texture filename you will be using in a few more steps.

You can now go ahead and hit the Render button located at the bottom of the dialog, which will generate the output of a baked material to the directory you specified.

Your new preview should look something like the following:

Outstanding! We have a few more steps before we are ready to export our final static mesh terrain.

Press ‘M’ and open up the Material Editor window. Select an empty material slot and name it baked_material. Under the map menu check the Diffuse Color checkbox and then press the None button to assign our diffuse map. After the Material/Map browser window opens, select ‘Bitmap’ from the list. Select our ‘terrain.tga’ file we generated earlier when we baked the textures of our terrain. Click the parent button to return to the top of our material stack.

Drag the baked_material directly on our static mesh. Click the icon in the material editor that looks like a blue and white checkered cube. This will turn on the preview of our texture so we can see what our terrain will look like.

Now all we have left to do is export our terrain as a .3ds file. Click the File>Export from the main menu. The Select File to Export dialog window will open allowing us to choose a name for our file. Make sure that the file type you are saving is *.3ds. You should now have a .3ds file that is ready to be used in the Delta3D World Builder.

Importing a Static Mesh Terrain into the Delta3D World Builder

This section describes the method of importing our new static mesh terrain into the Delta3D World Builder. If you are unfamiliar with the level editor now would be a good time to go back through the tutorials and get reacquainted.

In the Delta3D World Builder set the project context if you have not done so already. This can be accomplished by clicking the menu item File>Change Project.

Select a directory where you want the project to reside on your computer. Once you have done this click the ‘Apply’ button. You will be returned to the world builder when this process is complete.

Setup a new map by clicking the menu item File>New Map. This will open up a New Map dialog where you can set the name and description for your map.

Click the OK button to create your new map. You’re just about ready to add your static mesh terrain.

In the resource window area select the Static Mesh tab. With the Static Mesh root folder selected, press the button at the bottom of the window that has a folder with an arrow icon.

An import window will open up. Select the button labeled ‘…’ and choose the .3ds file for your terrain AND the baked material we applied previously (terrain.tga).

Click the ‘Import’ button once after you have selected your files to import. The static mesh terrain is now added to the project. Right click the static mesh *.3ds terrain file you just imported and click the ‘Create’ menu item. Your static mesh will now be visible in the map viewport.

This short tutorial on the generation of a static mesh terrain should help build a foundation for more advanced terrain building. If you would like a challenge try adding a few more blend materials to the terrain and add a few more textures. The use of layers in photoshop to create heightmaps and 3D Studio Max to generate terrain are both very flexible and powerful tools for creating interesting terrain.

This concludes our tutorial on one method of creating a static mesh terrain.

Trackback

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

No trackback comments for this entry.

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?