Halo-Effect in 3D OpenGL ES
Hey guys,
I wanna polisch my game a bit and i'm looking for a lightsaber-like effect.
I know I can do that easyly in 2D using a RGBA-texture.
But what about 3D?
Has anyone done something like that?
I mean just adding a slightly bigger Object around your glowing one, whose color has alpha<1 would probably look cheap.
Adding more then 1 glow-object with decreasing alpha would introduce a lot more vertices even when the object itself is just cylindrical or spherical.
I wanna polisch my game a bit and i'm looking for a lightsaber-like effect.
I know I can do that easyly in 2D using a RGBA-texture.
But what about 3D?
Has anyone done something like that?
I mean just adding a slightly bigger Object around your glowing one, whose color has alpha<1 would probably look cheap.
Adding more then 1 glow-object with decreasing alpha would introduce a lot more vertices even when the object itself is just cylindrical or spherical.
I would render the lightsaber geometry in the glow color into a cleared all-black fbo. Then I'd blur that FBO, then blit it back on top of the scene additively. I did this recently (http://shamyl.zakariya.net/screenshots/S...-22-02.png) to draw debug overlays for physics.
That being said, I don't know what kind of shaders are available on iphone. If at all.
If shaders aren't available, you could probably fake blur by drawing the fbo on top of the scene several times, jittered. Say 16 times with the alpha decreasing by distance of the jitter.
That being said, I don't know what kind of shaders are available on iphone. If at all.
If shaders aren't available, you could probably fake blur by drawing the fbo on top of the scene several times, jittered. Say 16 times with the alpha decreasing by distance of the jitter.
A pretty cheap and effective way to do it without shaders is to just blend a bunch of planes around it. Lots of older games did this and it looks quite good.
Good looking glowing light pulse thing:
![[Image: Shot00002.jpg]](http://files.slembcke.net/temp/Shot00002.jpg)
If you intersect the camera with it, you can see how it's done.
![[Image: Shot00003.jpg]](http://files.slembcke.net/temp/Shot00003.jpg)
It looks pretty good even at fairly steep angles too.
Good looking glowing light pulse thing:
![[Image: Shot00002.jpg]](http://files.slembcke.net/temp/Shot00002.jpg)
If you intersect the camera with it, you can see how it's done.
![[Image: Shot00003.jpg]](http://files.slembcke.net/temp/Shot00003.jpg)
It looks pretty good even at fairly steep angles too.
Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Thanks guys, the idea to overlay several planes with different angles sounds promising. I'm going to try this and post a screenshot here when I'm finished.
Just a warning, it's very easy to hit the fillrate limit of the pre-3GS mobile devices doing this sort of thing (especially if you try to run processing passes on auxiliary buffers). The 3GS has power to spare if that's all you're targeting, though.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Using blending for a text fading effect. | cjcaufield | 2 | 3,493 |
Jun 30, 2010 08:21 PM Last Post: cjcaufield |
|
| How to do a Quick, Dirty bloom effect FAST! | Oddity007 | 12 | 6,934 |
May 9, 2009 09:42 AM Last Post: aardvarc |
|
| malloc particle effect (glDrawArray) | Graphic Ace | 1 | 2,681 |
Mar 15, 2009 03:13 PM Last Post: maximile |
|
| Turning Page Effect with OpenGl | ReSuMa | 3 | 4,668 |
May 12, 2007 05:57 AM Last Post: ReSuMa |
|
| epicenter effect | progressdll | 3 | 3,749 |
May 8, 2007 05:11 PM Last Post: kelvin |
|

