Re: volumetric spotlight

"David Neubelt" <[email protected]>
Newsgroups gmane.games.devel.algorithms
Message-ID <[email protected]>
Hi Jeff,

 

Just shooting off an idea that may be useful,

 

I'd imagine you could render the front facing polygons and then the back
facing polygons with depth testing on.  That difference in depth of the
two distance the light travels through the cone at that point. You could
then use that information to calculate how much light scattering has
occurred.

 

-= Dave

 

From: Jeff Russell [mailto:[email protected]] 
Sent: Wednesday, March 24, 2010 12:53 PM
To: Game Development Algorithms
Subject: Re: [Algorithms] volumetric spotlight

 

That third option is kind of what I'm leaning toward - ray tests vs a
cone are mathematically simple, so that combined with a screen depth
lookup (already available) I'm hoping to be able to swing something cool
today.

Jeff

On Wed, Mar 24, 2010 at 2:19 PM, Darren Grant
<[email protected]> wrote:

I don't have references but here are a few techniques in increasing
complexity:

For viewers at a distance it is hard to beat the simplicity of billboard
sprites. Just lock a billboard to the spotlight cone axis and use alpha
blending to make the texture glow. Fade it out when the viewer gets
close enough to make the effect cheesy.

Create an umbra mesh, a skirt that resembles the spot cone and fix it to
the spotlight in space. Simple vertex coloring to fade the skirt at the
far end can be very effective. Again render using alpha blending. Some
simple pixel shader work using normal averaging and dot product can help
to hide the edges of the mesh. If you have access to the depth buffer
values, you can also fade out pixels that approach the near plane so
they don't clip noticeably as the viewer passes through the cone.

The most complex approach is to write a ray-casting shader that
integrates over distance travelled by each eye ray through the umbra
volume. It is hard to get the results to overlap and intersect correctly
with the rest of the scene unless you have some sort of unified
rendering architecture built around ray-casting. Very pretty if you get
it working, but very difficult to deploy without limitations coming back
to get you later.


Cheers,
Darren






At 09:24 AM 3/24/2010, Jeff Russell wrote:

	Hey, anybody have any cool reference for how to render a
volumetric spotlight effect? I realize that full correct shadowing with
volumetric lighting might be kind of heavy duty, so I'm willing to try
something a little dirtier or with no shadows.
	
	Regards,
	
	Jeff
	
	
	-- 
	Jeff Russell
	Engineer, 8monkey Labs
	www.8monkeylabs.com

	
------------------------------------------------------------------------
------
	Download Intel&#174; Parallel Studio Eval
	Try the new software tools for yourself. Speed compiling, find
bugs
	proactively, and fine-tune applications for parallel
performance.
	See why Intel Parallel Studio got high marks during beta.
	http://p.sf.net/sfu/intel-sw-dev
	_______________________________________________
	GDAlgorithms-list mailing list
	[email protected]
	https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list
	Archives:
	
http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-lis
t 


------------------------------------------------------------------------
------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
GDAlgorithms-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-lis
t




-- 
Jeff Russell
Engineer, 8monkey Labs
www.8monkeylabs.com

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev

_______________________________________________
GDAlgorithms-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.