ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

Alpha Image: Difference between revisions

From ModEnc
Jump to navigation Jump to search
mNo edit summary
 
No edit summary
 
(11 intermediate revisions by 4 users not shown)
Line 1: Line 1:
== AlphaImage ==
#REDIRECT [[AlphaImage]]
 
AlphaImage is a very nice feature that was used in TS, but left out of RA2.
 
=== Original post ===
Attached is the image for the AlphaLight effect seen in TiberianSun. It works fine in RA2 and there is the possibility of creating further alpha effects if my understanding is correct. This is another totally unused feature in RA2/YR. The alpha image is called alphatst.shp, but is reported wrongly by XCC (or at least the version I have) as sibmlr.shp. Put this file into the normal mod mix files and place a [TSTLAMP] on a map and marvel at the difference between alpha image light and the regular cell tinting effect. Don't try to convert the image to a pallet since it doesn't use one. Instead, any index above #127 in the pallet increases the light and I suspect (though haven't tested) that values below this decrease the among of light effect (negative light). You can create a useful alpha image by working in a greyscale pallet that runs from black (index 0) to white (index 255) and setting colour as index 127 to start with. 127 is a neutral pallet entry that does not affect the light ingame at all.
 
=== Screenshot ===
http://dcoder.cannis.net/images/alphatst.jpg
 
=== Explanations ===
The key is this tag:
[TSTLAMP]
AlphaImage=ALPHATST
So, you can add the effect to other buildings and create alternate effects for other structures.
 
To edit/add alternate effects of this type, you'll need the proper palette, that goes from black(#0) to white(#255). To help you, I've uploaded the correct palette [[Media:alphatst.pal|here]].
Keep in mind that the game adds (pixel's index-127) to the current map level.
 
So, indecies (0-126) reduce the lighting by (127-index), index 127 does nothing, and (128-255) add (index-127) to the lighting.
 
Also, you can get the original alphatst.shp [[Media:alphatst.shp|here]].
 
=== Credits ===
Blade - documented this effect and the way image data is rendered onto the map.

Latest revision as of 14:53, 4 July 2006

Redirect to: