• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

making part of 24bit TGA transparent via MDL editing

Not open for further replies.
Level 4
Jun 19, 2010
talked with MasterHaosis in chat & searched forum, but my problem couldn't be answered yet, so here it is.

i want to know, if it is possible to make a part of a 24bit TGA texture transparent by using Material Layers inside the MDL (and of course if it is possible, how).

- 1 file "alpha1.tga" which is a 32 bit TGA with alpha channel with black & white parts, sized 4x4 pixel. the 1st row of pixels in the alpha channel is black (transparent) while the 2nd till 4th row are white (solid).
- 1 file "alpha2.tga" which is a 32 bit TGA with alpha channel with black & white parts, sized 4x4 pixel. the 1st & 2nd row of pixels in the alpha channel are black (transparent) while the 3rd & 4th row are white (solid).
- 1 file "alpha3.tga" ...
- 1 file "alpha4.tga" ...
- 1 file "red.tga" which is a 24 bit TGA with no alpha channel, sized 4x4 pixel & completely red (RGB=255,0,0).
- in the MDL i tried to use a Material like:
	Material {
		Layer {
			FilterMode Blend,
			static TextureID 40,//32 bit TGA
		Layer {
			FilterMode None,
			static TextureID 32,//24 bit TGA
but the 24 bit TGA keeps completely solid. also tried some different FilterModes, but all i figured out was to make parts of the 24 bit TGA become black or white.

the real problem behind:
- i have many other 24 bit TGA files sized 4x4 pixel with different gradient colors
- i want to make Sequences where they are invisible by default & blend in by showing 1 row of pixels each 100 Frames. (so it would take 400 Frames to show the complete 4x4 pixel big 24 bit TGA texture: 0: show 1st row; 100: show 2nd row; 200: show 3rd row; 300: show 4th row)
- i know i can create one 32 bit TGA for every transparent row with appropriate alpha channel setup, but first i wanted to be sure if there isnt an easier/quicker way

hope i could describe this problem in an understandable way...

chatted with MDL-god Rao Dao Zao :)
his suggestions were:
- Have a solid black plane over the top and roll it away so it slowly uncovers the thing you want?
- Have a solid plane underneath and pull the "pixels" above ground to make them appear?
- Put every row of pixels in a different geoset and just unhide them one by one?

haha, cool, now that i added these infos here, i understood that i can use Raos 1st suggestion by using a copy of my background instead of a black pane (my whole wc3 environment is planed to be 2D, like old console games).
- solved! with this workarround, otherwise i would have created lots of 32 bit TGAs...

while working on it, i came across another solution!
instead of using said suggestion from edit1, i'll go with following one in first place:
- use MDL "TextureAnims" by using 32 bit TGAs customized to double height of origin 24 bit TGAs, where the top half has no texture & a black alpha channel (invisible) & the bottom half has the texture from the origin TGA & a white alpha channel (visible). export the Geoset by only showing the top invisible half of said textures on the Geoset. in the "TextureAnims" you can setup a "Translation" to move the texture upwards, slowly hiding the invisble part & showing the visible part growing from the bottom of the Geoset.
more informations on "TextureAnims" explained from Rao Dao Zao in the following link under section "TVERTEXANIMS":

grab a beer! :)
Last edited:
Not open for further replies.