Pages: [1]
  Print  
Author Topic: Transparency in character select screen issue  (Read 3920 times)
NalaNosivad
Bulb
*
Posts: 70


View Profile
« on: August 24, 2013, 06:33:39 PM »

READ ME FIRST
While I do still feel this is a bug in the game, the issue appears to have a workaround. If you're experiencing this problem, just don't use Photoshop. Do your editing/saving in another program. Photoshop is apparently doing SOMETHING to the PNG's transparency that other programs don't in a way that causes the game to get screwy with it on the character select screen.

And here's the reason! Thanks for the input, kind dev deity!


Yeah, this is a known issue with the way Photoshop saves PNGs. There are plugins around to fix this as well. It was super annoying as we kept running into this while making the game too. Basically, Photoshop doesn't save color info for transparent pixels, it just leaves them white. But when you end up sampling the texture in D3D, you'll actually grab some of that white and blend it into the outer pixels, which causes the nasty halo effect.


Having looked into a problem someone was having (here), I found that for some reason the transparency of sprite sheets becomes.. rather screwy on the character selection screen, primarily with the standing frame, as you can see in that thread.

Having done some tests, I came up with the following images to demonstrate the problem:




The "character" shown on the character select screen is of course the various squiggles with various line hardnesses in the top-left of the second image. As you can see, most (but not all) are showing white edges where there should be (and is) transparency in the file itself.

So, I decided to test it using a gradient. The results are here. As you can see, the transparenncy just.. outright breaks, where it starts out okay. Underneath the screen captures, I've stuck the same gradient in the same position as the sprite on-screen to show what it should look like.
« Last Edit: August 29, 2013, 04:59:41 AM by NalaNosivad » Logged

Stupid banners in the top-left corner of the screen annoying you in the new Spelunky? Using a PS3 controller via 360ce or MotionInJoy?

Grab my light UI/PS3 controller mod!
darkunderdog
Shoot
*
Posts: 47



View Profile
« Reply #1 on: August 25, 2013, 10:26:54 AM »

Looks like the issue might resolved - I used SAI to save the PNG and the issue is now resolved...

SAI:


Photoshop:


Thanks Mastastealth for catching this! Smiley
Logged
NalaNosivad
Bulb
*
Posts: 70


View Profile
« Reply #2 on: August 25, 2013, 11:25:00 AM »

Looks like the issue might resolved - I used SAI to save the PNG and the issue is now resolved...

SAI:


Photoshop:


Thanks Mastastealth for catching this! Smiley
Oh, Photoshop.. just out of curiosity, how were you saving the PNG in Photoshop/SAI? I'm beginning to suspect that it's Photoshop that's doing something funky to the transparency when using the save for web dialog.
Logged

Stupid banners in the top-left corner of the screen annoying you in the new Spelunky? Using a PS3 controller via 360ce or MotionInJoy?

Grab my light UI/PS3 controller mod!
Whooper1222
Mossy
*
Posts: 2413


View Profile WWW
« Reply #3 on: August 25, 2013, 11:40:22 AM »

Looks like the issue might resolved - I used SAI to save the PNG and the issue is now resolved...

SAI:


Photoshop:


Thanks Mastastealth for catching this! Smiley
Oh, Photoshop.. just out of curiosity, how were you saving the PNG in Photoshop/SAI? I'm beginning to suspect that it's Photoshop that's doing something funky to the transparency when using the save for web dialog.
Yes, Photoshop is the culprit!
Logged

darkunderdog
Shoot
*
Posts: 47



View Profile
« Reply #4 on: August 25, 2013, 11:41:15 AM »

I was just using the default settings in each, nothing special...
Logged
astrospoon
Shoot
*
Posts: 18


View Profile Email
« Reply #5 on: August 26, 2013, 10:20:12 AM »

Yeah, this is a known issue with the way Photoshop saves PNGs. There are plugins around to fix this as well. It was super annoying as we kept running into this while making the game too. Basically, Photoshop doesn't save color info for transparent pixels, it just leaves them white. But when you end up sampling the texture in D3D, you'll actually grab some of that white and blend it into the outer pixels, which causes the nasty halo effect.
Logged
NalaNosivad
Bulb
*
Posts: 70


View Profile
« Reply #6 on: August 26, 2013, 04:28:56 PM »

Yeah, this is a known issue with the way Photoshop saves PNGs. There are plugins around to fix this as well. It was super annoying as we kept running into this while making the game too. Basically, Photoshop doesn't save color info for transparent pixels, it just leaves them white. But when you end up sampling the texture in D3D, you'll actually grab some of that white and blend it into the outer pixels, which causes the nasty halo effect.
Photoshop seriously sees fit to leave them white? Way to go, Adobe! Time to go hunt down an alternative PNG exporter/plugin.
Logged

Stupid banners in the top-left corner of the screen annoying you in the new Spelunky? Using a PS3 controller via 360ce or MotionInJoy?

Grab my light UI/PS3 controller mod!
Pages: [1]
  Print  
 
Jump to: