Morphing Animation


Morphing animation (also known as vertex animation) is a way to simulate deformations of soft materials. It transforms one shape smoothly into another. This is done by creating a mesh that contains multiple positions for each vertex. Each additional set of positions defines a shape, called a morph target. When animating, a weight is assigned to each target. The effective position of each vertex is calculated by linear interpolation between the positions for that target, according to the weights.

Morphing differs from skeletal animation where we create an imagined skeleton, and rig the model by defining the relationship between each vertex of the model and the nodes of that skeleton.

Note that the fundamental structure of each morph target must be the same: If three vertices form a triangle in the base model, they will form a triangle in all the morph targets. The triangle can have a completely different position, orientation, and size; or it can even be effectively removed by making it a degenerate triangle with size zero.

In most cases, the mesh will be created by an external tool, and imported using the Balsam asset import tool. For example, in the Blender 3D editor, morph targets are called "shape keys", and in Autodesk Maya they are called "blend shapes".

The morphing example shows how to control the weights of a model imported from Blender.

The custom morphing animation example shows how to create a morph target in C++ by subclassing QQuick3DGeometry.

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.