View topic - Springs temperamental handling of sprites.



All times are UTC + 1 hour


Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: 17 Jun 2012, 22:09 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: ModalitÃ
The following:
Image
renders as such:
Image

For some things it works, for others it doesn't, it is terribly temperamental, even when given an alpha layer strange things like this white effect happen if I don't do the black just right at the edges of the transparency.

So what am I doing wrong here? If there is nothing wrong with the png, why does spring do this?


Top
 Offline Profile  
 
PostPosted: 18 Jun 2012, 00:28 
Damned Developer
User avatar

Joined: 01 Jun 2006, 12:15
Location: Banned user for reason “Do not post pictures of people fucking cars”
use a black background and store the transparency in a separate channel and go with a different format that PS can actually store alpha channels in.

I think there was a program that you could attach alpha channels to PNGs properly. cant remember what it was called but the layer transparency thing is the issue here, I've had it often enough


Top
 Offline Profile  
 
PostPosted: 18 Jun 2012, 00:32 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: ModalitÃ
Cool, if you think of it let me know. So it is an issue with png?


Top
 Offline Profile  
 
PostPosted: 18 Jun 2012, 08:36 
Moderator
User avatar

Joined: 26 Oct 2007, 15:21
Rattle is right, this is why I stay away from PNG. It doesnt offer anything, since the image will be compressed in sd7-sdz anyway, and png just adds another decompression step upon loading mod.


Top
 Offline Profile  
 
PostPosted: 18 Jun 2012, 10:25 
Battletech Developer
User avatar

Joined: 21 May 2007, 01:09
Location: New Zealand
dxtBMP is the program you are looking for


Top
 Offline Profile  
 
PostPosted: 18 Jun 2012, 17:46 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: ModalitÃ
Beherith wrote:
Rattle is right, this is why I stay away from PNG. It doesnt offer anything, since the image will be compressed in sd7-sdz anyway, and png just adds another decompression step upon loading mod.
It might seem silly but png is good for me because for things like CeG sprites I can see the thumbnail in windows and it speeds up my ceg development. which is important when generating sparkle cannons..
Image


Top
 Offline Profile  
 
PostPosted: 18 Jun 2012, 19:59 
Community Representative
User avatar

Joined: 08 Sep 2008, 21:59
Location: small cars
Pressure Line wrote:
dxtBMP is the program you are looking for



thanks i needed this for something unrelated; i thought it was an unfixable problem that i had created


Top
 Offline Profile  
 
PostPosted: 18 Jun 2012, 21:04 
Game Developer
User avatar

Joined: 25 Jun 2006, 07:44
Location: Germany
Normal alpha is rendered with SRC_ALPHA, DEST_ONE_MINUS_ALPHA but Spring uses SRC_ONE, DEST_ONE_MINUS_ALPHA. Basically the color channels are drawn additive and the alpha channel is drawn multiplicative (i.e. the alpha darkens stuff while the color brightens). If you leave alpha completely black you get additive blending.

Also you're really making my fairy more fabulous.


Top
 Offline Profile  
 
PostPosted: 18 Jun 2012, 23:15 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: ModalitÃ
KDR_11k wrote:
Also you're really making my fairy more fabulous.
Yer welcome.


Top
 Offline Profile  
 
PostPosted: 18 Jun 2012, 23:32 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: ModalitÃ
possibly related, I just found out spring READS psds... so my sprites being dorked up may have a LOT to do with this!


Top
 Offline Profile  
 
PostPosted: 19 Jun 2012, 20:41 
Damned Developer
User avatar

Joined: 01 Jun 2006, 12:15
Location: Banned user for reason “Do not post pictures of people fucking cars”
Pressure Line wrote:
dxtBMP is the program you are looking for

that's what I just googled up.. does not support PNG though
http://www.mwgfx.co.uk/programs/dxtbmp.htm

http://en.wikipedia.org/wiki/Portable_Network_Graphics
Quote:
PNG offers a variety of transparency options. With truecolor and grayscale images either a single pixel value can be declared as transparent or an alpha channel can be added (enabling any percentage of partial transparency to be used). For paletted images, alpha values can be added to palette entries. The number of such values stored may be less than the total number of palette entries, in which case the remaining entries are considered fully opaque.
Pretty sure that this is the reason for this issue.

http://www.fnordware.com/superpng/
Quote:
SuperPNG fully supports the PNG format. It includes some additional options for saving PNGs:
    Alpha channel control
    Variable Compression
    ICC profile embedding
    Meta Data saving

This is a Photoshop plugin


Top
 Offline Profile  
 
PostPosted: 20 Jun 2012, 18:49 
Kernel Panic Co-Developer
User avatar

Joined: 16 Nov 2004, 13:08
What's the point of variable compression in PNG?


Top
 Offline Profile  
 
PostPosted: 20 Jun 2012, 18:56 
User avatar

Joined: 02 May 2005, 02:56
Location: Canada
zwzsg wrote:
What's the point of variable compression in PNG?

Decompression time VS File Size.


Top
 Offline Profile  
 
PostPosted: 21 Jun 2012, 16:11 
Damned Developer
User avatar

Joined: 01 Jun 2006, 12:15
Location: Banned user for reason “Do not post pictures of people fucking cars”
PNG was introduced as a format for lossless web graphics, either palletized or per pixel data in a time where bandwidth still mattered


Top
 Offline Profile  
 
PostPosted: 21 Jun 2012, 19:43 
Kernel Panic Co-Developer
User avatar

Joined: 16 Nov 2004, 13:08
It did not occur to me that decompression time could matter.


Top
 Offline Profile  
 
PostPosted: 24 Jun 2012, 11:15 
Modeler
User avatar

Joined: 10 May 2009, 11:27
Location: on new sidney
now i know why this was happening to me too


Top
 Online Profile  
 
PostPosted: 08 Dec 2012, 04:46 

Joined: 17 Sep 2008, 03:36
Location: your imagination
A minor thread-rez spell casted;

If anybody has tips or techniques on how to handle this in gimp, it would be much appreciated.


Top
 Offline Profile  
 
PostPosted: 08 Dec 2012, 04:50 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: ModalitÃ
IIRC you had to do a plugin or something.


Top
 Offline Profile  
 
PostPosted: 08 Dec 2012, 22:04 
Damned Developer
User avatar

Joined: 01 Jun 2006, 12:15
Location: Banned user for reason “Do not post pictures of people fucking cars”
Try TGA instead. You will zip the game folder anyway so wether the image data is zipped in the file itself or afterwards does not make that much of a difference.


Top
 Offline Profile  
 
PostPosted: 03 Feb 2013, 16:50 
User avatar

Joined: 30 Nov 2008, 04:31
Location: the flow
I've run some experiments trying to replace zk's default orange ball cannon projectile with something nicer. Here's what:

- TGA with no alpha channel: additive blending, with black (i.e, shaded darker; not fully transparent) mask for #000 pixels. Might be something card-specific, but the masking makes it pointless for me.
- TGA with an alpha channel: 1-bit transparency.
- TGA with an all-black alpha channel (i.e, zero opacity): nothing drawn.
- TGA with an all-white alpha channel (i.e. full opacity): additive blending as above, dark box around projectile as above.

Anybody has any other ideas?


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.