
I was recently invited to create a cloth modifier for
AS3Dmod by
Bartek Drozdz, similar to the
2D version I did earlier. In the unlikely case you haven’t heard about it before, AS3Dmod is a cool modifier library compatible with the most popular 3D Acionscript engines (
Papervision3D,
Away3D,
Sandy and
Alternativa3D). To put it simply, it takes existing 3d meshes and changes its shape on a per-vertex basis, and also allows you to animate them without needing an animated model. Lucky for me, as I was interested in doing a 3D version, and this was the perfect setup to do it in
The cloth modifier provides some methods and functions to adjust its behaviour (rigidity, air friction) as well as to apply external forces such as gravity or wind. You can also set boundaries to act as fake walls or floors. This modifier works best with meshes that have a flat edge, such as planes, boxes/cubes, cylinders, … This so they can be locked in place at an edge and actually give you something to look at instead of having a mesh that gets blown out of the view straight away
One last remark is that the cloth should be the first in the modifier stack. It needs its previous state, and any prior modifiers changing its state will not have any effect.
On to the demos!
- Flag sim with parameters to play with (Papervision3D, 600 triangles): Demo | Source
- Hanging cloth with fake floor and wind (Away3D, 450 triangles): Demo | Source
- Strange cube being blown about (Away3D, 1200 triangles): Demo | Source
Leave a comment (13 comments)