How do I get a les flare like in EVE?
Greetings,
I recently tested out EVE Online to see how they implemented the graphics. I noticed that the lens flare is beautifully done. The main part that makes it so cool is that when a ship blocks it, it gradually gets smaller, it doesn't cut out immediately.
So my question is, how do I work the ray testing to find out how deep the intersection with an object goes, to see how small the solor flare should be.
Here's an example of what I'm talking about.
Humus did a demo called "Soft Coronas" which uses occlusion queries.
http://www.humus.ca/index.php?page=3D&ID=27
It's a start, at least.
http://www.humus.ca/index.php?page=3D&ID=27
It's a start, at least.
gluProject gives really nice results even through alpha tested tree leaves\brances, etc. It looks like that is what they are doing here. Look at Nehe's lens flare tutorial for a full rundown.
J
J
There's a few things you can do... The easiest is to make the lens flare fade over several frames instead of just "turning off" when it gets hidden. Basically each light source would keep track of its lens flare brightness.. If occluded, reduce brightness by some amount each frame. This alone can look pretty good.
Another, slightly more expensive way is to use more than one ray from the camera to the light source. Spread the "samples" over the image of the sun, and base the brightness of the flare on how many rays reach the light. Something like a sun isn't a single point so this is more realistic and looks good even if the motion is slow (like a sunrise).
Another, slightly more expensive way is to use more than one ray from the camera to the light source. Spread the "samples" over the image of the sun, and base the brightness of the flare on how many rays reach the light. Something like a sun isn't a single point so this is more realistic and looks good even if the motion is slow (like a sunrise).
Don't have much experience with occlusion tests, but casting a ray through your object set to the source and finding the nearest object to the ray and reducing the radius of the light-source with that should be quite effective.
(OT)
Isn't EVE gorgeous? I've played it for 2.5 years now, and it never ceases to impress me.
(OT)
Isn't EVE gorgeous? I've played it for 2.5 years now, and it never ceases to impress me.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement