|Design 1, Design 3 (Computer and Video Games)|
|Unit 15 - 22nd January 2002|
Texturing an Animated Object
We want to export an animated textured object from Lightwave and will again use Lightwave to Unreal Saver written by PantherD. The problem is that it only works with Lightwave' Layout programme version 5.5 or 5.6 and that it has to be treated with care in order to avoid crashes. Anyway, it works. And you can download it here.
The steps we will go through are:
1. Model an object in Lightwave's
Modeler version 6.
2. Apply one or more textures to the object using the "Surface" panel and planar texture mapping. (The salmon consists three surfaces called sal_body, sal_mouth and sal_eye. Each texture used was specified to be non-repeating, auto-sized and mapped orthogonally to the y-axis.)
3. Model a morph target called salmon2.lwo which has the same number of vertices and the same surfaces.
Export both models from
Lightwave 6 to Lightwave 5. Quit Lightwave 6 now and start Lightwave 5.6's Layout.
Let's suppose we have modeled a fish like the one to the right.
The fish should show up in the Layout perspective view as a neatly textured object.
Being a carefull person I always check in a 3D browser like 3D Exploration whether the object looks allright outside Lightwave. The reason for that is Lightwave's tolerance against mapping sloppyness, which other browsers don't possess. They show you where you made your mistakes without mercy.
importing salmon.lwo import salmon2.lwo and specify a metamorph between
the two of them. You might use some 10 to 60 frames for the in-betweening
which will finally then be the frames in Unreal.
Don't worry that the fish lies on itsside. It will be upright after import into Unreal.
This is the tricky part now.
In Lightwaves objects panel you will find PantherD's Unreal Saver in the Displacement plugins, if you have properly installed it.
PantherD's saver operates
on metamorphs or other displacements by generating Unreal animation files
(with a *_a.3d extension) and mesh data files (with a *_d.3d extension)
whenever you press the blue "Options" button in the displacement
subpanel of the objects panel. If we would do this immediately after having
created the metamorph and before rendering all the frames first. The plugin
would tell us "Unreal binary anim 0 frames written. We have to go
through all the frames manually by pressing the step forward button on
the lower edge of the Layout window untill we reached the last frame of
PantherD's plugin created an Unreal Script file called salmon.uc and the static mesh information in salmon_d.3d and the animation data in salmon_a.3d. The Script file has been manually edited to get the right name for the default movement - "Swimming" in our case - and to adjust texture file names if one does not use the ones the plugin suggests automatically. (Remember that Unreal textures need to be .pcx or .bmp files with powers of 2 dimensions. .tga files or .tiffs won't work even if they are nicely displayed in Lightwave.)
The script on the bottom of the screenshot above shows the first few lines from the "salmon" class, which expands the "Actor" class.
If you want to experiment with the salmon actors we just built or see them in an aquarium, you might want to download the fishes and other animals here (1.2 MB) and the aquarium level (2 kB) here.