Freeflight Design Shop Forum
Lightmap with Alpha Mini-Tutorial
Posted by Tom Gibson/FFDS on Tuesday, 10 December 2002, at 11:35 a.m.
Here is a preview of a mini-tutorial that I sent to Abacus for possible inclusion in the help file:
Lightmap with Alpha Textures
First you need to tell FSDS that you are going to use a light map. From the Edit/Manage Texture List menu, click on the texture name and then click Edit. Check the boxes that apply. Typically you would check the Reflections and the Lightmap with Alpha checkboxes to have reflective textures during the day and lit textures at night. Click OK. Click Yes to change all references in the model to the new texture name. Your texture name in the list should now be followed by R, A. Click OK. Now create your MDL file as usual.
For your texturing you will need to create two textures using the Targa (TGA) format, each with one alpha channel. One will be your reflective daytime texture and the other will be your nighttime lightmap. The lightmap should have the same name as the daytime texture but have _L added (i.e. if your daytime texture is dc8ual.tga then your nighttime texture should be dc8ual_L.tga). The lightmap texture will determine the intensity and color of light shining on your daytime texture at night. Thus, it will normally just be white lights/light splashes on a completely black background. While the alpha channel of your daytime texture determines the amount of reflectivity (255, 255, 255 is non-reflective, 0,0,0 is polished chrome - I use 175,175,175 to 215,215,215 for various effects), the alpha channel of your lightmap texture works very differently. A white alpha channel means that any lights in that portion of the texture will be controlled by the landing lights switch. Thus, you would use a white alpha channel for areas simulating landing light splashes, ice lights, etc. A black alpha channel means that it will be controlled by the panel lights switch. Since you will have panel lights on all the time that the electrical system is on, you will use this for things like passenger window lighting.
Finally, you need to convert your TGA files into the DXT3 format that FS requires. For this you can use either Imagetool (found in FS2002 Pro or the MS FS2002 SDK) or DXTBmp (from Martin Wright - http://www.mnwright.btinternet.co.uk/index.htm).
If you use ImageTool:
1. File/Open - load your TGA file. 2. Image/Format/DXT3 3. File/Save As - add a .bmp extension to your filename (i.e. dc8ual.bmp or dc8ual_L.bmp) 4. Click Save button.
If you use DXTBmp:
1. File/Load Targa with Alpha - load your TGA file. 2. File/Save Extended Image 3. Save as Type: DXT3 with Alpha 4. File Name: just include the base file name (dc8ual or dc8ual_L) or type in the .bmp extension too, either will work 5. Click Save button.
Place these textures into the aircraft's TEXTURE folder. You will also need to create simple BMP files from your TGA files and place them into your FSDS project file's folder. FSDS cannot read DXT3 format BMP files, and thus you will need normal BMP's here. You can use your paint program to do this.
-------------------------------------- Hope this helps!
Back to TIPS
The Freeflight Design Shop Forum is maintained with WebBBS 2.25.