Tuesday, February 05, 2008

MeshTool: The Seeds Are Sown

Last night I created the "seed" files for MeshTool. Let me explain what these files are and why we'll need them.

MeshTool is a wrapper around our irregular-mesh generation code. It will allow third parties to create base mesh scenery without having to create triangulations. Just like DSFTool saves people the work of having to encode DSFs (with point pools, command lists, and all that ugly stuff), MeshTool saves people the work of having to create their own triangulations.

MeshTool is a low level tool - you provide a text input file and some data. It's designed to be an engine underneath tools like PhotoSceneryX, not an end in itself.

MeshTool will create "default" land-use terrain that approximately matches the global scenery, water, and custom orthophoto-based terrain. You (or a program you use) provide a text file that describes the boundaries between custom photos, land, water, and airports. You must also provide a SRTM-style HGT file for elevation.

How does X-Plane know what land-use should go on what terrain? That's where the seed files come in. Our global scenery is generated from a set of rules that take into account morphology (land height and slope), approximate climate, and general land use. You provide the terrain shape via the HGT file, and we provide you with a seed file that contains climate and land use for that DSF tile.

Why do we provide the seed file rather than letting you find and create climate data? Well, our rules are tuned for a very specific pair of data sets; by providing the exact climate and land use data that we use, we assure that the rules files work correctly. The purpose of MeshTool is not to customize land use terrain, and we do not provide a mechanism for it. The purpsoe of MeshTool is to let you put orthophotos and new coastlines into the base mesh.

The good news is: seed files are tiny. They are typically 4 kb-8kb each; the entire data set is 322 MB total. That's because the climate data is only 3x3 per DSF and the land use is only 121x121.

I hope to get MeshTool into some kind of testing within the next few weeks; if you are a programmer and would like to feed MeshTool from your own program, please contact me and perhaps I can arrange an alpha copy. I will also post the seeds as soon as I can.

9 comments:

Unknown said...

You said "purpsoe of MeshTool is to let you put orthophotos and new coastlines".

Adjusting the coastline is done by providing some new points with zero altitude MSL in "SRTM-style HGT file for elevation"?

I would expect that this user-provided elevation data set will also enable us to correct local elevation errors. Am I correct?

Benjamin Supnik said...

Yman: adjusting the coastline is done by editing the text file that "controls" meshtool. Meshtool requires polygons that define land, water, airports and custom orthophotos...they are all just polygons, and the coastline is just the border of water with, well, anything else. So you adjust the coastline this way.

Adjusting the SRTM DEM is legal and does allow you to customize elevations..edit it any way you want! The land use will naturally changes as you edit because the land use rules examine the SRTM height. (In otherwords, if you make an artificial mountain b y eidting the HGT in photoshop, the cliff sides of the mountain will get rock texture automatically if the land type is "natural" in the text file and not an orthophoto or water or airport).

Two things do not happen:
1. Editing the HGT file NEVER changes the land-water boundaries. Those are strictly vector.

2. mesh tool doesn't flatten. If you change coastlines using your text file, YOU have to make sure the elevation is reasonably flat.

Finally note that we are providing climate but we are not providing coastline data. If you want to make a tile, you need to somehow get vector coastline data and convert it to the polygon format MeshTool uses.

This is one of the main reasons that MeshTool is meant to be a tool used by other PROGRAMS, not HUMANS. The polygon coastline data tends to be a huge horrible string of numbers that you would not want to edit by hand.

Anonymous said...

It looks like a great tool.

Two questions.

How big of an area can we make with ortophotos, X-Plane loads 6 geocells at the same time and this eats up a lot of memory. By compressing the imgages we can reduce the memory roughly by a factor of 4. According to my calculations using 4 m/pix ortophotos gives us about 2,2 gig of textures to be loaded, and thats only ortophoto textures. Can X-Plane handle this?

Do I need a videocard with 3 Gig of VRAM or is this handeled in the RAM memmroy?

The other question, can we have water at different altitudes? a lake for example in a higland area?

Thanks for a great work with the scenery!

Benjamin Supnik said...

anonymous: for texes: I get asked this a lot, so I'll answer in another blog post.

For water...yes, the water height comes from the DEM height, so you can set the water height however you want per lake or even within a lake (but sloped water is not recommended).

Anonymous said...

What format do you use for polygon coastline data. Is it possible to use standard formats like Polish Map Format for this?

It would be great if we could use tools like GPSMapEdit to get accurate coastlines!

Anonymous said...

MeshTool require some config files. where can i get those files?

Benjamin Supnik said...

You provide everything except the 'xes' climate/files. For those, download MeshTool from the XPTools March 08 download - the URL is in the README.

olexia said...

I am creating full tile .dsf's where I want to change the digital elevation model, but leave everything else the same. I managed to use meshtool to input a new digital elevation model, and the results look fabulous except that all the water bodies are missing. Was happy with the original water bodies, just want to know how to make sure they are included when meshtool cuts the dsf.

Benjamin Supnik said...

You need to input your own coastline data, probably as Shapefiles.