Efficient and high-quality skinning and animations for simply authored skinned meshes.
A Unity project implementing real-time mesh skinning using the GPU-based Direct Delta Mush algorithm. This algorithm and its variants enable efficient and high-quality computation of mesh skinning and animations, even for simply authored skinned meshes.
With Direct Delta Mush (left), we get less bulging effect than what we get with built-in skinning (right).
- Unity 2020.3.36f1
- Visual Studio 2022
Add MeshDeformUnity
to Unity Hub and select the Unity version to open this project.
- Direct Delta Mush with GPU variant 0.
- Precomputation of Direct Delta Mush with GPU.
Iterations | Visual Effect |
---|---|
0 (LBS) | |
2 | |
16 |
The table above shows how the number of iterations affect the visual effect of skinning. With more iterations, the elbow appears smoother and has a reduced bulging effect.
The paper also presents some variants equivalent to special cases of several previous skinning algorithms.
- Variant 0 is the full DDM model.
LBS | v0 |
---|---|
See technical notes for technical details.
-
Drag the model into the scene or select the object with this model in the scene.
-
Expand and find the mesh object of the model. Add a component to the mesh object. Ensure that there is a
Skinned Mesh Render
component in this object. -
Examine the component
DDM skinned Mesh GPU Var 0
. It has several attributes:Iterations
: The iteration count of the precomputation.Smooth Lambda
: Determines the smoothing result for each step.Use Compute
: Determines whether you use GPU skinning or CPU skinning, but currently, we only implemented GPU skinning for most of the variants.Adjacency Matching Vertex Tolerance
: Set with a small positive float number if you need to merge the adjacency data of the vertices close to each other, but enabling this process may cause longer precomputations.Debug Mode
: For comparison to the visual effect of built-in skinning if you assignCompare With Linear Blend
to this attribute.
Modify
Iterations
andSmooth Lambda
to change the visual effect of runtime skinning. -
Set
Iterations
to 30, for example. For this model, set theAdjacency Matching Vertex Tolerance
to a positive number to enable vertex matching. Then click thePlay
button and switch to theScene
view. Expand the skeleton in theHierarchy
window, and you can select which joint to edit. -
Press E to rotate the joints to deform the mesh. Press W to translate the joints.
-
To play animation on the mesh, create an
Animator Controller
and set the animation as shown below. You can also set the speed as desired. Then choose the root of the model, add the componentAnimator
, and set the animator controller mentioned before to theController
attribute.
After playing, you can see the animation. Some models can be found at mixamo.