Game Development Reference
In-Depth Information
Importing geometry
and animation from
Lightwave 3D
No man is an island as the saying goes, and this is undoubtedly true of
real-time character animation. In order to produce effective real-time
character animation you are likely to need to use many application
programs as tools. The kinds of tools you will need are likely to include: a
good bitmap editor such as Paint Shop Pro to create the texture maps that
are so essential for the look of low polygon characters; a level editor to
create the real-time content; and a modelling program. In this chapter we
look in detail at how we can use data created by one important tool,
Lightwave 3D, in our own application.
Lightwave 3D scene files are simple text files that define how objects
appear and animate in a scene. In this chapter we look in detail at the
scene file and how to extract the animation data. Lightwave 3D object files
are binary files containing point, polygon and surface data. This chapter
covers in detail how to parse such a file and extract the information
necessary to display the geometry.
Lightwave overview
Lightwave splits the CGI animation process into two distinct stages:
modelling and animating. Because of this Lightwave has two main
application programs, 'Modeler' and 'Layout'. The data created in
'Modeler' comprise a binary file that contains information about a model's
vertices, polygons and surfaces. This file can contain other information
that a model may use that can be provided by plug-ins or extensions to
the Lightwave dataset that may appear later. Any parsing engine we
create must be able to skip this additional information.
A Lightwave scene file is a text file that contains a list of all objects used
in a scene, the animation they perform, any plug-ins they use, the lights
used and their animation, the camera and its animation, and finally user
display settings. Parsing a scene file involves reading the text file and
Search Nedrilad ::

Custom Search