AS3 Wavemap

October 27th, 2005

I've implemented this great tutorial The Water Effect Explained now in AS3. Maybe, its a little small, but it only looks good, when you get at least 50 fps (best 80-90).
I have done this in AS2 before with blendModes and the ConvolutionFilter, trying to emulate the very simple algorithm for performance, but the results are not as the original. So I know, that AS3 is much faster than AS2..., but its too slow in such cases. One solution is to blow the output twice, but you really need a high fps, which is mostly not possible to get in browsers which other things moving around.

Anyway, I have modified the tutorial to compute with Integers (int), which are much faster than floats(Number). The result is rendered in gray to the output. If anyone found possebilities to increase the performance, tell me.

AS3 wavemap (Flash8.5 Player needed) - one step before water simulation (displacement)

Compile this with -default-size 80 80 -default-frame-rate 80

Filed under: actionscript

6 Responses to “AS3 Wavemap”

  1. Jon B Says:
    October 27th, 2005 at 7:01 pm

    this looks awesome, but firstly I think you AS2 demo was great and had perfect speed. The problem with this AS3 demo is that it’s small and grey, the effect looks cool, but it’s hard to tell how ‘water-like’ it is. Maybe a slightly larger more blue example like the AS2 version?

  2. Franto.com Flash blog » Collected links to ActionScript 3.0 examples Says:
    November 14th, 2005 at 9:15 am

    [...] tionscript3? (source) Lightning particlesAndre Michelle (9 different sources + examples) AS3 wavemapAndre Michelle ( source) ActionScript 3.0 - 3D >> 4 sites AS3 p [...]

  3. Justin Says:
    May 21st, 2007 at 2:21 pm

    Im getting 404s a lot Andre :) Are your rewrite rules working?

  4. Arnaud Says:
    January 21st, 2008 at 8:16 pm

    Hi,

    I’m a french student in final year, and I’d really like to reuse your water effect for my final year project. It would really give an astounding visual appeal. I can tell you about the project later if you’re interested, but I really need the source code. Please contact me via email. Thanks in advance

  5. Andre Michelle » Blog Archive » AS3 optimations & suggestions Says:
    April 18th, 2008 at 12:35 pm

    [...] Try to use Integers (int) for all possible cases There is really often a possebility to work with Integers instead of Numbers(float). The lost resolution can be neglected, when working with higher values than with floats before. see also [...]

  6. DeCabeza.net » Colección de link útiles sobre ActionScript 3 - desarrollo web, tutoriales, video tutoriales, videotutoriales, flash, photoshop, php, mysql, dreamweaver Says:
    June 27th, 2008 at 4:33 pm

    [...] AS3 wavemapAndre Michelle [...]

Leave a Reply