Site Logo

Pixel-in-Gene

Exploring Frontend Development with Design / Graphics / Technology

Mesh Morphing in WPF

Morphing of 3D meshes can be very cool to play with. I am sure many of you must have seen this in action in movies / tv or even CAD like programs. Its a technique where a set of vertices that describe a 3D mesh change their positions over a period of time into a new surface. In the figure below you can see a Plane mesh morphing into a Sphere. The interesting thing to note here is that only the vertices are changing their positions while keeping the TriangleIndices and TextureCoordinates the same. In some cases you may also want to change the Normals if you have specific lighting requirements. Otherwise you are in good shape just manipulating mesh positions.

image2

The reason I ventured into this is because of an email conversation I had with Jeremiah Morrill. Thanks Jer !

And now its time for a quick video of mesh morphing. You will see examples of morphing between Plane, Cone, Cylinder, Sphere.

I have a custom animation class called MeshMorphAnimation that does the morphing.

Mesh Morphing in WPF
Pavan Podila
Pavan Podila
June 9th, 2008