I have not been able to get a raymarched solution working in the manor that I want, I was close at one point I just cant get the “slices” to line up correct and have been struggling getting the depth pass to work as well…
Been getting close but dont have the time to really hammer in on it.
Awwww, dude I did not know that kinda makes me happy. I might not be the guy to teach you really, but I am glad that I could introduce you to something so interesting.
If you have any questions or confusion on things let me know, I can prolly help with what to look up at least.
You should be able to go “inside” of this box as well.
I also need to get some script in there to pull it out of a death spiral of steps and do a more loose approximation so when you are all up in it the FPS does not drop.
Also, the main hitch is still the plane alignment, I think I have the depth stuff figured out in another demo that I can dig up.
I’m just worried this solution is not performant enough due to the procedural noise, and that I should shift to a volume map.
@Pryme8
Unfortunately it is now intended to work with multiple lights at the moment
Also, it works only with spot light.
I recommande, for point lights, to adopt a ray marching method but the problem stays the same: you’ll need 6 shadow maps per light and compute Ray marching for each. This require a lot of gpu power. Maybe @Deltakosh or @sebavan have an idea, let’s try
But… ohhh… ya need approximately 86 kazillion SPS particles… really tiny ones… to make good LIGHT-ABLE dust-fog-smoke.
So… yeah, just for fun… I grabbed one of @jerome’s SPS cube-o-particles… bare-bones SPS shapes… 200,000 of them… and shot 4 colored spotlights into it/them.
Yuh, yuh, yuh. My CPU fan is now heating my entire apartment! I’m thinking about attaching a popcorn “air popper” to the case vents. It sure is a “pretty” scene… pretty boggy.
Pryme8 likes them “shafts of light”… the smokey “beams”… we ALL do. Many of us want them… thru stained glass (omg)! Others want the crystal hanging in the sunny window… effect… prisms and rainbow colors.
Well forget that… not a chance, get a clue… 14 post-process render-passes per frame. heh. (Like I have a clue).
All in all, I HAD TO see what a mass of SPS particles… with spotlights shining thru them… looked like. I had to feel the pain… to experience “the grunt”.
Maybe SPS needs an “inside of a cone emitter” feature? “Uncle Jerome’s Fake Volumetric Light Beam Machine” - from the makers of SPS. “It’s an optical occlusion” heh.
That would actually be cool, if not completely useless and impractical.
Think about shadows. Let’s say we spawn SPS particles within a light-cone area (a spotlight cone/frustum)… and we don’t let them travel outside the light cone… but they can still “boil”-move to some degree (smoke-like).
Now block half the beam with a shadow-caster. (oh no)
Now… the customStartPosition function of the SPS… must NOT spawn particles inside the cone… where the light beam has been blocked. User would see those dark particles… against background colors. If the light cone gets partially/fully blocked by a shadowcaster… the cone-shaped SPS emitter must STOP emitting new particles… in dark-areas of the cone.
Yikes. The SPS customStartPosition func… would need to be in constant radio contact with… um… what? With the shadowGenerator? Geez.
No, me thinks the fake volumetric SPS-based light beams… would NOT ALLOW the light to be used in a shadowGenerator role. Easier. Less brain tumors. It’s a ridiculous idea from the start, eh? 10,000 mesh just for a volumetric light cone? Nah. I’m going to the bar.