Away3d: Projecting a lightmap
3d Flash, Away3d code demos April 26th, 2008There have been a few questions recently on both the Away3d and Papervision mailing lists about projecting textures, so i figured a demo was in order to help the explanation along, plus give me an excuse to play with caustic generators
. This demo also uses Away3d’s tiling material feature to allow a seamless repeating lightmap to be projected onto the surface of an object.
As usual the source is available in the right click menu or directly from here. To run the code you’ll also need the 2.0.0 version of Away3d from the svn or the downloads section of the site. For now the shading isn’t entirely accurate, as the intensity of the lightmap does not vary with face normal. We’ll be having a look at the possibilities of achieving this, along with other texture projection techniques such as shadows, in the next major revision of Away3d.
















April 28th, 2008 at 12:53 am
Lovely ripples, I mean ‘caustics’ :D! Is it perlinNoise or something else ?
April 28th, 2008 at 6:37 am
@pixelero
no, caustics are a natural phenomenon that occurs from the refraction of an irregular surface. An nice explanation can be found here:
http://www.dgp.toronto.edu/people/stam/reality/Research/PeriodicCaustics/index.html
Would make an interesting Hydra filter, don’t you think?
April 28th, 2008 at 3:28 pm
hopefully you arent saying you *actually* did it the way it is described in the article, are you.
May 1st, 2008 at 1:44 pm
heh - no, i used this handy little generating program that you can find here:
http://www.dualheights.se/caustics/
it’s free and open source. A great combination!
May 11th, 2008 at 9:45 am
The reason for asking if it was perlinNoise, was that I been recently doing some studies manipulating perlinNoise with different blendModes and filters and come up like for instance with this:
http://www.petrileskinen.fi/Actionscript/bitmapDraw/perlinCaustics.html
I guess with Hydra could easily add some more like for instance refraction …