Terrain Editing

Huge thanks go to The Tiny Pebble for all the information gleaned here.
Additional thanks to Valkyra and Lasko for additional information and clarification.

This image has an empty alt attribute; its file name is t1.png
  • Map Size needs to be a multiple of 2048
  • useGlobalWaterTable determines whether or not there’s always water at the globalWaterTableHeight, which determines the z co-ordinate of the water.  Decimals can be used.
  • globalWaterTableShaderSize – usually set to 2 – unsure what changing it will do at present.
  • ShaderName is the name of the SHT shader file which affects the colour and look of the water. Shaders can be found in the shader tree in SIE.
  • timeCycle is the number of seconds for the day/night cycle.

You probably won’t need to change any of the other settings.

SGRP – Shader Group

  • ID is used to reference the shader group within the terrain editor.
  • Name is purely for information.
  • Surface type specifies the surface file to use with this shader group. It’s thought that this can affect the sound of walking etc.
  • Display colour is for easy identification. You can colour them the same as your regions for easy identification.
  • Size and Weight can be left as 2 and 1.
  • ChildCount specifies the number of shader variants – in this example, 3.
  • Child shader [] specifies the shader name.
  • Child weight [] determines how often that particular variant is used.

FGRP – Flora Group

  • Family ID is used to reference this specific group
  • Family Name is purely for information
  • Color is used for quick identification. You can colour them the same as your regions for easy identification.
  • Density is used to specify how densely clustered the flora will appear.  This can be overwritten when building the terrain.
  • FloatsOnWater is useful for lily pads, flies etc
  • ChildCount indicates how many models and/or particles you’re using in this family. 
  • Child:appearance filename [] specifies the .apt or .prt file to use. You can find these in the appearance tree of SIE.
  • Child:weight [] determines how often this variation is used
  • Child:sway on/off [] is useful for long grass and similar
  •  Child:displacement [] and Child period [] are used to vary the pattern, but can generally be left alone
  • Child:align to terrain [] : normally flora will align vertically regardless of the terrain, but with this you can make your FGRP go align horizontally.
  • Child:scale on/off will give some variance in size.  It doesn’t work on all flora.
  • Child: min scale, Child:max scale specify the limits between which scaling will occur.

RGRP – Radial Group

  • Radials are textures, planted on the terrain, such as grass
  • eg. The golden grass on Corellia
  • or radials are far away, such as in forests to give the illusion that there are more trees than there actual are
  • Shader details work as per FGRP

EGRP – Environment Group

  • This group is for assigning an ID to a region
  • You can change the colour here to match the ones set previously
  • The Name needs to match the name in datatables/environment/planetname.iff

MGRP – Multi-Fractal Group

  • The fractal group is used to create all the patterns you see in, well, pretty much everything.
  • Without an actual editor to view the patterns, it’s a trial and error area.
  • Each pattern is usually used, either with a colorramp to give an organic feel to the texture, to give a shading effect to an otherwise flat colour.  Like, say, sand on Tatooine… The stock texture colour is obviously a solid yellowy orange, but the fractal pattern and colorramp will make it look more natural adding slight shading variations over a wide area.LASKO
  • he ID and Name are located in the DATA chunk above the highlighted one
  • It’s usually easiest to copy MGRPs over from other planet regions that have the terrain you’re looking for

LYRS – Layers

  • The LYRS chunk contains all the individual layers
  • and you can have layers within layers
  • Keep the file structure between the two LAYR chunks, as that has some important info
  • In the DATA chunk you can turn the layer on/off, which is useful for testing
  • And you can set the Layer Name,which is again like a comment
  • In the ADTA chunk you can invert the boundaries and the filters, which can be useful

FILTERS

  • There are multiple ways to filter in the terrain editor, this is useful when you want to apply or remove any of the families (SGRP, FGRP, RGRP, EGRP, MGRP)

FFRA – Filter Fractal

  • In the DATA chunk in the IHDR you can turn it on/off and name it
  • In the paramaters PARM chunk you set which MGRP isused by the ID
  • The feathering function (0-3) determines how aggressive the feathering, or smoothing between the terrain, is
  • Feathering is used to have a smooth transition between varied terrain
  • Play around with the rest of the numbers to get a desired effect
  • Distance seems to be in meters, but that also depends on the function

FSLP – Filter Slope

  • This is filtering by the angles of the terrain
  • You have a minimum angle and a maximum angle, and a feather function
  • Inverting the filter means you can add/remove stuff outside these angles instead

FHGT – Filter Height

  • You set a range, like with slope filtering
  • And can then add/remove stuff within that range on the z axis

FSHD – Filter Shader

  •  You just reference a SGRP ID
  • to either add/remove to everywhere that shader is used

The Layer Structure

  • Layers are applied sequentially, so the bottom one overrides the top one
  • And then, within layers themselves, rules apply into a child apply layer group
  • So if you have a boundary in the parent layer and make a child layer group within that, then those changes will only apply within those boundaries
  • Boundaries are limiters, not unlike filters.
  • Except these work in a set area defined by co-ordinates
  • CircleBoundary, BCIR

BCIR – Circle Boundary

  • Probably the most used boundary, you set the center by x and y coordinates, the radius and the feathering
  • You can NOT set a local water table with this though

BREC – Rectangle Boundary

  • You set the borders (left, right, top, bottom) with coordinates
  • You can set the feathering function
  • And then you can define whether to use a local water table or not
  • The setup is the same as how it was in the very first picture
  • You cannot go below the global water table (even though there’s a toggle in it, doesn’t seem to do anything)
  • But Theed for example is set with a local water table

