Upload
others
View
2
Download
0
Embed Size (px)
Citation preview
Advanced Terrain Creation
Introduction
This document will discuss the refining process of terrain creation using advanced Worldmachine
techniques and the creation of a new climate within L3DT.
Worldmachine.
From the diagram I have added a few more devices and created a more advanced network.
1. This is the original terrain from the previous document.
2. Grouped is a copy of this set up with some additions.
3. Layout Generator is a device that enables you to add various shapes and splines to the
heightmap. I find it quite useful for adding in extra mountains, rivers and sloping roads.
4. An additional perlin noise generator.
5. A combiner, this combines the height output from two devices. There are various methods of
combination, Average which mixes the outputs, Add which adds the output from one device to
the other, Subtract, Multiply and more. It’s worth experimenting to find which methods suits. A
strength slider controls the amount that is mixed.
6. Splitter, this is very useful for splitting the height output to be processed with different filters.
7. Height selection and erosion. In this example I wish to use two differing methods of erosion, one
for low altitude and one for high, using the height selection device as a mask enables me to do
this.
The output from the height selection will look like this.
As opposed to generating a 3D map the height selection will convert all your height data back to 2D,
the primary output from this is then used as a mask input for a variety of devices including erosion,
perlin noise, etc.
Double clicking on the height selection device opens up this dialog box, the two vertical sliders affect
the minimum and maximum height range, fall-off adjustment is controlled by the horizontal. From
this example I want to erode a small range at a high altitude, fall-off is high as I want a soft mask, I
have inverted the selection and resulting mask is seen in the render above.
Using the splitter device with the height selection device I can simultaneously adjust and filter
differing parts of the terrain. It is important to note at this stage as to what the reasoning behind
this is, using two different erosion techniques at various height levels mean I can emulate a more
naturalistic weathering effect. You will also find that erosion can reduce the height of some of the
terrain and level it off, another reason for selective erosion.
Below I will explain the various passes I take the terrain through.
This is the first pass with the addition of some more raised terrain provided by the layout generator.
The diagram below shows circles with differing fall off affecting the terrain. Double clicking on one
of these shapes opens a dialog box.
1. This will affect the overall maximum height of the shape, opacity will control how much of the
shape will show through.
2. Fall off distance will feather the shape, the greater the fall off the more gradual the change in
terrain around this shape.
3. Fall off profile controls the intensity of the fall off, a diagonal will mean a constant transition, a
concave profile will provide a sharp transition, convex will provide more of a plateau and an S-
bend will soften the transition at the base and peak of a shape.
This is a very quick terrain manipulation process and can be used instead of editing the photoshop
file to provide more changes in terrain. Using splines in the same way, it is very easy to place in
sloping roads, rivers and mountain ranges. For now we will stick to simple circles, it is worth noting
at this point that I have also checked an additional option enabling the shape to be broken up.
This helps to add a more natural feel to the shape.
In the second pass I have added an additional perlin noise generator. This is providing a change to
the base terrain, there is no mask input of the layout design here as I just need an overall base to
place the layout on.
The combiner in the third pass is now used to mix these two terrains together.
I have used the ‘Add’ method to retain the original layout, these values are then added to the 2nd
perlin noise device. It is best to reduce the elevation centre on the 2nd device so as not to create
peaks that ‘clip out’ and level off.
The final stages of refinement involve erosion. As explained earlier I have used to two differing
erosion methods.
Here I have eroded the lower altitude with a more subtle technique. The higher altitude area is
more intensely
eroded.
The two results are then combined using the average method with a 50% mix of the two.
At this stage we are still using a 1024 x 1024 scale in Worldmachine which has been perfect for
render previews however now is the time to increase the resolution and tighten up the terrain. Go
to World Commands>Project World Parameters and change the resolution to 2048 x 2048, set up
the height output to save out a new *.r16 and write the output to disk. This will take considerably
longer.
Currently with this project there is only one tile which will repeat quite obviously in the game, it is
essential that a generic tile is created, one with no unique features that can tile with itself and the
main ‘game area’ tile. For this, copy the 2nd perlin noise device and one of the erosion devices,
create new height output device and link these together. Write a new *.r16 file to disk. Open the
resulting file in photoshop as a raw document and edit it to self tile, save this out as a *.r16 file again
and bring it back into Worldmachine.
Use the same set up as before for exporting to L3DT, now that we have a high resolution render take
the project resolution back down to 1024 x 1024, the higher resolution was only needed to create
tighter detail in the noise and erosion passes.
1. This time add the extents mask macro to the mask input of the File Input device (remember to
load the latest *.r16 render here). This is a macro I have created to mask out the edges of the
central tile, this only works for one central tile feel free to edit a copy of this to work for multi
tiled worlds.
2. Create an additional File Input device and load the generic tile this will now be combined using
the ‘Max’ method at full strength.
Above a before and after, the generic tile and the generic mixed with the main tile. Both outputs are
now ready for export. In the work area I have split the generic file to work with the main tile and to
also be passed through the L3DT macro. Export both of these terrains to the *.BT file format.
Please note the above describe method is not the only way to achieve this, it can also be done in
photoshop, however even working at 16 bit using feathered masks tend to produce a stepped
gradient.
L3DT.
Import the *.BT file into L3DT ensuring horizontal and vertical scales have been adjusted, before
going to the Calc. Wizard go to Climates>Climate Manager, a dialog box will appear.
Creating a climate from a blank file is very time consuming and complex, luckily there are basic
templates to work from, Temperate (jungle, grasslands, etc.), Arctic (mountain ranges, snow
wastelands, etc.), Desert (savannah plains, canyons, etc.). Select one and copy it.
The Climate Editor dialog box appears.
1. Name the new climate to something relevant to the new environment.
2. Go to the File name path box and the ‘Set climate filename’ dialog box will appear, save this in
the appropriate folder and continue.
Go through the ‘Calc. Wizard’ process, and this time look for the newly created climate.
Choose this and continue to the final stage of the process. Go to Climates>Climate Manager and
with the currently used climate highlighted go to edit open the Climate Editor dialog box.
In this diagram there are a lot of ‘land types’ that have been disabled (shown as /*name*/), to keep
things less cluttered delete these. There are now (in this example) nine land types left. Land types
are tiled textures, consisting of sand, rock, vegetation, snow, etc. Select one and go to edit. This will
call up the Land Type editor, here there are three tabs.
General: here the land type name and colour can be changed. I find it quite useful to change the
colours to match the attribute maps in game, this way attribute maps can be used very quickly
without the need to edit and change the colours in Photoshop, later when refining that editing will
be required (although doing this provides you with a useful colour key).
Parameters: possibly the most complex area, this defines what altitudes and slopes land types will
appear on, the base score decides the probability of that land type, the higher the score the more
often it will appear. It is very easy to get lost in tweaking these parameters, so ensure that the
results of the experimentation are worth it, e.g. I found that sand had a limited altitude range and I
needed it to appear on a plateau, in this instance it was worth my while to tweak these values for
that to happen. Tweaking it to affect subtle changes is not so worthwhile.
Texture layers: this is perhaps the most useful section as we can edit and replace texture types, it is
worth trying out a lot of texture types, and to not think too literally.
To edit the textures, select one and press edit.
In the texture layer settings dialog box double click on the texture file name, this will then take you
to folder where the texture is stored, here a different texture can be applied, you can also add your
own. There are a few parameters that can be changed here such as ‘Weight’ (equivalent to opacity),
blend mode has two options, add which adds the pixel values of two textures or more and mod
which is ideal for greyscale detail textures, bump maps (bear in mind that this 1024 texture is used
over a 20 square km region the effects may not be too noticeable) and ColMod (colour modulation,
colour tints can be applied to a texture).
Remember at each stage of editing calculate an attribute map and then a texture map.
Photoshop.
This next process is about refinement and should be done once all major tweaks have been
implemented. In this file the attribute map can be finely tuned to produce a more subtle distribution
of the medium range textures (Mat 0 – 4, see previous document).
Open the ‘MP_03_01_AM.png’ saved from the above process and create a series of layers, add a
colour overlay layer style to each one. Name each layer to its corresponding medium range texture
name.
Select the different colours and fill each corresponding layer, the attribute map is now broken down
into separate elements to be edited. A certain degree of experimentation is required here as there
are no rules as to what will work with all environment types, what must be consistent though is the
subsequent tiles that will be created for this particular environment. It is also worth noting that I
have additional textures grouped here, such as the TX (texture map), LM (light map) and DM (tree
distribution map), further refinements are made here to each of these stages having them grouped
and in one file helps to match things up.
Medium range textures.
The medium range textures are modulated against the TX and get drawn when player is fairly close
to the terrain, which in Stormbirds happens a lot.
Circled is where the medium range texture is starting to appear, in the distance the texture is not as
intense.
There are four medium range colour textures (Mat 0 – 3) and three greyscale detail textures (Mat 4).
These textures exist in ‘C:\data\Flightsim\Campaigns\South Pacific\Terrain’ and are globally used for
each campaign world, in the above example, ‘South Pacific’. As in the L3DT stage of texture creation
experiment quickly with different textures and bear in mind these are modulated against the TX
map so the textures need to be quite light and yet to also colour match when fading in. Each colour
texture uses the alpha channel as a specular mask, again when creating these try not to be too
literal, from the example below these masks do not match up exactly and it is this that creates a
varied and naturalistic effect.
High detail textures.
The application of high detail textures (Mat_4) is achieved through using the TX map. Each greyscale
texture occupies a colour channel in the Mat_4 texture, i.e. sand/stones in the red, rock cracks in
the green and concrete in the blue. This is one example only, you may find that you require more
grass-like detail passes, or tarmac instead of rocks and stones. In the example below I am using the
red and green channel of the TX map, create a duplicate layer and on the one layer fill in black all
channels apart from red and on the duplicate all channels apart from green. On the green channel
change the layer mode to dissolve take the opacity down to 25%, next create a new layer fill with
black and take the opacity down to 50%. The result should look like the example below. I make
these maps quite muted as the high detail textures mix over the medium range textures and at full
intensity tend to dominate making the medium range less visible. The use of dissolve helps to
randomise the distribution of the detail texture (as these are tiled quite tightly) making the repeats
less obvious.
Summary
From this document you will have gained some insight into making a more refined terrain, these are
only guidelines though on achieving desired results from the software, the bulk of the work for truly
excellent terrain is through research, observation, iteration and practice, so have fun.
Any questions about these processes feel free to ask.