StellarForum
May 20, 2012, 01:02:01 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Stellar Frontier has moved to the new forum and site at stellarfrontier.com!
Please make a new account there in preparation for SF 2.0 and to chat on the boards!
 
   Home   Help Search Groups Login Register  
Pages: [1] 2 3
  Send this topic  |  Print  
Author Topic: SF 2.0 - Transparency -- It's super affective!  (Read 2598 times)
NiteHawk
<dev></dev>
Administrator
Legendary Member
*****
Posts: 2816



WWW
« on: June 22, 2010, 04:31:00 AM »

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:



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



At first glance, it looks ok.





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)


Report to moderator   Logged

http://chrisvall.com - Coding/gaming blog in the works.
NiteHawk
<dev></dev>
Administrator
Legendary Member
*****
Posts: 2816



WWW
« Reply #1 on: June 22, 2010, 04:59:34 AM »

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:



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



And through ships/planets, still works as intended:





----

"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.


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


Thanks.

« Last Edit: June 22, 2010, 05:03:30 AM by NiteHawk » Report to moderator   Logged

http://chrisvall.com - Coding/gaming blog in the works.
NiteHawk
<dev></dev>
Administrator
Legendary Member
*****
Posts: 2816



WWW
« Reply #2 on: June 22, 2010, 07:29:58 AM »

P.S. Mainly this is here to let you know how to handle it, and everyone has been set at never using transparency. This should help with alot of issues such as black outlines due to no actual previous transparencies, and you should be able to make some neat weapons, like energy balls Smiley
Report to moderator   Logged

http://chrisvall.com - Coding/gaming blog in the works.
warfighter67
Advanced Member
****
Posts: 183


piepwnsu dshunia10
Email
« Reply #3 on: June 22, 2010, 10:32:41 AM »

Awesome Nite! You have been doing some great work with this game! I can't wait to see the finish of the main bugs solving and content updates with the game!
Report to moderator   Logged

known as "RearAdm. OE Earthforce Commander" [10/30/09]

ALL UR BASE R BELONG
Cykotitan
Experienced Member
***
Posts: 86



« Reply #4 on: June 23, 2010, 12:44:36 AM »

Awesome, I was really looking forward to alpha channel support.

Or wait, is this 8-bit transparency?
« Last Edit: June 23, 2010, 12:46:50 AM by Cykotitan » Report to moderator   Logged
NiteHawk
<dev></dev>
Administrator
Legendary Member
*****
Posts: 2816



WWW
« Reply #5 on: June 23, 2010, 07:08:29 AM »

Should work with 16 or 32 as well, but yeah, its the alpha transparency from the actual image.
Report to moderator   Logged

http://chrisvall.com - Coding/gaming blog in the works.
Harpor
Veteran Member
*****
Posts: 298


=GB= Viper

hla8473@msn.net hla8473 hla8473
« Reply #6 on: July 23, 2010, 01:19:26 PM »

';..;' this stuff is way beyond my comprehention ';..;'
Report to moderator   Logged

A Dragons Word Is Stronger Than Trust
[WD Creed]
Arsanthania
Advanced Member
****
Posts: 140



WWW
« Reply #7 on: October 19, 2010, 10:31:01 PM »

YUS!!!

so possible support for .pngs?

that would be awesome, but i'll live if it's still just .bmps, with trans.
Report to moderator   Logged

I can make good ship rotations, with anti-aliasing!
PM me!

Working on a good SW mod, with the real sounds!
Sandtrooper
Vice CinC of TRIBE
Administrator
Expert Member
*****
Posts: 504



WWW Email
« Reply #8 on: October 19, 2010, 10:40:02 PM »

YUS!!!

so possible support for .pngs?

Uhm, that's the WHOLE point for SF 2.0x, PNG support being ONE of the greatest things expected.
Report to moderator   Logged



Fleet Admiral Sandtrooper
2nd in Command of TRIBE

TRIBE-SD)    オークエボリューション
(Oak Evolution)
NiteHawk
<dev></dev>
Administrator
Legendary Member
*****
Posts: 2816



WWW
« Reply #9 on: October 20, 2010, 05:32:07 AM »

YUS!!!

so possible support for .pngs?

that would be awesome, but i'll live if it's still just .bmps, with trans.

BMPS don't support transparency Tongue
Report to moderator   Logged

http://chrisvall.com - Coding/gaming blog in the works.
Arsanthania
Advanced Member
****
Posts: 140



WWW
« Reply #10 on: October 20, 2010, 09:20:23 AM »

i meant bmp transparency in the old manner, but i'm fine with just .png support.

does sf rotate the ships for you, or do you still have to rotate them?

