Wind simulation with modifiers and WOW Engine
WOW-Engine is an Actionscript API to simulate physics in a 3d environment. The code is based on a popular 2d physics library – APE. It offers some very interesting possibilities in 3D animation, and everyone doing 3D in Flash should have it in their toolbox.
WOW engine simulates a physics world model composed of entities called particles. Particles can be connected using constraints and exposed to different forces that make them move around. Some more information as well as a few tutorials can be found on the projects home page.
The basic technique of using WOW and 3D in Flash is to map those particles to objects on the 3D scene, and before each render read synchronize their x, y and z coordinates. But there are other ways too… On the WOW page, here and here you can find some examples of particles mapped not to whole objects but rather to individual vertices.
Animation based on vertices has been my main preoccupation for some time now, so I got immediately interested. Unfortunately those WOW examples come without source code, so I had to figure that out on my own. The above demo comes as a result.
Some quick details: the windsock was modeled in Blender and the textures were baked using the technique I mentioned in my previous post. On the flash side Papervision3D engine is used and a couple of AS3Dmod modifiers – Taper and Perlin.
This is my first experiment with WOW physics engine, but after getting a basic understanding of how it works, I am convinced there is a big potential in combining AS3Dmod and WOW, so more stuff will be coming hopefully!
As usual here’s the source code. Please mind that this code is a result of a late night coding session ;)





[...] Everydayflash.com writes about an Actionscript API called WOW Engine that simulates physics in a 3D environment. Read the post here. [...]
Hey Bartek!
I’ll try to make a comment that goes beyond the ‘OMG that’s freakin’ cool!’ It goes without say that it is.
I’m an animator who uses flash and I’ve been trying to transfer my 2D skills to 3D. Anyway, seeing flash do stuff that I used to dream about blows my mind. THANKS for the demos.
-L
Hey Bartek, I am doing almost the same thing as your wind simulation demo. I’m making a standup tube that simulates wind, like a skydancer tube. It looks all allright, except for the bottom that should stay still.. But I can’t seem to figure out how I can fix the one side of the flag/tube so it doesn’t get affected by the perlin modifier. Can you stear me in the right direction?
All I’m using for the moment is the AS3Dmod and Papervision3D.
@Alex this kind of effect can be achieved with something I call “falloff”. I am currently reworking this feature, but for now, in the code that is currently in the repository trunk you may want to try the setFalloff function.
Allright!!! Mucho’s gracias.
Hi, I would like to use it on a site i’m working. How can I take an autorization?
thankyou!
It’s published under MIT license. You are free to use it in any way you need. Additionally, if you think you can put a link back to this article on your site, it would be nice (it’s not mandatory though).