Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qtquick3d-morphing.qdoc
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4/*!
5
6\title Morphing Animation
7\page quick3d-morphing
8
9\section1 Introduction
10
11Morphing animation (also known as \e{vertex animation}) is a way to simulate deformations of soft
12materials. It transforms one shape smoothly into another. This is done by creating a mesh that
13contains multiple positions for each vertex. Each additional set of positions defines a shape,
14called a \l{MorphTarget}{morph target}. When animating, a \l{MorphTarget::weight}{weight} is
15assigned to each target. The effective position of each vertex is calculated by linear interpolation
16between the positions for that target, according to the weights.
17
18Morphing differs from \l{Vertex Skinning}{skeletal animation} where we create an imagined skeleton,
19and rig the model by defining the relationship between each vertex of the model and the nodes of
20that skeleton.
21
22Note that the fundamental structure of each morph target must be the same: If three vertices form a
23triangle in the base model, they will form a triangle in all the morph targets. The triangle can
24have a completely different position, orientation, and size; or it can even be effectively removed
25by making it a degenerate triangle with size zero.
26
27In most cases, the mesh will be created by an external tool, and imported using the \l{Balsam Asset
28Import Tool}{Balsam} asset import tool. For example, in the Blender 3D editor, morph targets are
29called "shape keys", and in Autodesk Maya they are called "blend shapes".
30
31The \l{Qt Quick 3D - Morphing Example}{morphing example} shows how to control the weights of a model
32imported from Blender.
33
34The \l{Qt Quick 3D - Custom Morphing Animation}{custom morphing animation example} shows how to
35create a morph target in C++ by subclassing QQuick3DGeometry.
36*/