Sign in to follow this  
DirectXFreak

How do I get a les flare like in EVE?

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this