BPOL – Polygon Boundary

  • With this you can plot a boundary using co-ordinates
  • Connect the dot style
  • You can also set a local water table using this

BPLN – Polyline Boundary

  • Similar to the polygon boundary, this is a connect the dot style
  • Unlike the polygon, this doesn’t close itself off to create an area, but rather it creates a line from start to end along the co-ordinates
  • You can not set a local water table with this, but you can set the width

AFFECTORS

AENV – Affector Environment

  • This is how you define the EGRP
  • Just associate it with the same ID.
  • Feather Clamping is whether or not the shader is applied to the boundaries set, or the boundaries after feathering is applied

ASCN – Affector Shader Constant

  • Same with the AENV, this is how you apply a shader within your boundaries and filters
  • Associate it with the same SGRP ID
  • Feather Clamping is whether or not the shader is applied to the boundaries set, or the boundaries after feathering is applied

AFDN – Affector Radial Near Constant

  • Affector NEAR Radial
  • Associate it with the correct RGRP
  • This is the low grass you see around the worlds
  • There’s an option to remove all the flora, and override density

AFDF – Affector Radial Far Constant

  • Same as above, this is used for radials that are set off almost as a theater background when you look around
  • Same as above, this is used for radials that are set off almost as a theater background when you look around

AFSN – Affector Flora NON-Collidable Constant

  • The AFSN group is set just like the radial groups, you just reference your FGRP instead
  • The non-collidable are usually for plants etc, but also for particles
  • You can also add some fog and stuff, smoke, geysers,bugs, snakes, ie. critters that add to the whole

AFSC – Affector Flora Collidable Constant

  • Usually for trees and larger plants
  • Set up exactly like the others
  • references FGRP

ACRF – Affector Color Ramp Fractal

  • This references the MGRP fractals
  • It applies an overlay of a colorramp (can be found in terrain/)
  • This is used to give some variance in the color of the terrain

Affector Shader Replacer

  • This replaces one shader with another
  • Can be quite handy if used with filters

AHCN – Affector Height Constant

  • This has two functions (0 and 1)
  • 0 changes the height to whatever you set it to 1 adds or subtracts from the height

AHFR – Affector Height Fractal

  • This is used to produce the height, size and shapes of the terrain you walk on. Depending on the fractal pattern and the height value you set you can make anything from the gently rolling grasslands of Naboo to the jagged mountainous regions of Mustafar. LASKO
  • This references the MGRP
  • And it changes the height in the pattern of the fractals
  • This is how you make rolling hills and the like
  • Or small recurring bumps
  • It has a function option (0-3) which determine show aggressive it is
  • You will have to play around with the MGRPs to get the desired effect
  • But it’s one of the more important features to get a dynamic world

AHTR – Affector Height Terrace

  • This will flatten some or all of a hill/mountain at specific intervals
  • Can give these interesting flattened ‘rings’ around a mountain as you go up
  • A lot of information, the easiest way is to just try it out

FBIT – Filter Bitmap

Ok, so this bit is all mine.  Thanks to Valkyra for the heads-up that FBIT existed! The pre-CU client only supports FBIT 0000, while the NGE client has support for FBIT 0001.  The only difference as far as I can tell is that 0001 allows declaration of gain.

Note from takhomasak: It’s believed that using bitmaps for the terrain can cause desync around the borders of the bitmaps, so take care when using them. I’m assuming that using a single bitmap for the entire planet will not cause these issues.

This is a cool and much faster way to flesh out your landmasses for the planet.

  • First, create yourself a bitmap of your overall planet (this could be the scanned sketch of what you want, dragged into Photoshop and filled in).
  • Here’s the trick, white for the highest spots (#ffffff) and black for the lowest (#000000), shades of grey in between.  I tend to use black for the underwater areas and work upwards from there. Save it as a Greyscale .TGA 24 bpp, uncompressed in the terrain/ folder. 

terrain/example_fbit.tga
  • You’ll need to create a LAYR with a BREC defining the area that the FBIT will apply to.  For my attempts. I created a BREC that covered the entire map.  Here I also specified the overall shader for the map
  • then comes the FBIT which specifies the bitmap and it’s minimum and maximum height.
  • The Family ID refers to the MGRP->MFAM to identify the shader that will be used for the bitmap. Type 0000 is not the correct template for FBIT MGRP, so here’s a template that you can use for it
  • and you then specify the bitmap within the MFAM for the family 

View from the North Shore looking South down the river

An example of the Far Radial Affector

Overhead Map

Create a square .DDS overhead map for the planet, eg. 1024×1024, and place it in the texture/ folder, eg. texture/ui_map_planetname.DDS

You then need to reference it in ui/ui_planet_map.inc, as shown below

<Page
  BackgroundColor='#FFFFFF'
  Name='planetname'
  OpacityRelativeMin='0.50'
  PackLocation='nfn,nfn'
  PackSize='a,a'
  RStyleDefault='rs_default'
  ScrollExtent='485,440'
  Size='485,440'
  Visible='false'
>
<Image
  BackgroundColor='#FFFFFF'
  Name='a'
  PackSize='a,a'
  ScrollExtent='485,440'
  Size='485,440'
  SourceRect='0,0,1024,1024'
  SourceResource='ui_map_planetname'
  VisualEditLock='true'
</Page>