Lens Flares: Claculating and rendering.
by Paul Robertson · in Technical Issues · 09/09/2001 (5:35 pm) · 6 replies
I was wondering exactly how are lens flares calculated. I know it has something to do with the angle of the light source in relationship to the direction the camera\player's view is facing, but what's the math involved? Also, how are they displayed? Is it a 2d system of over-lays or what?
I'm also looking for info regarding light-source glare.
Thanks in advance for any help.
I'm also looking for info regarding light-source glare.
Thanks in advance for any help.
#2
Although they are meant to create a realistic feel to the game they often tend to do the opposite.
Lenzflare is the result of a light source passing through multibel lenzes of a camera, the curve and thichness of each lenz giving each lenz a different shape and color. These could be round or 5- or 6-sided etc....
If manufatores of lenzes could get rid of these "realistic" lenzflares they would.
The human eye on the other hand don't have this flaw and do NOT have lenzflares.
SO if you are making a FPS where you look through the persons eyes, lenzflares will NOT be realistic at all.
If you however made a racing game and added lenzflare to the replay option making it look like camera footage it would look realistic.
My point is that Lenzflare is only something we see on television and in movies and are instantly recognizable which will make most people think "Wow, this game is so realistic" when infact it isn't.
But we do not see them in real life.
It's kinda sad that people think movies are more realistic that real life.
// Clocks out.
09/10/2001 (1:18 am)
One thing to remember with Lenzflare is this.Although they are meant to create a realistic feel to the game they often tend to do the opposite.
Lenzflare is the result of a light source passing through multibel lenzes of a camera, the curve and thichness of each lenz giving each lenz a different shape and color. These could be round or 5- or 6-sided etc....
If manufatores of lenzes could get rid of these "realistic" lenzflares they would.
The human eye on the other hand don't have this flaw and do NOT have lenzflares.
SO if you are making a FPS where you look through the persons eyes, lenzflares will NOT be realistic at all.
If you however made a racing game and added lenzflare to the replay option making it look like camera footage it would look realistic.
My point is that Lenzflare is only something we see on television and in movies and are instantly recognizable which will make most people think "Wow, this game is so realistic" when infact it isn't.
But we do not see them in real life.
It's kinda sad that people think movies are more realistic that real life.
// Clocks out.
#3
Those are things I've already considered Karsten. They're good points though. I'm not sure to what extent we'll impliment lens flares for our first game yet.
09/10/2001 (2:48 am)
Thanks for the info Pat, that's exactly what I was needing to know.Those are things I've already considered Karsten. They're good points though. I'm not sure to what extent we'll impliment lens flares for our first game yet.
#4
They're easy to add really, and they look good. What other reason is there to put stuff in video games? =)
-nohbdy
09/10/2001 (2:12 pm)
Even though lens flares is an artifact of lenses and doesn't happen with normal human vision, you have to take into account the fact that we're all (well, probably all of us) are looking through a monitor to read this board/play games/etc etc... So in a way it's like you're viewing the world through a lens (why else would there be so many invisible cameras in games ;p) Plus a lot of people actually like the way lens flares work and can inspire a sense of awe in your scene (like a lens flare when the sun peeks out from behind a dark planet in space, a lens flare would be perfect). If you're going for a realistic reason, a lens flare could be used to simulate pupil dialation almost. If you sit in a pitch black room for a few minutes then go out into the sun, everything will seem brighter because your eyes are letting in more light. The lens flare would be the extra brightness... you could make it fade to pure alpha if you wanted to over time. They're easy to add really, and they look good. What other reason is there to put stuff in video games? =)
-nohbdy
#5
That's actually why I was asking about glare (thanks again Pat! You saved me some headaches :). My own personal plans are to use lens flares only in "from the camera" scenes. Glare will apply to both player POV and camera POV though.
My plan may get thrown out in favor of "popular opinion" once our first demo hits the testing crew though. I may just take the time to make it a menu controlable option :)
09/10/2001 (3:29 pm)
"If you sit in a pitch black room for a few minutes then go out into the sun, everything will seem brighter because your eyes are letting in more light. The lens flare would be the extra brightness... you could make it fade to pure alpha if you wanted to over time."That's actually why I was asking about glare (thanks again Pat! You saved me some headaches :). My own personal plans are to use lens flares only in "from the camera" scenes. Glare will apply to both player POV and camera POV though.
My plan may get thrown out in favor of "popular opinion" once our first demo hits the testing crew though. I may just take the time to make it a menu controlable option :)
#6
09/10/2001 (4:24 pm)
If you put it in, just make it easy to disable it =)
Torque 3D Owner Pat Wilson
(It's kind of late, and I'm supposed to be typing a lit paper, so if that didn't make sense, I'll try to elaborate)