|
A technical paper written by
Tom Dowgiallo
API Product Manager
September 1997
Overview
For 10 years, MultiGen has created solutions that promote productivity
and innovation in the rapidly evolving world of realtime 3D visual simulation.
MultiGen is the leading developer of realtime 3D authoring software tools.
We also define and support the industry standard realtime 3D scene description
database, OpenFlight.
Now MultiGen has implemented a suite of Application
Programming Interfaces (APIs) to answer the growing demand for a quick
and easy means of accessing and extending OpenFlight. These APIs simplify
the development of visual simulation applications by making OpenFlight
databases more accessible and easier to customize. They also facilitate
the development of specialized tools and utilities to augment MultiGen's
comprehensive set of powerful, general-purpose modeling tools.
A track record of meeting customer needs
The OpenFlight APIs continue the MultiGen commitment to advance customer
productivity--a commitment that began 10 years ago when we first set out
to solve the problem of database modeling for realtime image generators
(IGs). Historically, every image generator used its own database format,
and modeling tools were proprietary and exclusive to the image generator
they supported. Then MultiGen pioneered a revolutionary approach to support
all image generators, regardless of their individual differences in database
hierarchy and attributes. We identified a kernel of elements common to
all IGs, such as polygonal representation, color, and texture, and developed
a universal set of tools for modeling them. Unique attributes and structures
were controlled through an IG-specific Data Base Logic (DBL) module.
This approach proved highly successful in reducing development
time and cost. We used it to develop modelers for the Singer Link DIG
and ATACDIG, Evans and Sutherland ESIG, and Lockheed-Martin Compuscene
IG product lines. Link Miles and FlightSafety also adopted this approach
for their proprietary IDEAL and EMR modelers.
Today, however, the scene has shifted. OpenFlight has surpassed all other
database formats in popularity, becoming the de facto industry standard.
At the same time, technology advances in graphics hardware has produced
an explosion in visual simulation platforms that demand customized attributes.
As a result, more and more companies want to extend OpenFlight, rather
than go to the time and expense of writing a complete, unique DBL for
their particular IG. MultiGen OpenFlight APIs provide the solution.
The OpenFlight API family
Figure 1 illustrates how the OpenFlight APIs work to meet the requirements
of the broadest of range of customers and requirements.
The MultiGen suite of OpenFlight APIs includes the following:
- Read Data and Write Data APIs to open up access to
the OpenFlight database
- Data Extensions API to customize OpenFlight databases
by expanding data attribute files and adding database structures
- Tools API to aid the development of custom plug-in
modeling tools
Improved access to OpenFlight databases
The Read Data and Write Data APIs improve access to the OpenFlight database
and simplify the development of applications using OpenFlight. These APIs
come standard with the MultiGen product and are independent of the MultiGen
realtime 3D modeling environment.
Data Read API
The Data Read API is the bridge between the OpenFlight database and image
generators that use a different runtime format. The Data Read API provides
basic access routines to open, query, retrieve, and document OpenFlight
format files. API users can easily convert OpenFlight databases to a different
runtime format by using the Data Read API routines in conjunction with
their own value-added code.
This API significantly reduces the development effort previously required
to build hardware-specific loaders or data converters. It also shields
users from future changes in the OpenFlight structure, protecting their
substantial development investment.
Data Write API
The Data Write API gives visual simulation developers greater flexibility
to adapt OpenFlight databases to the unique requirements of target image
generators. Providing a set of library functions, the Data Write API enables
users to more easily:
- Modify the attributes of existing OpenFlight files.
- Manipulate the hierarchy of existing OpenFlight databases.
- Create new OpenFlight databases without using the
MultiGen modeler.
- Convert external data formats to OpenFlight. Content
created with commercially available modeling tools, such as various
CAD packages, 3D Studio, or SoftImage, can be imported and stored in
OpenFlight format.
Easy expansion of OpenFlight databases
The Data Extensions API lets visual simulation developers add attributes
and functionality not directly supported by OpenFlight. Using the Data
Extensions API from within the MultiGen software development environment,
developers can readily:
- Expand the data associated with OpenFlight data files
- Add new database nodes
How the Data Extensions API can be used
The Data Extensions API can be used to meet data requirements that are
specific to an image generator but not native to OpenFlight. Just a few
examples include:
- Allowing for multiple numbers of textures per polygon
- Calculating and storing face normals
- Expanding DFAD source data to be tagged along with
OpenFlight polygons
- Customizing Level-of-Detail (LOD) implementation
- Including atmospheric flags in the database hierarchy
Because an OpenFlight file can have multiple extensions, developers can
program for multiple image generators at the same time. The extensions
for each target image generator are displayed on OpenFlight attribute
pages within the MultiGen modeler. During modeling sessions, MultiGen
behaves as though the extensions are native to OpenFlight: Extensions
are automatically written to and read from disk. They are displayed on
MultiGen attribute pages. They can be searched and modified.
All defining information about data extensions is contained in the Data
Dictionary. The Data Dictionary includes extension name, data type, associated
OpenFlight node, and conversion callbacks. For record extensions, the
Data Dictionary also includes information about record length, content,
and attachment rules. MultiGen automatically consults the Data Dictionary
during modeling sessions. If the extension requires extra processing--for
example, a face normal calculation--the code to perform the function must
be included. The Data Dictionary can be shared among MultiGen users, or
it can be withheld to protect proprietary information.
Specialized plug-in tools for MultiGen
MultiGen provides a set of powerful modeling tools for building realtime
3D simulations. With the Tools API, currently under development, MultiGen
users will be able to expand this standard, general-purpose tool set with
their own specialized tools that meet unique simulation requirements.
The Tools API gives developers access to MultiGen kernel subsystems, such
as the Tool Manager, Undo Manager, and Message Handler, allowing them
to customize the user interface, to manipulate the database hierarchy,
and, in future releases, to take over rendering specifics. With this access,
MultiGen users will be able to build their own interactive plug-in modules
within the MultiGen software development environment. In addition, tools
developed using the Data Read/Write or Data Extensions APIs can easily
be converted into interactive tools by adding the features of a graphical
user interface, such as tool dialogs and undo procedures.
How the Tools API can be used
Consider this scenario. A company in the flight simulation arena has developed
standalone, proprietary software that automates the generation of digital
database components for airport runways and associated runway lighting.
Runway information--such as runway type (CAT-I, -II, -II), approach lighting
system (ALSF-I, -II), and runway length, width, and heading--are input
by the user. From this data, the proprietary software automatically generates
a polygonal database for the runway environment. With the Tools API, the
proprietary software can be integrated into the MultiGen modeler so that
the data definition and polygonization appears to be part of the MultiGen
GUI. Then the native MultiGen capability can be used to insert the runway
geometry into a terrain database and to perform smoothing functions at
the runway/terrain boundary. To the user, the proprietary software and
MultiGen operate seamlessly, as though they are one package.
The most common Tools API applications are expected
to be data and image format importers and exporters, data editors, and
data viewers. However, the possibilities for applications are limited
only by the requirements and ingenuity of the user.
Everything necessary to enhance productivity
MultiGen OpenFlight APIs are available for both UNIX and Windows NT development
environments. OpenFlight files created in one environment can freely migrate
to the other with no developer intervention.
Each API comes with a Programmer's Guide of step-by-step
instructions and a Reference Manual. To get programmers up to speed quickly,
sample code for many common functions is also provided.
For more information
The OpenFlight APIs demonstrate MultiGen's continuing commitment to raising
customer productivity to the highest level. To learn more about OpenFlight
APIs or MultiGen software tools, please email MultiGenSales@multigen-paradigm.com.
|