Page 1 of 1

GRADUAL_FADE, PARTIAL_FADE

Posted: 13 Jun 2007, 05:00
by Argh
I'd like a two new visual effects, invokable via COB: GRADUAL_FADE and PARTIAL_FADE

Invoking this command(syntax: SET GRADUAL_FADE (Piece , Time); ) would cause the Piece to be redrawn with a different alpha value (like a hidden unit) until it reached the value of Time, then it would disappear.

PARTIAL_FADE (syntax: SET PARTIAL_FADE (Piece, Time); ) would allow us to set an alpha value on a given Piece.

With two very similar pieces of code, hooking into the alpha system already in place (although it's borked for S3O, as I need to report, again), we could have:

1. Motion-blurs.
2. Windows.
3. Objects that fade out upon Death()
4. Better-looking blended animations that use hide / show techniques.

I think it'd be very cool, and solve a bunch of problems at once- no new rendering code needed, other than applying the current alpha code per Piece (which it almost certainly does anyhow), and it'd allow for a lot of things that aren't currently possible.

Re: GRADUAL_FADE, PARTIAL_FADE

Posted: 13 Jun 2007, 05:13
by Peet
Argh wrote:(although it's borked for S3O, as I need to report, again)
Even with flozi's patch?

Posted: 13 Jun 2007, 06:15
by trepan
The next lua addition should make that feature (and many more), possible.
The current code does not adjust the alpha per piece, it seems to be set at
0.3 for the lot of them.

Posted: 13 Jun 2007, 06:45
by Argh
:!: :shock: :!:

One question. It's about the only thing that matters (er, at least to me and the people I am working with), here: will what you're saying, and the profound implications, be relevant in a mod that is still using S3O as the primary content format?

Posted: 13 Jun 2007, 08:05
by trepan
yes

Posted: 13 Jun 2007, 12:03
by FLOZi
Your code violates the BOS set syntax. However, you could use get instead. However, it's probably a bit beyond me to code and trepan can LUA it up anyway. :P

Posted: 13 Jun 2007, 18:25
by Argh
You do realize that making me learn GLSL, on top of everything else, is likely to make my head explode? Which might be cool, for whoever got to witness it, but, meh, me neurons are at their limits, captain! I cannah make them go any faster!

Posted: 13 Jun 2007, 18:29
by Neddie
Well, you may be able to delegate that section of the engine to another person. I know I'm not willing to tackle LUA.

Posted: 13 Jun 2007, 18:38
by Argh
I'll do whatever is required. I'm just human, is all.