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 › Glow/Blur/Bitmap flash-like filters ?
Page Index Toggle Pages: 1
Glow/Blur/Bitmap flash-like filters ?? (Read 1733 times)
Glow/Blur/Bitmap flash-like filters ??
Jan 14th, 2010, 11:39am
 
Hi everyone,

I´m just getting started on processing but i´ve been using flash 6 years ago ,  something i would like to do in processing is to create flash-like filters like Glow/Blur over a ellipse for instance.

I´ve taked a  look to the texture function but that´s all.

If anyone could put me in the right direction to start looking more about this topic i´d really appreciate it.

Thanks. :)
Re: Glow/Blur/Bitmap flash-like filters ??
Reply #1 - Jan 14th, 2010, 3:51pm
 
filters in processing: http://processing.org/reference/filter_.html
Re: Glow/Blur/Bitmap flash-like filters ??
Reply #2 - Jan 14th, 2010, 5:54pm
 
Hey V,

Just a couples minutes ago i found that reference, what i´m trying to do it`s put some texture on my particle.

for example having ...

Class Particle{

void render()
{
pushMatrix();
translate(vector.x,vector.y,vector.z);
ellipse(vector.x,vector.y,r,r);
popMatrix();
}
}


how could i use a image texture / (blur-glow)-like effect for the drawing of my particle?


Thanks
Re: Glow/Blur/Bitmap flash-like filters ??
Reply #3 - Jan 15th, 2010, 1:38am
 
first load a texture

PImage tex = loadImage( "yourimage.png" );


then use beginShape/endShape

textureMode( NORMALIZED );  // use normalized texcoords meaning [0..1]

fill( 255);
tint( 255 );
float s = 5; // side size of the quad
beginShape( QUADS );
texture( tex );
vertex( -s, -s, 0, 0 );
vertex(  s, -s, 1, 0 );
vertex(  s,  s, 1, 1 );
vertex( -s,  s, 0, 1 );
endShape();


ref:
http://processing.org/reference/beginShape_.html
http://processing.org/reference/texture_.html



for filters apply them to the textures as you please, and you will also need to apply translations. as you were doing already. this quad here if rendered with its pivot point as the center
Re: Glow/Blur/Bitmap flash-like filters ??
Reply #4 - Jan 15th, 2010, 10:25am
 
Thank you  Smiley just what i need.
Page Index Toggle Pages: 1