Mondkalb's Terrain Tutorial

From Bohemia Interactive Community
Revision as of 22:47, 3 December 2011 by Mondkalb (talk | contribs)
Jump to navigation Jump to search

THIS PAGE IS CURRENTLY IN DEVELOPMENT, contents may change over the next few days.

Guide to creating a terrain

This guide will not explain every single mouseclick that you need to do, it will however guide you completely through the entire process of making a terrain by providing instruction on each step, with a dedicated segment on correctly exporting .emf files and creating satellite imagery used in a terrain. When Possible, this tutorial will provide links to more detailed tutorials about certain aspects. For example there will be links to a dedicated tutorial for creating heightmaps and setting up P:\ drive. You can return to this guide once you finished working through a detailed tutorial and follow the "red line" in creating a Terrin to the next tutorial with more details about how to make intro scene missions.

Think of this tutorial as the chewing gum that is used to make everything hold together.

Having an idea

This is one of the most important parts during the process of making a map: Having an idea all planned out.

Before you start creating a terrain, you should think about the purpose of your soon-to-be terrain, what it should look like and whether you would enjoy making it. Then decide on a size.

For beginners, that is in my opinion people that have never made a terrain ever before, I recommend starting quite small: A terrain of roughly 2km x 2km size. This is a manageable size. Forget about 10km x 10km, 20km x 20km or 100km x 100km for now. You will never finish those and then give up map making in despair. A small 2km² terrain however will let you learn everything you need to know to complete bigger projects. The key to those is to have successfully managed at least one terrain before you start work on a Terrain that you intend to announce and release.

Setting up the tools

  • Download and install BI Tools 2.5 (Or whatever is the most recent version)
  • Additionally you will need IrfanView: http://www.irfanview.com/
  • Also you will need L3DT to create and export a heightmap.

When the BI-Tools have finished installing, you should find yourself with a new drive P:\ on your computer. This is a fake partition that is needed for the BI tools to work fine. No worries, nothing is being destroyed or deleted by this. But also you don't have magically gained new HDD space. It is just a folder that pretends to be a partition.

Go to P:\ and create a new folder. Name this folder TUT_IslandName. TUT being your addon maker's nametag Nametag, what is this? IslandName being obviously your island's name. So, if your addontag would be ABC, and you decided to name your terrain "Roundland", this folder you're about to create should be namend "ABC_Roundland".

Then read through Micro Terrain Tutorial to correctly fill up P:\ with all needed CA content.

Creating a Heightmap

There are many ways of acquiring a heightmap. using real life digital elevation data, imagined terrain or simply something random generated using L3DT. We will focus on the latter in this tutorial, since it is the easiest. If you feel confident enough using other tools, you might skip this step if you already have a heightmap that is 8bit greyscale, though keeping on reading wouldn't hurt.

Terrain size

Now we actually decide for a terrain size. If you want to make a terrain that is 2048m x 2048m large, you can use different heightmaps that allow you to have different terrain cell sizes. A terrain cell is basically a piece of a net. If your terrain cell size is 10m, every 10m on the X and Y axis a point will be modifiable. If you have a 4m cell size, you will be able to modify a terrain node every 4 meters, allowing you to have ditches in terrains, though the overall performance of this terrain might drop drastically if you go insane on the terrain cell size.

Your best choices now are:

  • 256 x 256 px @ 8m terrain cell size
  • 512 x 512 px @ 4m terrain cell size

which will result in a 2048m x 2048m terrain. (I highly recommend this, as all figures are based on a power of 2, which is always good)

Alternatively, your choices now also are:

  • 256 x 256px heightmap @ 10m terrain cell size
  • 512 x 512px heightmap @ 5m terrain cell size

which will both result in a 2560m x 2560m terrain.

For now all we care about is the amount of pixels our heightmap will have.

Using L3DT

So now on to create the heightmap:

Start L3DT. Click on the "Create a new Project"-button MBG TUT L3DT NewProject.jpg and follow the Wizard.

You will want to have the following selected during the wizard:

  1. Designable map
  2. Width & Height = 256 and Horiz. scale = 10
  3. HF/DM Ratio = 64 (4x4px)
  4. Play around whith these values to influence the heightmap (self-explanatory)
  5. Tick "Design Map" and "Heightfield"

Depending on the parameters you provided, you will now be the proud owner of a randomly generated Heightmap. Hooray!

MBG TUT L3DT HEIGHTMAPDONE.jpg

Now, save this project as TUT_IslandName_Heightmap.proj.

Saving

Now go to "File -> Export -> Export active map layer" Select "XYZ" as File format, and save this to P:\TUT_IslandName\source as "heightmap_001.xyz".

MBG TUT L3DT SAVING.jpg

Done!

Setting up a terrain in Visitor 3

Start Visitor 3.

Go to "Project -> New" Set the terrain grid size to "256 x 256" and the Terrain cell size to 10.

Then hit the "Calculator..." button. This is really important! This will set up everything for our terrain satmap.

Ideally you will have a 1:1 ratio for terrain (m) to satmap (px). So we'll go with a 2560x2560px satmap for a 2560x2560m terrain. Click "Apply proposed". Then "OK".

MBG TUT V3 SETUPPROJECT.jpg


Now your screen should show a blue background. But first back to the settings. Go to "Tools -> Project Parameters...". You wills ee that the terrain grid size is locked, but the Texture layers unlocked. At this point, you can no longer increase a map's size.

Click "Add..." and create a new texture layer. Name it whatever you want, and select 20.0x20.0m. The Texture size should always be the double of your terrain-cell-size (In this tutorial 10.0m). [V3_configuration.jpg]

Go to your P:\ drive and create a new folder named "TUT_IslandName_data".

Back in Visitor navigate to "Tools -> Project Preferences...", then enter the name of the newly created folder into the "Folder - Textures" field. Leave "Folder - Objects" blank. [V3_setup_preferences.jpg]

Now we're good to go.

Save this project as "IslandName_001.pew" to "P:\TUT_IslandName\source" [V3_saving.jpg]

Every time you save the island, save it with a new number. (i.e. _002, _003). This way, in case V3 messes up a .pew file, not everything is lost, and you've got a backup to start from.


Now go to "Tools -> System Preferences" and paste this into the second field: "p:\buldozer.exe" -window -buldozer -exThreads=0 -cpuCount=2 -noPause

This will make your buldozer work as smooth as possible.