RE: [Algorithms] Lens Flare
Brought to you by:
vexxed72
From: Paul J. <Paul@Stainless.co.uk> - 2000-12-05 16:50:08
|
1) Get a screen coordinate for where your 'sun' is (can be negative for off the sides) 2) Get a distance in real-world space that you can use for some scaling information 3) Make an imaginary line from the center of the screen to this chosen X/Y coord 4) Draw some lensflares along this line, spaced arbitrarily according to your scale -----Original Message----- From: Johnny Widerlund [mailto:joh...@op...] Sent: 05 December 2000 15:23 To: gda...@li... Subject: [Algorithms] Lens Flare I was watching a movie the other day, and saw the lens flare phenomena. Recalled that some games I'd seen have had the same thing Later I thought that it could be a nice feature in my renderer engine. My initial thought was just to check if there is a clean path between the 'eye' and a light source (i.e. nothing between them). And then use a transparent billboard (or a plane) with a lensflare texture mapped on it. But then I watched the movie again, and saw that the flare changes with the angle between eye and lightsource. And I don't really know how that function works. One thought was to always have the lensflare texture perpendicular to the light source ray (the one reaching the eye) and when the eye looks away from the lightsource, the texture get narrowed by the cameras fov function. But I don't think that would work very well, so therefore I ask you guys what your experience with lensflare is. I do not even know why the phenomena exist (I guess it is reflections between the lenses, but that is pure guesses), nor how it really works. Is there any web page that explains this? I don't need the exactly correct physical model, just something that looks fairly good and not taking to much computing power. How is it done in the today games? Cheers, /Johnny _______________________________________________ GDAlgorithms-list mailing list GDA...@li... http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list |