bitmask backcolor definition: a bug or feature + solution

Post ideas & suggestions you have pertaining to the game here.
Post Reply
User avatar
SiaFu
Commonwealth Pilot
Commonwealth Pilot
Posts: 88
Joined: Thu Jul 08, 2010 4:10 pm

When using 2bit or 24bit BMP bitmasks both in 1.01 or 1.02, if backcolor is not defined, like here in the original "Osaka playership" mod:

Code: Select all

<Image UNID="&rsOsaka;" bitmap="resources/images/osaka.jpg" 	bitmask="resources/images/osaka_mask.bmp" />
the mask is not applied which has 2 distinct effects:
- for weapons, the disabled icon in the "enable/disable" shows nothing instead of a grayed-out weapon icon.
- for ships, the bounding box extends to the whole image square - most noticeable when bumping into the Battle arena fence (and having a hard time passing through the gate).

This is not the case if backcolor is properly defined:

Code: Select all

<Image UNID="&rsOsaka;" bitmap="resources/images/osaka.jpg" 	bitmask="resources/images/osaka_mask.bmp" backColor="0x00000000" />
I've encountered this on 32bit Windows XP SP2 on two machines (with ATI Radeon Mobility 9700, and ATI 4850) in /gdi and /dx (and /windowed) modes.

Since I've encountered two mods that don't use the backcolor definition, it seems that my case is the one out of the norm and Azar_Wolf mentioned it should also work without the backcolor.
User avatar
Aury
Fleet Admiral
Fleet Admiral
Posts: 5421
Joined: Tue Feb 05, 2008 1:10 am
Location: Somewhere in the Frontier on a Hycrotan station, working on new ships.

Well, I was saying that it /should/ (in theory) work without backcolor; that it doesn't, is a bug.
(shpOrder gPlayership 'barrelRoll)
(plySetGenome gPlayer (list 'Varalyn 'nonBinary))
Homelab Servers: Xeon Silver 4110, 16GB | Via Quadcore C4650, 16GB | Athlon 200GE, 8GB | i7 7800X, 32GB | Threadripper 1950X, 32GB | Atom x5 8350, 4GB | Opteron 8174, 16GB | Xeon E5 2620 v3, 8GB | 2x Xeon Silver 4116, 96GB, 2x 1080ti | i7 8700, 32GB, 6500XT
Workstations & Render machines: Threadripper 3990X, 128GB, 6900XT | Threadripper 2990WX, 32GB, 1080ti | Xeon Platinum 8173M, 48GB, 1070ti | R9 3900X, 16GB, Vega64 | 2x E5 2430L v2, 24GB, 970 | R7 3700X, 32GB, A6000
Gaming Systems: R9 5950X, 32GB, 6700XT
Office Systems: Xeon 5318Y, 256GB, A4000
Misc Systems: R5 3500U, 20GB | R5 2400G, 16GB | i5 7640X, 16GB, Vega56 | E5 2620, 8GB, R5 260 | P4 1.8ghz, 0.75GB, Voodoo 5 5500 | Athlon 64 x2 4400+, 1.5GB, FX 5800 Ultra | Pentium D 3.2ghz, 4GB, 7600gt | Celeron g460, 8GB, 730gt | 2x Athlon FX 74, 8GB, 8800gts 512 | FX 9590, 16GB, R9 295x2 | E350, 8GB | Phenom X4 2.6ghz, 16GB, 8800gt | random core2 duo/atom/i5/i7 laptops
User avatar
Atarlost
Fleet Admiral
Fleet Admiral
Posts: 2391
Joined: Tue Aug 26, 2008 12:02 am

It is a bug, but it's not unique to you. You're just the first person to figure out why the arena gates won't let modded ships through without great difficulty.

Graphically there are no masking problems, and the hitbox respects the mask, but I know Wolfy and I have chronic problems with the arena walls.
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

I also have a related problem to this, I didn't manage to use a backcolor that is not black (0,0,0)

It simply doesn't work and I have no transparencies.
User avatar
Aury
Fleet Admiral
Fleet Admiral
Posts: 5421
Joined: Tue Feb 05, 2008 1:10 am
Location: Somewhere in the Frontier on a Hycrotan station, working on new ships.

Atarlost wrote: You're just the first person to figure out why the arena gates won't let modded ships through without great difficulty. .
And for this you are a genius. :D
(shpOrder gPlayership 'barrelRoll)
(plySetGenome gPlayer (list 'Varalyn 'nonBinary))
Homelab Servers: Xeon Silver 4110, 16GB | Via Quadcore C4650, 16GB | Athlon 200GE, 8GB | i7 7800X, 32GB | Threadripper 1950X, 32GB | Atom x5 8350, 4GB | Opteron 8174, 16GB | Xeon E5 2620 v3, 8GB | 2x Xeon Silver 4116, 96GB, 2x 1080ti | i7 8700, 32GB, 6500XT
Workstations & Render machines: Threadripper 3990X, 128GB, 6900XT | Threadripper 2990WX, 32GB, 1080ti | Xeon Platinum 8173M, 48GB, 1070ti | R9 3900X, 16GB, Vega64 | 2x E5 2430L v2, 24GB, 970 | R7 3700X, 32GB, A6000
Gaming Systems: R9 5950X, 32GB, 6700XT
Office Systems: Xeon 5318Y, 256GB, A4000
Misc Systems: R5 3500U, 20GB | R5 2400G, 16GB | i5 7640X, 16GB, Vega56 | E5 2620, 8GB, R5 260 | P4 1.8ghz, 0.75GB, Voodoo 5 5500 | Athlon 64 x2 4400+, 1.5GB, FX 5800 Ultra | Pentium D 3.2ghz, 4GB, 7600gt | Celeron g460, 8GB, 730gt | 2x Athlon FX 74, 8GB, 8800gts 512 | FX 9590, 16GB, R9 295x2 | E350, 8GB | Phenom X4 2.6ghz, 16GB, 8800gt | random core2 duo/atom/i5/i7 laptops
User avatar
SiaFu
Commonwealth Pilot
Commonwealth Pilot
Posts: 88
Joined: Thu Jul 08, 2010 4:10 pm

Glad I could be of help.
The backcolor thing actually occured to me when I was trying to use the Dakka mod weapon icons. Flying the Osaka afterwards made me put 2 and 2 together (I didn't even know there was an issue with modded ships).

Maybe properly setting the backcolor should be encouraged in the "make your mod" sticky?

digdug, about using other colors for transparencies, how would you do it?
Since I'm guessing the bit mask effectively functions like the alpha channel in TGAs it should be monochrome anyway.
User avatar
Vizth
Commonwealth Pilot
Commonwealth Pilot
Posts: 54
Joined: Mon Sep 04, 2006 12:56 am
Location: Tellico Plains, Tennessee

SiaFu wrote:Glad I could be of help.
The backcolor thing actually occured to me when I was trying to use the Dakka mod weapon icons. Flying the Osaka afterwards made me put 2 and 2 together (I didn't even know there was an issue with modded ships).

Maybe properly setting the backcolor should be encouraged in the "make your mod" sticky?

digdug, about using other colors for transparencies, how would you do it?
Since I'm guessing the bit mask effectively functions like the alpha channel in TGAs it should be monochrome anyway.
I checked before I released it. If I saw anything wrong I would have fixed it then. Though I'll admit I can't remember if I checked the enable/disable screen. I'll add the backcolor bit and reupload when I can, busy working on more ship models atm. XD

That's exactly what the mask is.
Image
Post Reply