Transparency in SF 2.0

Figured out how to make smooth ship rotations easily? Perhaps you have just designed some amazing ships and want to release it to the public? These forums are for that!
Post Reply
NiteHawk
Game Developer
Posts: 198
Joined: Sun May 29, 2011 2:34 pm

Transparency in SF 2.0

Post by NiteHawk » Tue Aug 02, 2011 8:16 pm

Transparency works good in SF now. I will show examples of what I mean.

With the current BMP system, bmp has never supported transparency properly, and the game has to make a pixel (normally 0/0/0 flat black) transparent. So an image with 'transparency' looks would have to be like this in SF1.4 and SF2.0 BMP:

Image

Would look okay on the drawing board. In game...

Image

At first glance, it looks ok.

Image

Image

Now you see the issue. Black won't work as transparency because the 'transparent areas' of black aren't full/flat black (0/0/0 RGB). They have BLUE in them, and SF cannot split up the black/blue, it is impossible to do so. As well, in the first in game image I showed, it would actually 'cover' the stars in the background, much like the old SF 1.2-1.4 cloaking did revealing the position. SF also gets confused a bit with images like this, as the color changes a bit.

(Continued on next post)

NiteHawk
Game Developer
Posts: 198
Joined: Sun May 29, 2011 2:34 pm

Re: Transparency in SF 2.0

Post by NiteHawk » Tue Aug 02, 2011 8:17 pm

Now, in 2.0, you can use PNG. With PNG comes transparency. You cannot use the same image with black and expect it to use the transparent areas. You need to design it with a TRANSPARENT background. For example:

Image

This is transparent. You do NOT need to define the black at all. This works perfectly in game:

Image

And through ships/planets, still works as intended:

Image

Image

----

"But when I try to design transparency images, it's hard to see in Photoshop! (ex.)
Use a second layer and put it on the bottom most layer when working. When you are complete, you can toggle the visibility of the background layer and it will become 'transparent' again.

Hard to see transparent image.
Image

Black layer, you can toggle this and it will become like the above image. Always toggle it off before saving to a PNG file.
Image

Thanks.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest