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.
Page Index Toggle Pages: 1
lens flare (Read 2714 times)
lens flare
Aug 30th, 2009, 11:52pm
 
Hello im new here and i startet to explore processing today.
i want to know how to make lens flare, it's better to give me some codes.
Thx in advance Smiley
Re: lens flare
Reply #1 - Aug 31st, 2009, 2:33am
 
I would say there is no easy way or code we can just hand you.

The best would be, and thats an easy one, to just use a transparent image of an lensflare. You can easily create one using Photoshop. http://www.gamedev.net/reference/articles/lensflare/lens-flare-tut-shot1.jpg
if you have an moving light source or camera, maybe you can split the lensflare into the different rings and move them according to the camera. in this case maybe a different blend mode will get better effects then just transparency.

Re: lens flare
Reply #2 - Sep 1st, 2009, 7:04pm
 
any way thank u!
Re: lens flare
Reply #3 - Sep 2nd, 2009, 9:33am
 
give me your email and ill send you an example.
Re: lens flare
Reply #4 - Sep 2nd, 2009, 9:39am
 
i would be interested too how you would solve this problem...
Re: lens flare
Reply #5 - Sep 2nd, 2009, 1:19pm
 
ok my server had some problems but its back online. so here it is:

http://www.pixelnerve.com/downloads/processing/ss_lensflares.zip

you will need vitamin that is available in the package.

the technique is pretty simple and is based on that gamedev.net article. its lensflares in screen space.

if you are interested in a pure processing version it should be easy for you to port.
Re: lens flare
Reply #6 - Sep 2nd, 2009, 8:13pm
 
V: for me, the most interesting thing about your sketch is that it is grabbing the mouse and returning it to the center location!  How are you doing that?  -- Ben
Re: lens flare
Reply #7 - Sep 2nd, 2009, 11:11pm
 
V wrote on Sep 2nd, 2009, 9:33am:
give me your email and ill send you an example.

This is my email:laszlo_sun@yahoo.com
Thanks a lot!
Re: lens flare
Reply #8 - Sep 2nd, 2009, 11:15pm
 
he uploaded the file above
Re: lens flare
Reply #9 - Sep 3rd, 2009, 1:55am
 
thanks ben. uses AWT Robot's mouseMove.
http://java.sun.com/j2se/1.5.0/docs/api/java/awt/Robot.html

have fun
Page Index Toggle Pages: 1