Game Development Community

Alpha.jpg ?? I can't seem to get it working

by Ezra · in Torque Game Builder · 03/23/2006 (10:51 pm) · 7 replies

I've searched around a bit but haven't found anything more about how to use this other than having 2 jpeg's, one being the alpha image (blah.jpg and blah.alpha.jpg)

When I create static sprites using the imageMapData block for the jpg, they just show up without the alpha transparency, do I need any special blend modes or additional properties??

#1
03/24/2006 (2:34 am)
What alpha?
JPG does not support alpha colors ... (not even masking)
#2
03/24/2006 (3:41 am)
You're supposed to be able to fake alpha in jpgs under TGB by using two images. One of your sprite, and another that masks out the transparent areas.

Personally I wouldn't bother though. I use pngs for all my art which has built in transparency.
#3
04/26/2006 (3:30 am)
Aye..

Drop the .jpg and use .png instead. (Convert your jpg's to png's using Gimp/etc...)

Save some headaches.
#4
04/27/2006 (4:22 am)
I got it working with an older version of TGB, but I also have not been able to get it working in one of the alpha releases (I'm not using a beta for my current project). I even tried saving the .alpha.jpg as a grayscale image but it still didn't work. I'd really like to use this feature of Torque as it does indeed save lots of file space.
#5
04/27/2006 (4:38 am)
Update: I just got it to work. Apparently Torque doesn't like something about how Photoshop saves the file if you use "Save For Web". I saved the file as a grayscale through the normal "save as" menu and it worked.
#6
04/27/2006 (11:53 am)
Jason,

Sorry Man. After reading this, I realised you sent me an email on this subject and I didn't get back to you on it. Darn it, sorry about that. I've been doing that alot lately as I've got lots of stuff going on.

Glad you got it working though. :)

Again, sorry I didn't get back to you.

- Melv.
#7
04/27/2006 (7:01 pm)
Melv, no problem! Don't trouble yourself over it. I know you're busy, and I took no offense whatsoever. It wasn't a code issue, so I would have felt bad for pestering you about it anyway. ;)