Alpha Image: Difference between revisions
Added gamemate's input |
m Fixed the RA2 palette link |
||
Line 19: | Line 19: | ||
So, you can add the effect to other buildings and create alternate effects for other structures. | 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 in [[Media:alphatst.pal|JASC format]] and [[Media: | 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 in [[Media:alphatst.pal|JASC format]] and [[Media:ALPHATST_ra2.pal|RA2 format]]. | ||
Keep in mind that the game adds (pixel's index-127) to the current map level. | Keep in mind that the game adds (pixel's index-127) to the current map level. | ||
Line 28: | Line 28: | ||
And the best part is ''this effect does not lag at all''. | And the best part is ''this effect does not lag at all''. | ||
See the [[Media:alpha_no_lag.jpg|LOOK DADDY, NO LAG!]] screenshot. | See the [[Media:alpha_no_lag.jpg|LOOK DADDY, NO LAG!]] screenshot. | ||
=== Credits === | === Credits === |
Revision as of 14:43, 17 December 2004
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.
Unfortunately, according to gamemate, animated alpha-images are not possible; in addition, if the alpha image is attached to something movable, the emitted light will stay at it's initial position, and not move around with the object.
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 in JASC format and RA2 format.
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 here.
And the best part is this effect does not lag at all. See the LOOK DADDY, NO LAG! screenshot.
Credits
Blade - documented this effect and the way image data is rendered onto the map.
DCoder - lag stress test, screenshots.
NineBreakerFan - palette conversion to RA2 format.
gamemate - animated SHP & movable object test.