Morphing Objects in PV3D
I started to explore how to change pv3d objects and played a bit with some shaders and thought i might share some of my ideas and results.
I found some code snippets of fluid simulation by Exey Panteleev and noticed that changing the objects shape isn’t hard at all. Basically all you have to do is run through all vertices and change their values.
So i did a little experiment of morphing two shapes into each other. To have a better control of the shapes itself i imported two collada files that contain an object with same number of vertices. All i have to do then is to loop through all vertices and animate their xyz-values.
Hit SPACE to see the animation:
It’s just a quick example so the code is pretty dirty and not optimized:
IcebergDAE1.as
BigTweenLite.zip
Note: BigTweenLite is a variation of Tweenlite. Josh just added some Event-Functionlaity to it and i think it’s a pretty useful add on.
April 28th, 2008 by Daniel / 2 Comments


