Yair Kurzion (yair++at++polygon.engr.sgi.com)
Thu, 7 Jan 1999 18:22:45 -0800 (PST)
A short intro:
ASD is a view-dependent dynamic surface. This means that ASD will draw a
different set of polygons as you change your position across the surface. In
the default mode, ASD picks high resolution polygons close to the camera
and polygons of decreasing resolutions farther away. ASD makes a smooth
transition between the various resolutions of the surface. It is fairly
difficult to see the geometry changing as ASD switches between levels of detail.
ASD achieves the smooth transition between levels of detail by specifying how
vertices in high-resolution triangles morph into low-resolution triangles.
Older methods use tiles of fixed resolutions and switch entire tiles from
one resolution to another. This used to create a popping effect, and in many
cases also created cracks between neighboring tiles of different resolutions.
There are two variants of ASD. The first is a non-paging ASD which holds all
the ASD geometry in memory all the time. The second is a paging ASD which
loads only the relevant ASD geometry at each level of detail based on the
camera position.
Enough with introductions. I think there are two issues here:
1. How to run an ASD model efficiently with pf.
2. How to build an ASD model from elevation data
The first issue is almost a non-issue. Once you have an ASD model (say - in
a pfb file), you can load it as any other model. ASD is a single node on the
scene graph. ASD will perform all its calculation in a COMPUTE process if you
ask pf to fork one (pfMultiprocess). This makes the entire ASD effect on your
frame rate very small.
The simple pguide programs ASD_align and ASD_decal load ASD models, and
demonstrate terrain following of a car model and a cast-shadow decal.
A more advanced example is `asdfly' (sample/apps/C/asdfly). It is similar to
perfly but lets you change some ASD specific parameters via its GUI.
Now for the second issue:
The simplest way to build ASD models is to use the MultiGen CAT module. This
module takes elevation data and produces very nice ASD models.
The main down side is that CAT costs money ...
The other downside is that CAT does not build paging ASD models. If you have
a very large ASD surface, CAT will break it into many non-paging ASD nodes
and you will have to page them in yourself (using a DBASE process).
If you don't feel like spending the money, you can use utility routines from
libpfdu. These routines build ASD models out of elevation data. IMHO, the CAT
module does a better job at approximating the full elevation grid with a small
number of triangles.
I put a small program that generates a fractal terrain and lets libpfdu
routines process it on the web under http://reality.sgi.com/yair/ASD
The program fractASD.c takes as input a *.fasd file containing instructions on
what to build. fractASD starts by generating a random-fractal elevation data.
The same URL contains some sample *.fasd input files.
- If you specify a non-paging ASD in the *.fasd file, fractASD generates an ASD
model and saves it as a pfb file.
- If you specify a paging ASD mode, fractASD calls libpfdu routines to break
the ASD into tiles.
Using the routines in libpfdu to generate paging ASD models, you'll find that
they take a non-paging ASD model as a parameter. This means that you must
have at least one computer with enough memory to hold your entire ASD model
in order to break it into a paging ASD.
We are currently in the process of developing a paging-ASD builder with a
constant memory signature. The first version of this builder will be shipped
with 2.2.4
I hope this helps any,
-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 Thu Jan 07 1999 - 18:22:48 PST