• 🏆 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!

Upside Down Icon?

Status
Not open for further replies.
Level 2
Joined
Nov 18, 2005
Messages
17
I followed Flame_Phoenix's wonderful tutorial on creating icons using W3IR and WC3Viewer and all went well for the most part. However, when I went to convert my 48x48 icon into a BLP (i'm trying to create a custom attack and upgrade type) using WC3 Viewer, it seems that the viewer saved it upside down! :( When I try to convert it, I get a warning message that says its not a 32 bits TGA file. In Flame_Phoenix's tutorial, it says save it as a 24 bits and apparently his worked just fine. It continues to say that without an alpha channel, the texture cannot be converted. Obviously, I say yes to adding an alpha channel, and it then is saved to a blp. Nothing sounds out of the ordinary yet, right? When I import the icon and try to use it, its upside down. I also tried to just avoid making it a blp altogether and just import it as a .tga, but when I try to use the icon as a tga, the Editor crashes. I'm confused!! Can anyone help??
 

Deleted member 157129

D

Deleted member 157129

First of, .tga's must be converted to .blp.. don't use .tga (like you already discovered that does not work).

I don't know what tools you used to create your icon, but you have to make sure it has an alpha channel (with Photoshop, you simply add one under 'Channels' - make sure you never do 'Flatten Image' because that will remove the alpha channel) and I must admit that it's been a while since I did this, but it's important to have the correct -bit on the .tga. I've had trouble with upside-down textures/skins as well, but right now I can't remember why, other than that it usually fixed itself by doing it again.
Add alpha channel and save it as 32-bit and try that, if it doesn't work I'll try to look into it more closely.
 
Level 5
Joined
Jan 23, 2009
Messages
217
I've experienced this before. I just redo the icon, OR I keep converting it from blp to blp (Yes, i typed that correctly) until it works.
 
Level 30
Joined
Sep 2, 2007
Messages
3,723
First of, .tga's must be converted to .blp.. don't use .tga (like you already discovered that does not work).

I don't know what tools you used to create your icon, but you have to make sure it has an alpha channel (with Photoshop, you simply add one under 'Channels' - make sure you never do 'Flatten Image' because that will remove the alpha channel) and I must admit that it's been a while since I did this, but it's important to have the correct -bit on the .tga. I've had trouble with upside-down textures/skins as well, but right now I can't remember why, other than that it usually fixed itself by doing it again.
Add alpha channel and save it as 32-bit and try that, if it doesn't work I'll try to look into it more closely.
Talk about things you know off. You have no idea how wrong you are.

You used photoshop (or another tool) to crate the icon and used war3 viewer to convert it. The thing with that is ... If you save it wrongly (in 32BIT) your icon will be flipped upside down. you should always save your icons in .tga, 24bit. Tga is the best extension you can use for creating icons.
 
Level 14
Joined
Nov 23, 2008
Messages
187
DevineArmy said:
If you save it wrongly (in 32BIT) your icon will be flipped upside down.
No, sir, you're wrong.
Image flip absolutely have no dependence with image bitness (although they are placed in one byte).

TGA format description said:
Offset - $11 - Image Descriptor Byte.

Bits 3-0 - number of attribute bits associated with each pixel. For the Targa 16, this would be 0 or 1. For the Targa 24, it should be 0. For Targa 32, it should be 8.
. . .

Bit 5 - screen origin bit.
0 = Origin in lower left-hand corner.
1 = Origin in upper left-hand corner.

Must be 0 for Truevision images.
. . .

Photoshop saves TGA with "origin in lower left-hand corner". That's why War3Viewer reads such files correctly.

W3IR uses "origin in upper left-hand corner" instead. Of course, War3Viewer doesn't recognize any flag changes and reads image "normally", which means flipped to user.

Also W3IR compresses TGA with run-length encoding. They will not work, because warcraft supports only 24- and 32- bit TGA without any compressions and colormaps.
 

Deleted member 157129

D

Deleted member 157129

Talk about things you know off. You have no idea how wrong you are.

You used photoshop (or another tool) to crate the icon and used war3 viewer to convert it. The thing with that is ... If you save it wrongly (in 32BIT) your icon will be flipped upside down. you should always save your icons in .tga, 24bit. Tga is the best extension you can use for creating icons.


Rather ironic that you start complaining I talk about something I don't know about, yet you babble on with a false statement. I admitted it had been a while, and I could not remember which bit-level of Targa the WC3Viewer preferred. I also know that without an alpha-channel for your image, troubles may occur. I know for a fact that my skins has been swapped upside-down before using Photoshop- and it usually was fixed if I redid it (ie pasted the finished skin in a new layer upon the original skin and melded the visible layers so that it keeps the original alpha channel, and then edit the alpha later. So I've got a feeling the alpha-channel is important for either WC3 or WC3 Viewer. As far as extensions go, the amount of bits does not flip an image, because that's the encoding and decoding - like explained in the post above me. Although I do not like braging about it, I do in fact have knowledge about this on a scholar level, I've had exams in Digital Representation, passing with a B- so please don't point your finger at me for not knowing what I'm talking about.
 
Level 6
Joined
May 7, 2009
Messages
228
Also W3IR compresses TGA with run-length encoding. They will not work, because warcraft supports only 24- and 32- bit TGA without any compressions and colormaps.

I've used RLE TGAs before and Warcraft displays them just fine. You are right that indexed color doesn't work though.
 
Level 14
Joined
Nov 23, 2008
Messages
187
@Storyyeller

I've tested TGA icons generated by W3IR, and they crashed the game. Hmm... Tested with photoshop generated TGA (with RLE) and it works fine. Compared both files, and found interesting thing: W3IR generated TGA files have unneeded information in color map section.

It seems, that game doesn't ignore this section, and if section has not-null values in it, game recognizes TGA as color mapped and crashes when icon is displayed. World Editor just doesn't display anything for me, if I try to view such TGA files.

What can I add to this? I recommend not to use W3IR, it generates inapplicable TGA files. 'nuff said.
 
Status
Not open for further replies.
Top