Jump to content
  • Advertisement
Sign in to follow this  

How do I get a les flare like in EVE?

This topic is 4709 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!