• Advertisement

Archived

This topic is now archived and is closed to further replies.

Lightrays (like in a room with fog)

This topic is 5281 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

Hi! Can anyone help me with a tip, code, link or anything else on how to develope somekind of lightray-effect? What I''m looking is more or less just like the effect Savage are using. Check out the link "http://savage.planet-d.net/" The problem is that I just can''t find anything on how to create it... :-( I really hope you can help me! Thanks!

Share this post


Link to post
Share on other sites
Advertisement
Take a smoke like texture and put it on a ploygon. Enable blending, make the texture modulate onto the polygon. Like so:

glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);

This blends the polygon color and alpha with the texutre color and alpha. Make the ends of the polygon that are close to you have 0 alpha and the farthest ends have opague alpha.

Share this post


Link to post
Share on other sites
I got this old post, very old post. I was searchin for lightrays and found it. Could anyone explain me better?

Share this post


Link to post
Share on other sites
What i do is render a volume to the stencil buffer after rendering everything else, this clips the volume so that you dont render where you dont want it (like in volume-shadows).

I then render a semi-transparent quad over the entire screen where the stencil buffer has been set.

Share this post


Link to post
Share on other sites

  • Advertisement