# Terrain Unit of Scale

This topic is 4884 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

What's the unit of scale these days for terrain? Ie, should 1 unit represent 1m or 1ft if '1' is the smallest polygon size on the terrain? Thanks

##### Share on other sites
There is not 'right' answer just personal preference. I go with a 1 to 1 ratio with S.I. for units of any measure. float 1.0f = 1 meter, 1 kg, 1 joule, 1 m/s^2 ect. It makes physics a lot easier when you don’t have to worry about converting. The exception is when I am doing something 2d and want pixel accuracy. In which case float 1.0f = 1 pixel.

##### Share on other sites
Its more than just personal preference, it depends on what your game's scale is, like a termite simulation vs. a flight simulator.

##### Share on other sites
Quote:
 Original post by KibbleIts more than just personal preference, it depends on what your game's scale is, like a termite simulation vs. a flight simulator.

Haha, good point. What about an RPG. Seems like 1m may be a little low?

##### Share on other sites
Raeldor,

It largely depends on the quality of terrain you're looking for and how close the camera will be to the terrain. I've seen RTS's go as far down as .25m per vertex (5 verts/meter). And many console shooting games go as high as 5m per vertex.

Start with 1m per vertex and see if you get the smoothness you're looking for, keeping in mind that a lot can be "faked" with good textures and lighting. If 1m doesnt meet your expectations, go to .5m, etc...

Cheers and good luck!
Jeromy

##### Share on other sites
The memory size used to represent position in your world also needs to be taken into consideration, as well as how smooth you wish movement to be. That is, if ur grid spacing is 1 m and you want to have the player be able to move in 0.1 increments within that 1 square meter, then ur position variable must be able to hold 10 times as many grid points you have on one side of your heightmap. If your heightmap is 512x512, then your position variable will need to be able to hold 5120 unique values for both the horizontal and vertical components. Of course this is if you are using a single memory variable for a position component for the entire world, and not a pair of one for the grid and one for position within the grid.

I hope this makes sense. :)

##### Share on other sites
Quote:
 Original post by RaeldorWhat's the unit of scale these days for terrain? Ie, should 1 unit represent 1m or 1ft if '1' is the smallest polygon size on the terrain?Thanks

Use the unit that is most confortable to you. I dont see any numeric reason to use a specific unit.
The possible numeric errors (assuming you are using floating point math) can arise from the relative differences not their values.

##### Share on other sites
Quote:
 Original post by KibbleIts more than just personal preference, it depends on what your game's scale is, like a termite simulation vs. a flight simulator.

No, For both I still use 1.0f = 1 meter. its just on the termite scale I'd be working with numbers like 1E-3 and on the flight sim id be using numbers in the area of 1E3.

##### Share on other sites
The size of a unit is pretty arbitrary (I generally use meters), but I think the OP was actually asking (in a kind of backwards way) how far apart the vertices in a terrain should be.

Raeldor, first decide what the units are, then decide what the resolution of the terrain should be. If you lock the size of a unit to the distance between terrain vertices, then you will be in trouble if you decide to change the resolution of the terrain.

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 11
• 12
• 10
• 11
• 13
• ### Forum Statistics

• Total Topics
634096
• Total Posts
3015480
×