Der Schmale – David Lenaerts’s blog

Flash Platform Experiments

Cloth simulation modifier in AS3Dmod

Tags: , , , , , , , , ,

 

flagI 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
Get AS3Dmod on Google Code.
Leave a comment (13 comments)

Celebrating 10 years of Sony VAIO in Papervision3D

Tags: , , , ,

After a couple months of work, Nascom‘s latest big project for Sony Vaio was able to go live, celebrating Vaio’s 10th anniversary. To read all the grubby details about it, you can check the full blog post at Nascom.

It was a blast working on this project, mainly because it gave me a chance to solve some interesting math-related problems, which tapped right into my main interests as a programmer. Especially custom collision detection paired wall sliding in a game-like manner, and optimising paths generated by an A* algorithm. As A* is tile-based, I needed to remove superfluous nodes by checking intersections between extreme nodes with the map and iterate backwards from there to create a shorter and more natural path. Good times!

Cheers to all people involved at Nascom, as well as to Ralph, who helped us a lot with some invaluable input on do’s and don’ts of papervision, performance tweaks, …, to be able to get most out of it. So cheers, man ;)

To close up, just take a peek and a poke here: http://club.vaio.sony.co.uk/clubvaio/gb/en/vaio10/ . Enjoy!

Leave a comment (1 comment)

© 2009 Der Schmale – David Lenaerts’s blog. All Rights Reserved.

This blog is powered by Wordpress and Magatheme by Bryan Helmig.