Yair Kurzion (yair++at++polygon.engr.sgi.com)
Mon, 1 Feb 1999 17:52:55 -0800 (PST)
> Are there any tutorials that step one through building a paging ASD? I
> have 12x13 degrees of dted data that I need to build into a paging ASD
> but so far I have been unsuccessful.
> I have been trying to use the
> 'builddted' program, but I don't understand the configuration files
> (config_filename, page_lookahead_filename) and what parameters they
> should have.
First, note that using 'builddted' to build a paging ASD's starts by generating
a non-paging ASD in memory and then breaking it into tiles. In other words, you
must have a large enough memory (+ swap) to contain the entire ASD in order to
break it to paging tiles. See below for a description of a different
alternative.
The `builddted' program starts by loading the Dted into memory, and then calls
pfdBuildASD to generate an ASD. Here is an explanation of the parameters:
Usage: builddted file.dted tile_pre_name config_filename pagelookahead_filename
tile_pre_name - the prefix of the output file. builddted will generate many
files, each containing a single paging tile. These files will have the given
prefix.
config_filename - builddted will generate a file by this name. It will contain
the description of all the tiles. This is the file you will eventually use
in order to load a paging ASD.
pagelookahead_filename - builddted will generate a file by this name. It will
contain pairs of numbers. For each LOD of the ASD, a pair (x,y) defines how
many tiles are resident in memory at any given time.
The files generated by config_filename and pagelookahead_filename define the
paging ASD. You can later display your new ASD using asdfly. inserting the
above two names in the asdfly config file (e.g. paging.config) at lines
7 and 8 will make asdfly load your new model.
> Also, I have to texture
> this whole terrain and I've been wondering if its better to use texgen
> to generate the texture coords for the ASD or build the texture coords
> directly into the model? Any help with this is greatly appreciated.
At the moment, the paging ASD format does not include texture coordinates.
In other words, when using a paging-ASD, you must use texgen-ed texture
coordinates.
o If you plan to display your dted data as a flat world, then selecting the
correct texgen matrix is simple (see asdfly).
o If you plan to use a round earth model then we don't have a clean texgen
solution. However, if your terrain patch is relatively planar (13 degrees
wide will probably qualify), you can re-project your original texture from
a sphere surface onto a tangent plane touching the sphere in the center
of your patch. Projecting along the plane normal will make the resulting
texture texgen-able.
A different alternative to generating paging ASD models:
Not yet shipped, but you are invited to try it: ASDGen.
ASDGen creates ASD models out of regular-grid elevation data. It doesn't start
with a full ASD and has a constant memory signature. It takes a user function
that returns the altitude at every grid post. You have to supply such a routine
that reads your input data format.
Since it has not been shipped yet, I can leave the program for you in my SGI
web page. ASDGen lives in libpfdu. I'll leave you instructions for adding
it to your libpfdu.
Let me know if you are interested,
-yair
--
\_________ \_____ \__ \__ \_____ Yair Kurzion
\_________ \_____ \__ \__ \_____ yair++at++sgi.com
\__ \__ \____\__ \__ http://reality.sgi.com/yair
\__ \__ \__ Work: (650) 933-6502
\__ \__ \__ Home: (408) 226-9771
\__ \__ \__
This archive was generated by hypermail 2.0b2 on Mon Feb 01 1999 - 17:53:00 PST