We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOpenGL and 3D Libraries › how do i make neon fx
Pages: 1 2 
how do i make neon fx (Read 7879 times)
how do i make neon fx
Jan 4th, 2010, 12:39pm
 
Hi guys, i know my question may be overkill, but i tried so many times to understand how to make the fx shown at 01:35 in this video
http://vimeo.com/6644720

I just want to know how to make the glowing purple animations ...
I understand how to make polygon tails like shown in source_particle (from Flight404), but this is not exactly the same thing.

Do you have any source or ideas how to make it.

Thanks and sry for my english  Wink

°ignivome
Re: how do i make neon fx
Reply #1 - Jan 4th, 2010, 2:09pm
 
not quite sure how he made it, but such glowing effekts could be achieved by using OPENGL blend modes :
http://www.flight404.com/blog/?p=71
http://www.flight404.com/blog/?p=72

Re: how do i make neon fx
Reply #2 - Jan 4th, 2010, 11:31pm
 
Very usefull, thanks.
I'll take a look at it for sure; flight 404 is always a good source Smiley

Anyone else can help this topic?

Thanks guys  Cheesy
Re: how do i make neon fx
Reply #3 - Jan 5th, 2010, 1:49am
 
those are nothing more than a sprite texture of some shape with additive blending moving along a path.

since the sprite geometry overlaps the color gets added to the framebuffer and produces such results



for additive blend

glBlendFunc( GL_SRC_ALPHA, GL_ONE );  //this will be based on the the alpha value of the incoming color (the color you pass to GL )

or

glBlendFunc( GL_ONE, GL_ONE );  // this will take use color

also make sure you disable depth writing. luckily, additive blending doesn't need sorting.

glDepthWrite( false );
Re: how do i make neon fx
Reply #4 - Jan 11th, 2010, 12:27am
 
Hi, thanks V for the tip Smiley.
I still need another information about the topic...

here is what i'd like to get in OPENGL.

...

lets say i have some wireframes (i.e.: vertex)
I need them to glow.

The only way I see we can get to it is to have a .png file that contains a line with a glow, and then we place that image for each sides of the form. I guess i could do it like that ... but the thing is, i'm pretty sure the result won't look like the image; the corners wouldnt be at the same brightness because of the blend.

So is there a way to make a wire glowing (i guess not) but at least a trick?

thanks again
Re: how do i make neon fx
Reply #5 - Jan 11th, 2010, 1:59am
 
you will need to use offscreen rendering.

render scene to an offscreen buffer of about 1/4th of the the screen size and apply a blur to it. you could use downsampling/upsampling to achieve a blur for free using bilinear filtering.

then just render your scene normally and render a fullscreen rectangle with the blurred image on top with additive blend turned on.

for processing i believe glgraphics library would do it. i haven't tried the lib but i know lots of people use it

Re: how do i make neon fx
Reply #6 - Jan 25th, 2010, 10:51pm
 
Hi there,
I decided to make my neon fx with texture blending.
Here is what i get for now
http://www.ignivome.com/divers/glow_test.zip

It's working fine but I would like to make my texture facing the camera continiusly, and its not square! Wink

I tried to use the code here
Back to top
 
 
Re: how do i make neon fx
Reply #7 - Jan 27th, 2010, 7:41am
 
i would go with a different approach.

render your scene into a texture, blur it and then bind it to a full-screen aligned quad.
that should make it simple for you and much more appealing.

as on how to do it. look into glgraphics.. it seems like the perfect lib for you to use.
i think that library includes some blur/gaussian and gloom examples. check it out.

have fun.
Re: how do i make neon fx
Reply #8 - Jan 27th, 2010, 10:40pm
 
Thanks V for the reply, very appreciated!
I took a look at the ac's lib (glGraphics) and i found out something very interesting about blooming fx on an OFFSCREEN buffer. The only thing though is that it only works for processing's basic shapes (like rect or ellipse).

the explanation seem to be that opengl commands are rendered by your graphic card, so processing cannot buffer what it doesnt control..... or something like that.

i searched a day long about opengl offscreen buffering, it seems to exist but not quite easy to implement in processing..

just dunt know what to do now  Embarrassed
Re: how do i make neon fx
Reply #9 - Jan 28th, 2010, 2:36am
 
here's an example on how to do it.
It uses my own framework, so you will depend on it. Dont worry it's a good thing
www.pixelnerve.com/downloads/NeonEffect.zip

inside the zip there is a folder called vitamin. copy it to processing libraries and just run the example.


For more on Vitamin: http://www.pixelnerve.com/processing/libraries/vitamin/


on technical side: it does exactly what i told you to do.
render scene to texture, apply a gaussian filter to that texture and render it on a fullscreen quad as a post process effect.
the blur is done is 2 passes and a third to upscale that blurred texture.

have fun.
Re: how do i make neon fx
Reply #10 - Jan 28th, 2010, 7:19am
 
I get this error when I run the example (have Vitamin installed):

Quote:
Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError: /Applications/Processing.app/Contents/Resources/Java/libraries/opengl/library/li
bjogl_cg.jnilib:  Library not loaded: @executable_path/../Frameworks/Cg.framework/Cg   Referenced from: /Applications/Processing.app/Contents/Resources/Java/libraries/opengl/library/li
bjogl_cg.jnilib   Reason: image not found
Re: how do i make neon fx
Reply #11 - Jan 28th, 2010, 8:12am
 
Ah yes. You need Cg toolkit installed.

http://developer.nvidia.com/object/cg_toolkit.html


EDIT: btw i've updated the zip file.
Re: how do i make neon fx
Reply #12 - Jan 28th, 2010, 4:51pm
 
Thanks V, it works PERFECTLY.

btw, form now on, if I use ur lib, I cannot use openGL commands. Tell me I'm wrong lol


thanks again Smiley
Re: how do i make neon fx
Reply #13 - Jan 29th, 2010, 2:18am
 
You're wrong =)

Vitamin works directly with JOGL. All it needs is a GL object, which is given by Processing on the VGL object creation. It also works without Processing. Look into VApplication.

to access the GL object use gl() getter. that's it.

void draw()
{
  // render with processing here

 vgl.begin();
 // render with Vitamin here
 GL gl = vgl.gl(); // get reference if you wish to use it directly
 
 vgl.end();

 // you could render with processing here aswell
}

There are alot of easy to use methods in Vitamin (alot like the processing syntax). Look into the Javadocs it shouldn't be hard to get you started.

Have fun.
Re: how do i make neon fx
Reply #14 - Jan 29th, 2010, 4:25am
 
V, what are the advantages of using vitamin over the OpenGL in processing, or using the OpenGL of GLGraphics?  The description on the site doesn't really explain why you would use it.  Doesn't Processing already use JOGL?
Pages: 1 2