Slimy Blob
January 16, 2007 on 11:34 pm | In Actionscript, Physics | 10 Comments
Chris and I have experimented with several approaches of modeling soft bodies in flash (heavily inspired by loco roco ;-)). This is not a priority for the physics engine, but anyway nice to see :-) We have figured out 3 basic ways to do this:
- a spring-mass system with structural springs (e.g. every vertex is connected with every other vertex)
- a spring-mass system without structural springs (hull only) and a pressure force.
- a network of constrained particles using verlet integration.
We have put the third option to code. The downside is that verlet integration requires a tiny integration timestep and many iterations to make things stable so this is a serious performance killer. Things get worse if two soft bodies collide with each other. There is also a rare possibility to break constraints if you push the blob too hard. Option (1) and (2) should be faster to compute, but also less stable.
Maybe it’s just me..? I clicked the flash app (and right clicked to verify it registered as a .swf file), kept the mouse inside the stage, and used the cursor keys, but never saw anything but white. I tried using FP 9.0 r28 debug in Firefox 2 and I tried it with FP 9.0 r28 in IE 6. No luck…
Comment by Nate Chatellier — January, 17 2007 #
thanks for reporting the problem, I have fixed this.
Comment by mike — January, 17 2007 #
Another soft-body implementation from Dov (40ozgames.com) can be found here:
http://www.actionscript.org/showMovie.php?id=1783
Comment by mike — January, 20 2007 #
It’s looking awesome Mike. The controls feel a lot like gish. really great job guys
Comment by Oz — January, 21 2007 #
Is it in flash 8 or 9? looks amazing. i have no clue how u did it. r u going to release the source code any time soon?
Comment by 5566 — February, 5 2007 #
Hey, I was playing around with some blob techniques and noticed your blob is very smooth. How many particles did you use for this one?
Comment by Oz — February, 6 2007 #
@5566 it’s done in AS3. I have modified the code, press ‘d’ to see the internals :-)
@Oz there are about 80 particles and 120 constraints. I had to experiment a lot find a good balance between smoothness, performance and stability.
Comment by mike — February, 6 2007 #
Nice. But how do you test for the mouse cursor being on the screen? I can’t seem to trick it at all.
Comment by axcho — February, 7 2007 #
Look here: http://as3.metah.ch/ (Tracking mouse)
Comment by mike — February, 8 2007 #
[...] (with CS3 source files) are available for most of the datastructures. Michael must be doing some interesting fluf, um stuff… Translating downwards luckily was really easy. Only one as3 feature [...]
Pingback by bushbaby blog » Blog Archive » datastructure tree — February, 9 2008 #