Gmax Terrain Tutorial
Gmax Terrain Tutorial
by
Kobbe Farwick
http://realscenes.proboards81.com
I downloaded all of my resources from the USGS Seamless server for this tutorial.
1) If your imagery and mesh files cover a large area, you must first crop them to a size which is
slightly larger than the area you want to replicate in Gmax.
Save the North, West, South, East boundary information to Notepad for later use. Then
go ahead and save the GeoTIFF with a name such as, “photo_cropped.”
Then go to Tools > Configure… > and under the “Projection” tab click “Save to file.”
We will save the projection to use on our mesh, so we can crop the mesh to the exact
dimensions as the imagery. Name the projection file as “Photo_Projection” so you
know what it’s from.
2) Now unload the imagery off of Global Mapper, and then load up your mesh data.
Change the shader to Gradient Shader from the drop down box on the tool bar:
If your Gradient Shader does not use black and white, you can change this by
going in to Tools > Configure… > Shader Options and changing the Low/High
colors to be black and white.
Go to Tools > Configure… > Projection, then click Load From File and browse
to the projection file.
4) Next go to File > Export Raster and Elevation Data > PNG…
Be sure to select the File Type as “24 Bit RGB” for full quality.
Under Export Bounds tab, select the Global Projection (UTM) radio button and
enter in the corresponding data that we saved in to Notepad earlier.
5) You now have a height map sized to the cropped aerial imagery which we will be
using in Gmax.
Open both your height map, and cropped Tiff file in your image editor. You will
notice that the height map is significantly smaller than the imagery. For better
results in Gmax, we need to fix this.
Go ahead and save the finished height map with a name that you will recognize to
be the finalized version.
DO NOT stretch your image to that size, however. In Photoshop, edit the canvas
size to 2048 x 1024 or as needed.
My method of creating the 1024 x 1024 tiles is, first making a 1024 x 1024
document, filling it with a color, then pasting the square in to the resized
imagery. When you do this several times creating a checkerboard effect, you
can simply load the selection of the square and copy from your imagery layer,
pasting it in to a new document for saving as a bitmap tile.
7) You are now ready to move in to Gmax, where it all comes together!
You should know the resolution of your imagery. In my example I am using 1
meter per pixel resolution.
In Gmax you will be creating a plane the size of your entire resized image (2048
x 1024 in my case)
It’s easy to determine the size of the plane in my case, but if you had .5 meter
resolution imagery, for example, you would need to multiply the length and
width of the image in pixels, by the resolution.
So I will be creating a plane sized 2048 meters wide by 1024 meters long.
8) When you create the plane in Gmax, you will want to have a fairly large amount
length segments and width segments. You might think this will create a huge
polygon count, but don’t worry, you can delete unneeded polygons later.
However! If your image was cut up in to, say 2 bitmaps along the width, your
width segments must be divisible by 2! Same goes for the length.
In my case, 81 width segments will work best, but I need to change that to 80 so
it is divisible by 2, the number of tiles along the width.
The plane will initially turn to the color gray. Now apply UVW mapping, do not
change any settings, then right click the UVW modifier and choose “Collapse
To.”
Repeat this process until your plane is entirely mapped with your tiles.
10) With your plane textured, we can now create the terrain.
Under the modifier tab in Gmax, apply the “Displace” modifier to your entire
plane.
In the modifier settings there should be a section labeled Bitmap – find this
section and click the button that currently says None. Then browse to and select
your height map file.
As of now, Gmax is placing the modifier on to the entire plane. We only want it
applied to the area with the imagery being shown. To do this, expand the
Displace modifier and click on Gizmo.
You should then scroll down to the Map section in the modifier settings to find
an area to change the Length, Width, and Height of the gizmo.
This needs to be changed to the size of the imagery. In my case, the imagery was
sized 1195x987 pixels before we changed it to 2048x1024. Multiply that size by
the image resolution once again and you will have the length and width settings
for the gizmo.
You now need to change the the “Strength” setting under the Displacement
section. The correct setting comes with experimentation – A number between 300
and 500 has worked best for me.
If you want to ensure accuracy, create 2 objects and place them at different points
on the mesh and record their distance along the Z axis (Up and down.) Now go in
FS and measure the altitudes of those same two points. Compare the altitude
differences of those two sets of data and edit the Strength setting to bring the
numbers closer together.
11) You can now delete the excess polygons around the edges. My experience has
shown that leaving the cliff-like sides is better – So when placed in FS you won’t
have to “tuck in” any edges that do not match up exactly with the terrain.
12) The only thing left to do is convert it to a landable platform. This is done with
the attach tool included in the FSX/FS2004 gamepack. See your SDK or
FSDeveloper for more information on how to do that.
Placement of the object in to FS will require some trial and error. Having a program such
as EZ Scenery to move the object around in real time helps immensely.