Planetside Software Forums

General => Terragen Discussion => Topic started by: Tudor on March 15, 2016, 11:13:30 AM

Title: Is there an optimal bitmap image size for use as height field?
Post by: Tudor on March 15, 2016, 11:13:30 AM
If I use an image which is 1000x2000 pixels as a heightfield source it appears that 1pixels is 1 meter approximately.
If I'm uploading a area which is 10x10 km in reality should I be using 10000 x 10000 pixel image?  Is there an optimal ratio between pixel dimensions and size within Terragen?

Also I'm unsure but I think the curvature of the earth might be causing some problems.  Is there a way to make the heightfield conform to the curve of the planet?  Does it do this already?  Is there a way to make any object conform to the curve of the planet?

The situation I'm running into is that I'm using a large area of topographical information to create my initial terrain.  If I have a lake which is a few kms long and I use a plane to create that lake I end up with a plane that is well over a foot too high at one end or the other because it is flat and the planet is curved.  This is what appears to be happening.  Is this actually the case or do all objects conform to the planets surface?

Title: Re: Is there an optimal bitmap image size for use as height field?
Post by: Oshyan on March 15, 2016, 02:29:56 PM
There is no "optimal" size, as in a size at which the best results are obtained. The "optimal" size is the best balance of *per-meter resolution* and file size/memory available. The default is 1 meter "pixel spacing", i.e. 1 pixel = 1 meter, but that can be adjusted with the built-in Heightfield Resize node. There is no significance to the 1 meter default pixel spacing, we just need to pick *some* value when the imported format does not include its own scaling information. So don't take the 1m default and just assume that's the way it should be or the best way.

That leads to the second part of my response, which is about the source of your base terrain data. Are you creating this terrain yourself, or is it real-world data? If the latter, you should just source the data from somewhere that includes georeferencing information and then use a format like GeoTIFF that maintains that data. Then you'll get the correct real-world sizes. If you are creating the terrain yourself in another application, then the best approach depends on what application. If it's a dedicated terrain modeler/generator like World Machine then export in TER format and it should maintain scaling information and the scale in World Machine should match that in Terragen (the same should be true of any other major terrain editing tool such as World Creator, etc.). If you're just using something more like a paint program, e.g. Photoshop, then you need to figure out scaling on your own. Decide how big of an area you want to cover, and then the higher the resolution of your image, the more detail is going into *the same size area*. When you import into Terragen just use the Heightfield Resize to adjust the size (in meters) to what you intend.

The heightfield should conform to the planet by default. But Planes and other objects *do not*. Only the Lake object (under the Water layout/tab) has that capability. So if you want a very large body of water that conforms to the planet, either use the Lake object, or in many cases better yet just use a second Sphere with a water shader, and set the sphere radius to your base planet radius+the height of water you want.

- Oshyan
Title: Re: Is there an optimal bitmap image size for use as height field?
Post by: Tudor on March 15, 2016, 11:32:13 PM
Thanks for the help once again.


I am using real world data but the individual who is providing me the data says ArcGIS can only export as a bitmap image and as of right now (something I've mentioned in another post) can only give it to me in 8-bit which is causing all sorts of rework for me within photoshop.


I have not found a way to convert data from ArcGIS(my only source of the data) into .ter file and ESRI (the makers of ArcGIS) have been very unhelpful... even to the tune of killing their user forum in 2011... probably so they can get profits from their support contracts.  Sorry, that bit has been frustrating.  Not having access to the program myself I can't dig in to it until I could figure it out.


Title: Re: Is there an optimal bitmap image size for use as height field?
Post by: bobbystahr on March 16, 2016, 09:53:38 AM
Quote from: Tudor on March 15, 2016, 11:32:13 PM
Thanks for the help once again.


I am using real world data but the individual who is providing me the data says ArcGIS can only export as a bitmap image and as of right now (something I've mentioned in another post) can only give it to me in 8-bit which is causing all sorts of rework for me within photoshop.


I have not found a way to convert data from ArcGIS(my only source of the data) into .ter file and ESRI (the makers of ArcGIS) have been very unhelpful... even to the tune of killing their user forum in 2011... probably so they can get profits from their support contracts.  Sorry, that bit has been frustrating.  Not having access to the program myself I can't dig in to it until I could figure it out.





Try these links:

http://gis.stackexchange.com/questions/20139/arcgis-10-geotiff-export

https://desktop.arcgis.com/en/arcmap/latest/extensions/production-mapping/exporting-to-layout-geotiff.htm
Title: Re: Is there an optimal bitmap image size for use as height field?
Post by: lat 64 on March 17, 2016, 12:38:30 PM
I have found QGIS to be a very useful tool. The online manual is good. I did have to load some library stuff and python whatever, but there is good documentation on how to get it going for nubies like me.

http://qgis.org/en/site/

Cheers,
Rus
Title: Re: Is there an optimal bitmap image size for use as height field?
Post by: Tudor on March 18, 2016, 09:58:18 PM
Quote from: lat 64 on March 17, 2016, 12:38:30 PM
I have found QGIS to be a very useful tool. The online manual is good. I did have to load some library stuff and python whatever, but there is good documentation on how to get it going for nubies like me.

lat 64 do you mind sharing the libraries and python scripts you had to install?
Also, when I do a search for Terragen or .ter file formats I get no results within their documentation I get no results.  What format are you exporting you terrain to?
Title: Re: Is there an optimal bitmap image size for use as height field?
Post by: Oshyan on March 19, 2016, 01:36:03 AM
You can also export to GeoTIFF, which Terragen 3 supports well.

- Oshyan