Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17825

Ray calculation for volumetric spotlight effect

$
0
0
Hi, I want to add a volumetric light effect to my spotslights and because of this I want to do raymarching in a cone volume (the spotlight cone). Is there a handy way for me to distribute rays (basically get a list of origins and directions) evenly inside the spotlight cone? Say I start with 5 rays where the algorithm would give me one ray straight forward and four rays at the edge of the cone (up, down, left and right), but if I increase the number of rays the algorithm would give me more and more rays, essentially giving me a higher detail cone volume. The algorithm would not have to be real-time as I can very well precalculate the rays based on some quality setting at startup but it would still be nice to not have to calculate them by hand. Any tips?

Viewing all articles
Browse latest Browse all 17825

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>