View Full Version : underwater lightshafts
02-24-2007, 02:59 AM
anyone know of a way to do underwater lightshafts (god rays) on a bumpmapped water surface...
02-24-2007, 08:18 AM
How about a bunch of additive billboards for the god-rays, and... uhm... bumpmapping for the bumpmapped water surface? :D
02-24-2007, 09:40 AM
sounds like an idea... but how should i do the billboards? should i have several long triangles into the water and then set some texture on them... how do i get some good movement on them? should i use some kind of radial blur?
How about just trying it out?
02-24-2007, 01:57 PM
How about a more constructive comment?
Originally posted by Dragon89:
but how should i do the billboards? should i have several long triangles into the water and then set some texture on them... how do i get some good movement on them? should i use some kind of radial blur? You should try textured, axis aligned billboards. Here's a link with more info + some code:
Use alpha transparancy to fade out the rays when the viewer gets to close to the line segment, or the viewing direction is almost parallel to the line.
Another method is by placing several, ~50% overlapping, view aligned billboards (or particles) along the rays path (make the billboards fainter as they go deeper. Also use transparancy to fade out the billboards when you get to close.
With this method you will also see the ray when the viewer is in the light's path. I saw this in Call of Duty (light thru church window effect) and it worked surprisingly well.
As for animation, use a sine wave to dim and brighten the color alpha over time (different, unique phase for each ray). If the surface of the water is moving, just translate the entire ray vertically.
02-25-2007, 12:33 AM
thx.. ill try that
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.