trying to understand size and scale of terrain

Started by NoReflection, December 25, 2009, 01:26:47 AM

Previous topic - Next topic

NoReflection

Hi every one. I am trying to use the height maps created in terragen to be used in a game program called DarkBasic Pro. but I am having trouble figuring out the scale with the height map. I am not really sure how to ask this and I should probably ask this on there forum. Is there an easy way to understand what scale the map is? or at least the height? I am able to scale the image in DarkBasic along the x-y-z when I save the image it is at 257x257. So would scaling it by 257 on x-z and 30 on the y be the full map? or 7680 on the x-z. again this might be a better question on the other forum. I just cant seem to grasp the sizing of the map.

neuspadrin

#1
The scale used can vary widely depending on many factors.  It really comes down to what scale you want it to be at.  

I've had scenes where trees are a few kilometers tall technically when I didn't pay attention to the actual scale for a bit ;).  It's all about how the eye sees it and compares it to whats surrounding it and what it expects it to be.

There is an official terragen units to meters around somewhere, but i forget what it is.

NoReflection

I found a meters to pixels conversion by Google. would that be accurate? I have the export plugin that saves maps as .bmp it saves it as the size ie. 257x257 so I am assuming that is the pixles size. I am wondering if I need to scale it at a factor of 1, or 100, or 7680... of course this, I know all depends on the program I am useing. In this case DarkBasic Pro.

TheBlackHole

If you want to scale it to an immense size, use at least 513x513. In a heightfield, a pixel represents a data point. The real question is, how many meters across do you want your pixels? The size of the heightfield does not tell you the max size of texture map you need. Usually the pixels are placed 30 meters from each other. You know how long a meter is, right? Imagine 3 metersticks. Then imagine ten times that. Pretty far, isn't it? If you export it and you want it that big in your game choose, hang on, *looks at other computer for answer*, Yes when the box pops up that says "Scale the terrain to meters?". If you hit No, you'll get it scaled to terrain units and you'll probably have to scale it up in the game engine.
They just issued a tornado warning and said to stay away from windows. Does that mean I can't use my computer?

NoReflection

I see, so the size of the height map doesn't necessary represent the actual size of what the terrain can be? I think I was getting stuck on that part of it. I guess I am trying to figure out what to adjust the scale to. but that is probably a question for the darkbasic forum.

TheBlackHole

The size of your screen in pixels doesn't tell you how big your monitor has to be, and heightfields are the same. You can have a giant electronic billboard that only has 800x600 resolution, or you can have an iPhone-type thing with 1600x1200 resolution. You can have a huge, hi-rez heightfield that's only a square mile or a tiny, low-rez heightfield that's half a planet! It's all about scale. Usually with higher resolution you want higher scale so it looks like a large area of lo-rez data or you can scale a lo-rez HF (heightfield. I'm getting tired of typing heightfield so from now on I'm just gonna use HF.) so it looks like a square inch of hi-rez data. With a huge HF you want higher resolution. If you need several square km of terrain, just scale your terrain to several square km of land. It doesn't matter what the resolution is, it's the point spacing that matters.
They just issued a tornado warning and said to stay away from windows. Does that mean I can't use my computer?

Oshyan

There is no specific relationship between pixels and meters. The scale can vary and is adjustable. Only the TER format embeds scale information - all other normal image formats (JPG, TGA, TIFF, etc.) do not include scale information (except in the case of GeoTIFF, a special type of TIFF). So you can have a very small area (100 meters for example) terrain with very high resolution (2049x2049), for high detail in a small area, or a very large area (100 kilometers) with low resolution (257x257) to establish basic terrain shapes over a large area (which you would probably want to augment with procedural detail). So the heightfield resolution and area coverage are not connected or intrinsically related.

- Oshyan