Resolved: 32-BPP BMP
by Jason Cahill · in Torque Game Builder · 02/27/2005 (10:30 am) · 3 replies
This might be "by design" (if Torque doesn't support this image format), but it sure looks like it's giving it a shot! I'd love to know what 32-bit ARGB formats I can use for my sprites and if T2D supports 8-bit alpha (I imagine it should, it's GL that's rendering it after all).
I was unhappy with the default filtering (my sprites are given a "dark halo around them" as if it's bi-linear filtering with black when it hits a transparent pixel) when using 1-bit alpha via PNG. In my own (cruddy) 2D engine in the past I had this same problem and found that with DirectX the problem was resolved by using 8-bit alpha, for whatever reason.
Anyway, here's my image:
mysite.verizon.net/res8owqn/helicopters.bmp
I saved it in PhotoShop CS as a ".bmp" with Alpha channels, then clicked on "Advanced modes" and selected 32-bit "A8 R8 G8 B8" for the mode. Here's the appropriate load code:
Here's what I get in T2D:
mysite.verizon.net/res8owqn/heli-bug-2.jpg
Sorry for posting all these bugs guys! I'm honestly just trying to help! :-)
I was unhappy with the default filtering (my sprites are given a "dark halo around them" as if it's bi-linear filtering with black when it hits a transparent pixel) when using 1-bit alpha via PNG. In my own (cruddy) 2D engine in the past I had this same problem and found that with DirectX the problem was resolved by using 8-bit alpha, for whatever reason.
Anyway, here's my image:
mysite.verizon.net/res8owqn/helicopters.bmp
I saved it in PhotoShop CS as a ".bmp" with Alpha channels, then clicked on "Advanced modes" and selected 32-bit "A8 R8 G8 B8" for the mode. Here's the appropriate load code:
datablock fxImageMapDatablock2D(enemyHelicopter)
{
mode = cell;
texturename = "~/client/images/helicopters.bmp";
cellWidth = 32;
cellHeight = 16;
cellCountX = 4;
cellCountY = 1;
};Here's what I get in T2D:
mysite.verizon.net/res8owqn/heli-bug-2.jpg
Sorry for posting all these bugs guys! I'm honestly just trying to help! :-)
About the author
#2
user.fundy.net/morris/redirect.html?photoshop27.shtml
www.libpng.org/pub/png/png.html
Alright! PNG it is.
02/27/2005 (11:21 am)
Fascinating. Pat, you are right. PNG is a cooler format than I thought. I thought PNG only supported 1-bit alpha, but low and behold:user.fundy.net/morris/redirect.html?photoshop27.shtml
www.libpng.org/pub/png/png.html
Alright! PNG it is.
#3
02/28/2005 (7:00 am)
PNG's are your friends :)
Torque 3D Owner Pat Wilson