Page 1 of 1

[Fixed for V0.37] Portrait PNG broken

Posted: Thu Mar 09, 2006 12:56 am
by Gambit37
If you use 32-bit PNGs for champion portraits, the alpha is respected in the mirror, but not once you've woken them.

If you're clever about including a background in the alpha part of the image, this could be quite a nice 'feature' which would allow 'scenario' backgrounds for each character.

I would however prefer for the alpha to be respected when the champion is woken -- I'm trying to make an interface where everything is much more fluid and integrated.

Maybe some kind of flag in the champion creation screen such as "Allow PNG background?" would enable us to choose this on a case by case basis?

Posted: Thu Mar 09, 2006 11:57 am
by George Gilbert
Fixed for V0.36

IMPORTANT NOTE - The fix for this now means that the transparency is a property of the engine not the portrait. The practical upshot is that when creating a new dungeon, the bitmaps for any new portraits should be defined with the TRANSPARENT flag set to FALSE (in previous versions it had to be TRUE).

Posted: Sun Mar 26, 2006 4:31 pm
by Gambit37
This still isn't working in the most recent version of the runtime you sent me, dated 19/03/2006 13:03.

My Portrait PNGs are set to TRANSPARENT=FALSE.

Several problems:

1) They are now appearing at 50% transparency in the mirrors (which isn't what I want). Is this now not possible to overide?:

Image

2) When viewed in the resurrection screen and once awakened, the background of the PNG is still displayed:

Image

Could you look at this again please? :)

Posted: Sun Mar 26, 2006 5:05 pm
by Gambit37
There is an additional problem: If you have viewed a portrait (PNG with Alpha) in the resurrection screen and then cancel, when you later walk past the portrait mirror, the background is now displayed. Oddly, it doesn't in diferent directions for different mirrors, or a different number of squares away for different mirrors.

Something very screwy here! You can see in Stamm's pic, that after viewing his portrait, it shows the background when viewed on the left hand side, one square away.

http://homepage.ntlworld.com/matt_hill/rtc/stamm1.jpg
http://homepage.ntlworld.com/matt_hill/rtc/stamm2.jpg
http://homepage.ntlworld.com/matt_hill/rtc/stamm3.jpg

For Tiggy, it happens on the right hand wall, two squares away:

http://homepage.ntlworld.com/matt_hill/rtc/tiggy1.jpg
http://homepage.ntlworld.com/matt_hill/rtc/tiggy2.jpg
http://homepage.ntlworld.com/matt_hill/rtc/tiggy3.jpg

Posted: Sun Mar 26, 2006 5:48 pm
by George Gilbert
Hmmm - I don't understand what you mean by "background" in all of the above.

For a mirror, there are only 2 images - that of the character and that of the mirror itself. When you're infront of the mirror then you see the mirror graphic and the character graphic. When you're in the character screen you just see the character graphic.

As far as I can see, all that's working so I don't understand what you think is wrong...

Posted: Sun Mar 26, 2006 6:03 pm
by Gambit37
OK, look at the picture of Halk in the above shot. He's on a brownish background in the resurrect screen. This is part of the original image -- the alpha channel is simply a mask to prevent this part of the image appearing. The data is still there in the PNG, you just normally don't see it because the alpha mask stops it from showing. It's pretty clear from those screens that the alpha is working in the mirror but not the resurrect screen.

For some reason, this part of the image is being displayed in the resurrect screen, and it later appears when viewed from the side but randomly.

In stamms picture, the left hand view shows it -- he's on a brown background which you can see quite clearly. For tiggy, she's cropped out over a white square, which you can also see clearly.

I'm sending you the RTC file for the other crashing bug -- it has all this stuff in so you can view the effect for yourself. ;)

Also, your description is slightly wrong -- there are four images to get this to work as you introduced the mask graphics to shape the portrait for being viewed from the side and distances. Maybe it's somehow connected to these masks?

Posted: Sun Mar 26, 2006 9:35 pm
by George Gilbert
Gambit37 wrote:Also, your description is slightly wrong -- there are four images to get this to work as you introduced the mask graphics to shape the portrait for being viewed from the side and distances. Maybe it's somehow connected to these masks?
Good point - BTW the things that look like masks aren't masks, they're the shape that the portrait is squished into.

There are some very strict assumptions made about them (in particular, continuity of the black pixels) in the code so be very careful about changing them other than putting them into high-res versions!

Posted: Sat Apr 01, 2006 1:00 am
by Gambit37
You moved this to the archive and listed it as fixed in the email, but I'm afraid it's still broken.

What do you need from me to help you fix it?

Posted: Sat Apr 01, 2006 1:34 am
by George Gilbert
Just an example - can you send me that RTC compiled file and I'll take a look.

Posted: Sat Apr 01, 2006 10:58 am
by Gambit37
OK, I posted you a link in a private message.

Posted: Sat Apr 01, 2006 7:17 pm
by George Gilbert
Now fixed properly for V0.37!