Simulated Volumetric Lights how?

As the topic says, I would like to trace simulated volumetric lights around a java2d text. Any source code around ?

I imagine the effect can be achieved by adding several copies of the text with a degree of transparence and scaling/translating it following the perspective law. It should be correct…

One good example is here -> http://www.waterlogic.com.sg/smallmedia/gallery/LightRays.html

Cheers,

Mik

That sounds like the way to go.
Volumetric shadows are made by tracing an objects outline & raycasting the vertices from the point source (then some stencil buffer stuff to mark the shadowed objects via the z-buffer). Seeing as you are starting with a 2D source - you already have the outline, so just project the coordinates & and scale the sizes & there you have it :slight_smile:

  • Dom

For a completely different method see my LightRays applet.
http://www3.sympatico.ca/scott.palmer/Java/LightRays.html

Also CfxWeb http://www.cfxweb.net/modules.php?name=News&file=categories&op=newindex&catid=4 has a great java section with lots of cool appletes that involve particle raytracing and lighting effects. All come with sourse code.

Go figure … My applet above was the winning entry for the LightRays competition at CfxWeb ;D

Yes, your applet is definitely very nice. I also like the fog effect. Very realistic.
And now I looking for the source code… (ehe!)

Cheers,

Mik