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 / Blend modes with objects

Author
Message
wargasmic
18
Years of Service
User Offline
Joined: 15th Oct 2006
Location: UK
Posted: 28th Mar 2013 00:36
Is it possible to use blend modes such as additive on objects or does this require a fullscreen shader like the glow effect?
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 28th Mar 2013 08:19
you mean this?

SetObjectTransparency
Description
Sets the transparency mode for this object, 0 is opaque, 1 is alpha blended, 2 is additive blended. Using a transprency mode greater than 0 unnecessarily will slow down rendering.

wargasmic
18
Years of Service
User Offline
Joined: 15th Oct 2006
Location: UK
Posted: 28th Mar 2013 17:12
I'm after an effect like in this image http://2.bp.blogspot.com/_FHWVwXZaDOM/TRlTkNNW92I/AAAAAAAAAW8/qQrCdef98R4/s1600/gw2_noChance.jpgwhere the enemies all clump together and overlap an additive blendmode gives the impression of a white glow in the center. Setting transparency to 2 doesn't give this effect, in fact it looks exactly the same as having it set to 1.
xCept
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 28th Mar 2013 19:40
Unfortunately AppGameKit doesn't support true blend modes yet; that would be an excellent addition and one that I would use frequently including in one WIP app.
lilpissywilly
AGK Developer
14
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 28th Mar 2013 19:50 Edited at: 28th Mar 2013 19:52
If the objects are small-ish and you aren't changing the perspective (looks like the example is Geometry Wars or something?) then you could perhaps fake it by setting objectcolor when objects overlap depending on viewpoint? Yes it would look weird if the objects were big

Or you could use a point light with a color above 255, 255, 255 at a point of congregation. I found this effect of the point light when I accidentally set the point light color to waaay higher than 255 heh

My hovercraft is full of eels
wargasmic
18
Years of Service
User Offline
Joined: 15th Oct 2006
Location: UK
Posted: 28th Mar 2013 20:55
Yes it is a screenshot of geometry wars 2.

I'm making a game heavily inspired by it.

I did think of using the point light approach but I'm not using lighting at all in my game plus it wouldn't look as natural as it would be a perfect sphere of light.

However I have suddenly thought of another method since all enemies track each other I'm going to try adding a white glow over the top of each one that varies in brightness depending on how many enemies are nearby.
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 28th Mar 2013 21:09
Can you not just use semi-transparent textures. When they overlap the brightness should bleed into each other? Then you could apply a bloom shader to the screen to increase the effect maybe?

I live for video games! (And beers, and football, and cars!)
See what I live for here: [url]http:\\www.TeamDefiant.co.uk[/url]
wargasmic
18
Years of Service
User Offline
Joined: 15th Oct 2006
Location: UK
Posted: 28th Mar 2013 21:55
I'm already using semi-transparent textures. When they overlap they just form a solid blob of their actual colour.

As for a bloom shader, apparently agk doesn't support fullscreen shaders yet.
wargasmic
18
Years of Service
User Offline
Joined: 15th Oct 2006
Location: UK
Posted: 28th Mar 2013 21:58 Edited at: 28th Mar 2013 22:03
My idea works but unfortunately calling SetObjectColor so often is really slow

Edit: Scratch that, there was something else causing the slow down
wargasmic
18
Years of Service
User Offline
Joined: 15th Oct 2006
Location: UK
Posted: 28th Mar 2013 22:29
Quick test. Will tweak it some more but you get the idea.

lilpissywilly
AGK Developer
14
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 28th Mar 2013 23:38
Looks cool!

My hovercraft is full of eels
wargasmic
18
Years of Service
User Offline
Joined: 15th Oct 2006
Location: UK
Posted: 29th Mar 2013 03:36
Really need proper blend modes.

Paul i'll give you 50 quid if you make it happen now
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 29th Mar 2013 23:32
^^ LOL

(even bigger LOL as I couldn't post the above) - "turn capslock off"

wargasmic
18
Years of Service
User Offline
Joined: 15th Oct 2006
Location: UK
Posted: 30th Mar 2013 00:04
No joking, I was being serious. Anyone wanna chip 50 quid in for blend modes (and full screen shaders)?.....see what paul says
xCept
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 30th Mar 2013 00:28
^ I'll totally chip in money for sprite-based blend modes
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 30th Mar 2013 00:42
Carefull, you'll set a new precident

wargasmic
18
Years of Service
User Offline
Joined: 15th Oct 2006
Location: UK
Posted: 30th Mar 2013 02:44 Edited at: 30th Mar 2013 02:44
Quote: "Carefull, you'll set a new precident"


Lol, paid upgrades...nooooooooo.

Just want to tempt the agk devs to make the stuff we want first
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 30th Mar 2013 02:50
Hell, I'd chip in for something as basic as set sound pitch

wargasmic
18
Years of Service
User Offline
Joined: 15th Oct 2006
Location: UK
Posted: 30th Mar 2013 02:55
I want that too!!

Login to post a reply

Server time is: 2024-11-24 09:51:27
Your offset time is: 2024-11-24 09:51:27