Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [T1] Additive Blending of Sprites?

Author
Message
Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 10th Mar 2014 11:11
Hey all,

I need (really want) to use additive blending of my sprites to give them a sort of glowing effect when lots are overlapping (they're particles). How would I go about achieving this in tier 1 AppGameKit? Also, I'd appreciate any advice on making it efficient enough for mobiles.

Thanks for any help you can give

Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 10th Mar 2014 12:18 Edited at: 10th Mar 2014 12:20
maybe with a blurry white image overlay with alpha value.
if particels at same place more alpha value of white overlay.

AGK 108 (B)19 : Windows 8.1 Pro 64 Bit : AMD Radeon HD 6670
Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 10th Mar 2014 12:53
Quote: "maybe with a blurry white image overlay with alpha value.
if particels at same place more alpha value of white overlay."


Not quite sure what you mean by that. Besides, I don't so much want a bloom effect as just an increase in brightness where the particles overlap. And to be clear, they are normal sprites, not particles per the particle system.

Thanks for the idea though, I may get something out it

unlikely
12
Years of Service
User Offline
Joined: 5th Mar 2012
Location: Ohio, USA
Posted: 10th Mar 2014 23:11
AGKV2 has additive blending built in... Otherwise you are probably going to have to settle for manually adjusting alpha particle values when they are overlapping, or some such trick.
Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 11th Mar 2014 00:48
Quote: "AGKV2 has additive blending built in... Otherwise you are probably going to have to settle for manually adjusting alpha particle values when they are overlapping, or some such trick."


Unfortunately I have 2000 particles and I don't really want to have to go through every particle for each particle (2000*2000). I do, however, have a clever idea involving a grid of "light values" which will fade over time. As each particle enters the (probably half-res) grid, they add a small amount to the light in that grid block. Each particle in that block gets a brighter colour according to the light. Hopefully I can manage from this

Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 11th Mar 2014 04:05
If your particle image is semi-transparent (like 50% alpha) then wouldn't they kind of have this effect automatically anyway?

Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 12th Mar 2014 00:21
That's what I would have thought, but it doesn't quite work. They do get brighter as they overlap, but only as bright as they would be with full opacity. I need them to get brighter until they're sort of white.

Login to post a reply

Server time is: 2024-05-02 17:58:08
Your offset time is: 2024-05-02 17:58:08