Site hosted by Angelfire.com: Build your free website today!

Lightmaps, Transparancies & Texture Animation for Klingon Academy




This tutorial expands on the previous one, explaining how to apply transparencies, lightmaps and animated textures to your ingame ship.


Transparencies:

Transparencies are easy to apply. KA only requires that the texture being used is an 8-bit (256 grayscale) pcx. Otherwise the same sizing rules that apply to standard textures also apply here (256x256 max, etc). Also, the pcx that is to be applied must be the same size as the standard texture that's already applied to the surface, otherwise it won't appear in the game. No special naming is needed for these, just keep the name under 8 charaters long.

On the pcx itself, light areas will produce opaqe sections on the model, while darker areas will produce faded surfaces. Pure white will appear as solid, pure black will be completely transparent, and shades of grey will produce varying degrees of translucency.

Open up Lightwave Layout 5.6 and load the object that you want the transparency applied to. Hit the *Surfaces* tab at the top to open up the *Surfaces Panel* as in the last tutorial. Select the surface you want to apply the transparency to (#A-1). You should already have a bmp applied to the surface for this to work. You can ignore the numerical value (0.0%) in the *Transparency* field in this window, as the game itself doesn't use this.

Click on the *T* button (#A-2) at the bottom of the window to open the *Transparancy Texture* window. The 8-bit pcx you're applying goes on in exactly the same way as the standard texture you applied to this surface before. Make sure the axis alignment and texture size match between the two applied textures.




Lightmaps:

Lightmaps are very similar to Transparencies in their application in Klingon Academy. Once again they are 8-bit pcx's, and must be the same size as the main texture that's been applied to the surface, and are actually applied under the transparencies options outlined above. In this case, light areas on the pcx will produce brighter areas in the game, and dark will produce dark.

However, Lightmaps use a naming convention that lets the game know that the pcx is a lightmap rather than a transparency. The naming structure is:

xxxx0299.pcx

The "xxxx" can be anything, this is just to allow you to identify the pcx itself. The four numbers at the end of the name are what informs the game that this is a lightmap. The first two (02) determines what power resource the pcx is assigned to, in this case 02 is for the impulse engines, so the surface will brighten or dim according to the engine's power level. The last two (99) determine how bright the light should be at full power, with 99 being the brightest and 00 being the darkest. Here's a table of the system resource codes:

System Resource Names:

No Resource
Warp Engines
Impulse Engines
Heavy Disruptor Cannon
Super Phaser
Federation Photon Torpedo
Klingon Heavy Photon Torpedo
Romulan Heavy Plasma Torpedo
Romulan Medium Plasma Torpedo
Romulan Light Plasma Torpedo
Gorn Plasma Torpedo
Sensors
Power (best for ship's windows)
Qcb
Aft Heavy Disruptor Cannon
Aft Super Phaser
Aft Federation Photon Torpedo
Aft Klingon Heavy Photon Torpedo
Aft Romulan Heavy Plasma Torpedo
Aft Romulan Medium Plasma Torpedo
Aft Romulan Light Plasma Torpedo
Aft Gorn Plasma Torpedo
Aft Qcb
 

Numerical Codes:

00
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22


Texture Animations:

Textures can be animated on a surface in Klingon Academy, using a sequence of 16 bmp's or pcx's. These can be composed following the same guidelines as other textures in the game, however they require a naming convention for the game to recognise that they're supposed to be displayed on the surface in sequence:

Cy#xxxxx.bmp

or

Cy#xxxxx.pcx

The "Cy" tells the game that this is part of a sequence of textures that are to be "cycled". The "#" is the number of that particular texture, starting from 0 and running through 9, and continuing from a to f for a total of 16 textures. The "xxxxx" is your identifier for this sequence, and should remain the same for all of the textures you make for any given sequence. Otherwise the "xxxxx" can be named anything you want.

Only the first texture in the sequence (Cy0xxxxx) is applied to the surface. Both a bmp and pcx can be applied (if a transparancy or lightmap is needed), and is applied the same way as other textures. Here is a template list of the texture names in their proper sequence:

Cy0xxxxx.bmp
Cy1xxxxx.bmp
Cy2xxxxx.bmp
Cy3xxxxx.bmp
Cy4xxxxx.bmp
Cy5xxxxx.bmp
Cy6xxxxx.bmp
Cy7xxxxx.bmp
Cy8xxxxx.bmp
Cy9xxxxx.bmp
Cyaxxxxx.bmp
Cybxxxxx.bmp
Cycxxxxx.bmp
Cydxxxxx.bmp
Cyexxxxx.bmp
Cyfxxxxx.bmp


Adding Main Textures to surfaces...

Special thanks to Why? and Sector1001 for supplying this info!


Main Page

If you have any questions or comments about this article, you can reach me at PXS@hotmail.com.

2003/06/11