Terrain Geometry

From CryWiki

Jump to: navigation, search
About this knowledge
Authored by Eshme
Edited by jameszhao
Last Updated on 12/20/2007
Compatible with version 1.0

Once you create a new Map, you're already confronted with the Heightmap dimension and the metric Scale. This knowledge base article explains the intricacies of Sandbox2's terrain dimensioning.

Contents

The Heightmap

Think of the Terrain, as a imaginary flat square Mesh at the beginning, where each point in the Mesh gets its own height given by a pixel in the Heightmap. Thus, the more pixels you give, the more dense or big the Mesh is. It is a grayscale bitmap that can be 128x128, or 512x512 Pixels for example. A good maximum value should be 4096x4096 as for now, for the 32bit Version of Sandbox anyway because its limited by Memory. You cannot change the size afterwards anymore, if you dont want to destroy your Terrain.

Heightmap and Water
Heightmap and Water

The Unit (Scale)

A Unit is one pixel of the Heightmap (Only refered to the Heightmap, other things have their own Units like the Grid). The default Unit size is (1 Unit=2 Meters). Thus a Heightmap of 1024x1024 such Units would equal a Mapsize of 2048x2048 meters. The more Meters per Unit ,the less terrain detail there is but the bigger the map. The default is a good compromise between quality vs size. Remember you cannot change it afterwards anymore. (Or if you do it has no effect) Below, you see 3 examples. On the left is of a Map with a 2048x2048 Heightmap and 2 Meters per Unit. In the middle you see a Map with a 128x128 Heightmap but 32 Meters per Unit. Both maps are 4096x4096 Meters big, but you can see the difference. The right Image is of a map with a 2meter Unitsize.The Heightmap and Water

High resolution (left) vs low resolution (middle) terrain. Unit size vs object size (right).
High resolution (left) vs low resolution (middle) terrain. Unit size vs object size (right).

The Mapsize

The Mapsize is the definition of the physical worlds size in meters. Its the combination of Heightmap size and Unit size (example 1024pixels² x 2m²per 1Unit² = 2048m²). Every item and physics abides to that luckily. Trees are as high as you would expect for example. World coordinates represent the Map position in meters by lenght, width and height. The limit seems to be 8192x8192 meters for 32bit Sandbox. A good way to find out how big your Terrain should be, is by sketching it first. Of course ,the bigger it is, the more Resources you need, and the more time you will spend on the Map. The Height will be covered further down.

The Terrain Sector

A Terrain Sector is a fraction of your Mapsize and always 64 meters in lenght and width.

The Grid

The Grid can be thought of as invisible 3d guides throughout your map, that help with item placement. Enable "Snap to Grid" in the upper Toolbar and items you want to place snap onto those guides. The number next to the button is the Step size of the Grid. Value of 1 is by default 1 meter, which can be changed in the Setup.

Map Max Height

This is the maximum height of all your Mountains in meters. A black pixel in the Heightmap is 0m, a full white pixel is the Max height. You can change it by choosing Terrain/EditTerrain ... Modify/SetMaxHeight). 1024 meters is a good Value, which you can change at all times. 1024 is the maximum as well, as you cant paint terrain above that.

Map Water Level

Map Water Level is the water level in meters above absolute 0. You can change it in (Terrain/EditTerrain ... Modify/SetWaterLevel). Choose it before creating your Terrain. Know how deep your Water should be, because any change to that will mean you loose your beautiful shorelines by either a draught or a flood. This applies only for the Ocean, any lake you have is not affected.

Statistics

For the demo map Island,

Heightmap4096x4096
Unit Size2 Meters
Map Size8196x8196
Map Max Height1024 Meters
Map Water Level100 Meters
Personal tools