(i'm fine either way, but if sf rotated the ships for you, one could add animations)
Report to moderator   Logged

I can make good ship rotations, with anti-aliasing!
PM me!

Working on a good SW mod, with the real sounds!
Sandtrooper
Vice CinC of TRIBE
Administrator
Expert Member
*****
Posts: 504



WWW Email
« Reply #11 on: October 20, 2010, 01:57:52 PM »

i meant bmp transparency in the old manner, but i'm fine with just .png support.
Well the game sees RGB 0,0,0 as the trigger for transparency for bitmaps, in 2.0x this is still supported, but it's a simple Y/N value in the bitmap SEC files now instead of an adjustable RGB cutoff value.  PNGs are automatically set to use their transparency in the game.

Quote
does sf rotate the ships for you, or do you still have to rotate them?

(i'm fine either way, but if sf rotated the ships for you, one could add animations)

You still have to rotate the ships with the ancient "SF Rotator" which only has bitmap support, and it's pretty useless for anything beyond 80x80 pixels in size for "clipping" detection (it still works and produces the filmstrip bitmaps but you can't see the full ship in the program if it's bigger than 80x80).  I've been (bitching) to see a PNG version of the program made.

I'm not sure if we would be able to get the game to do the rotations on it's own, because it sounds like a very hard task to install.
Report to moderator   Logged



Fleet Admiral Sandtrooper
2nd in Command of TRIBE

TRIBE-SD)    オークエボリューション
(Oak Evolution)
NiteHawk
<dev></dev>
Administrator
Legendary Member
*****
Posts: 2816



WWW
« Reply #12 on: October 20, 2010, 02:01:54 PM »

i meant bmp transparency in the old manner, but i'm fine with just .png support.

does sf rotate the ships for you, or do you still have to rotate them?

(i'm fine either way, but if sf rotated the ships for you, one could add animations)

Ah well they still work in the old manner too, but PNG transparency can be allowed.

Ships don't rotate for you because ships become very pixellated at that size when rotating, so we decided for now not to include it. Maybe in the future if we support 3D models or something fancy like that. I'll probably work on a nice rotation system that blends the rotation properly so its not pixellated. But future anyways. Theres other ways to add animation, when I get to it, that is. Smiley It's possible but, you're not going to like the result of a 32x32 rotation, for example. It would be alot of work to do in its current state because the game turning/etc is totally based on what 'frame' its on. Would be alot of work, and might be able to only support one or the other easily. So pretty much, supported the one that allows clean 32x32 rotations, for example.

The RGB cutoff doesn't work in the DX system so I didn't bother with it, I made it work for 0,0,0 and left it like that and added real transparency support. Pretty much i you want something to be invisible, set it to 0,0,0. if you had a cutoff of 10,10,10, and for some reason still want that, you can do it very easily in photoshop though! Smiley
Report to moderator   Logged

http://chrisvall.com - Coding/gaming blog in the works.
Arsanthania
Advanced Member
****
Posts: 140



WWW
« Reply #13 on: October 20, 2010, 10:11:29 PM »

ack, photoshop. xP

i use The GIMP!

plus Game Maker 8's sprite rotator, i can make anti-aliased ship rotations with relative ease!!

anyway, i'm so psyched for this, though the high framerate is nice, but a bit overboard, with my "middle" class gaming computer (laptop) running at an average 600 fps in a fire fight.

your eyes can't even see that fast!
i'm not saying that this is a bad thing, but couldn't the game devote more processing power to other aspects, or is the fps solely dependent on the graphics card?
Report to moderator   Logged

I can make good ship rotations, with anti-aliasing!
PM me!

Working on a good SW mod, with the real sounds!
NiteHawk
<dev></dev>
Administrator
Legendary Member
*****
Posts: 2816



WWW
« Reply #14 on: October 21, 2010, 06:54:59 AM »

Gimp would work too Tongue

FPS is dependent mainly on the graphics card, and partially the CPU. I still need to fix a few things to increase it better, but it used to run at 30-60FPS at 1.4, because it would render everything every time, was pretty bad. I worked on it a bunch, and DX helped with the rest. It is ALOT better now then it was.  (In firefights stuff FPS goes down pretty fast, still working on balancing it)

You no matter what need more then 64FPS to play right now, though can figure out about adjusting this in the future, right now that's what it is set.

The game WILL use more GPU in the future, but designing the pretty fireworks and other things takes alot of time. The game 'can run at 600FPS' its stating really, but its only running at 64FPS maximum. Games that don't limit FPS heat up GPU to the point of shutdown. Minecraft for example, does this until you enable the FPS LIMITER.  But SF is locked at 64 right now. It's just stating really what it 'can' do in a simple term.

The more we add things, the more it will drop, automatically, pretty much.
Report to moderator   Logged

http://chrisvall.com - Coding/gaming blog in the works.
Pages: [1] 2 3
  Send this topic  |  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.12 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!