Animation¶
v0.44
から部分的に対応しています。
VRM のアニメーション
VRM は、Animation を使わないという仕様です。
Export は Runtime では動作しません
Runtime では AnimationClip の情報を取得できないため、Export は動作しません。
Support Status¶
channel.path |
type |
import |
export |
---|---|---|---|
translation |
vec3 |
○ |
○ |
rotation |
quaternion |
○ |
○ |
scale |
vec3 |
○ |
○ |
weights(morphTarget) |
float[] |
○ |
○ |
interpolation |
import |
export |
---|---|---|
LINEAR |
○ |
○ |
STEP |
○ |
○ |
CUBICSPLINE |
○ |
LINEAR |
Export¶
How to Export an Animator¶
Add an Animator component to a root GameObject
Create an AnimatorController and set it in the Controller box (
Animator
->Controller
) in the Inspector windowFrom the UnityEditor’s toolbar, select
Windows
->Animation
->Animation
to open the Animation windowMake sure the root GameObject is selected and click the Create button in the center of the Animation window for creating AnimationClip
Add animation keys to this clip
Export as the glb file from
UniGLTF
->Export
How to Export an Animation¶
Add an Animation component to a root GameObject
From the UnityEditor’s toolbar, select
Windows
->Animation
->Animation
to open the Animation windowMake sure the root GameObject is selected and click the Create button in the center of the Animation window for creating AnimationClip
Inspectorの設定をDebugモードにしてAnimationClipのLegacyフラグをONにする

Interpolation¶
Set the created AnimationClip in the Animation box (
Animation
->Animation
) in the Inspector windowAdd animation keys to this clip
Export as the glb file from
UniGLTF
->Export
Notes¶
RotationKeyのInterpolation設定をQuaternionかまたはEulerAngles(Quaternion)にすること

Interpolation¶
For the Animator, all edited clips can be exported. However, the Animator states are not saved
Though a created Animator goes through multiple animations (Animation State Machine), the UniGLTF Importer (UniGLTF-1.25) will only import the first one
export properties¶
Assets/UniGLTF/Editor/Animation/AnimationExporter.cs
property |
|
---|---|
m_LocalPosition |
vec3 |
localEulerAnglesRaw |
未実装 |
m_LocalRotation |
quaternion |
m_LocalScale |
vec3 |
blendShape |
float[] すべての blendShape の状態をまとめて記録する |
interpolation¶
Assets/UniGLTF/Editor/Animation/AnimationExporter.cs
unity |
export |
---|---|
AnimationUtility.TangentMode.Linear |
glTFAnimationTarget.Interpolations.LINEAR |
AnimationUtility.TangentMode.Constant |
glTFAnimationTarget.Interpolations.STEP |
その他 |
glTFAnimationTarget.Interpolations.LINEAR |