• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Texture with alpha?

Status
Not open for further replies.
Level 15
Joined
Jul 6, 2009
Messages
889
Texture with transparency?

How does one make a texture/icon (.blp) with alpha?

attachment.php


I want to use this icon as a texture as part of a GUI in-game and where I can change the colour of it by just changing the model's rgb.

What format do I need to use? Warcraft 3 Viewer needed me to use .tga, .bmp or .jpeg. But when I convert it using either of these formats, the resultant .blp fails.

Or is that white rendered as transparent in the editor/wc3?
 

Attachments

  • IconHighlight.png
    IconHighlight.png
    6.6 KB · Views: 344
Level 15
Joined
Jul 6, 2009
Messages
889
I recommend .TGA. You can alternatively try using BLP Lab.

If you are applying it to a model, you have to keep in mind that the material layer mode may need to be modified (to transparent? or something).

Is this for an ingame GUI (using trackables/images) or is it for actual icons?

Hmm. Not sure how exactly it works. I'm using a destructable which uses a model with a replaceable texture and I'm just changing that field so that it displays the texture. Like how hero selection screens work. Except mine is for cinematic purposes only.
 
Level 17
Joined
Jan 18, 2010
Messages
1,122
The image you posted is transparent, what exactly is the problem ? Just convert the png into blp directly, don't use targa,jpg bmp or whatever else.
Honestly, png is the best format to handle transparency. If you need an actual custom alpha channel then make it in targa.

What I understand is that you want the white glow to be transparent like that correct ?
 
Level 15
Joined
Jul 6, 2009
Messages
889
The image you posted is transparent, what exactly is the problem ? Just convert the png into blp directly, don't use targa,jpg bmp or whatever else.
Honestly, png is the best format to handle transparency. If you need an actual custom alpha channel then make it in targa.

What I understand is that you want the white glow to be transparent like that correct ?

What I wanted was:

16cdb0e0f7f15c56cb72905207669e10.png


The icons currently are destructables with models with a replaceable texture. I wanted to add the glow with another destructable and just change the colour of them. Hmm, I think I will just use effects instead though.
 
Level 17
Joined
Jan 18, 2010
Messages
1,122
Nah, just make a white doodad of the glow and make as many animations as many of the frames you want and change its vertex color in every animation.
In game then just play different animation depending on what player chooses what.
You can animate the geosets visibility to 0 in the default stand so there is no glow before anybody chooses it.

I think that would work and make what you want.
Another easy way would be making the glow a dummy unit, and simply change its vertex color in game. On initialization you'd make the vertex transparency for all icons 100% so they don't show.
 
You have a couple of options. Talavaj's methods are definitely viable.

The first things that came to my mind was (1) you can create a 64x64 texture that is all red/blue/w/e with the rounded edges you have. Since you have a black background, you can just make the edges black. Then just make the destructible below the other one (place the other one with a higher Z, but scale the glowing one up). It is not super clean, but you can easily enable and disable it just by creating a destructible at the appropriate position.

(2) Essentially the same thing, but create an image instead (this supports transparency very easily). You would just have it below the other one--assuming that you have a top down view.
 
Level 16
Joined
Aug 7, 2009
Messages
1,403
Well, using alpha channels in PS has always worked me. I've done a similar border for spells that are being caster/channeled, for my DGUI spell bar and it worked properly. The same goes to the IID healthbar textures.

So do you actually use alpha channels, or do you just make certain parts transparent and try to use them?

What is that hero selection window for, BTW? It looks nice :)
 
Status
Not open for further replies.
Top