- Editado
"morph-target" track animation mix mode
いつも楽しく使用させて頂いております。
ランタイムに関する質問、要望、お願いは、こちら(日本語掲示板)でも大丈夫でしょうか?
トラックごとにアニメーションをミックスする機能について、になります。
現在、ミックス方法は設定無し、上書き(overlap)のみとなっていると思います。
1つのボーン(bone)やメッシュ(mesh)に対して、spTrackEntry.alpha=1.0f でミックスするとその値に置きかわります。
このミックス方法に新しい機能を追加する予定はありますでしょうか?
表情変化(facial morphing)などを行いたいのですが、デフォルトの上書き(overlap)では不可能な表現が出てきました。
具体的には、1つのボーンやメッシュに複数のアニメーションを合成させたいのですが、上書きではそれが消えてしまいます。
そこでモーフターゲット(morph target)と呼ばれるミックス方法を使用できるように、実際に作ってみました。
- morph-target sample application(win32) & cutomize spine-c sourcecode
https://1drv.ms/u/s!AvtcMsC8irYBgzJkqmizB2me52T1
まだすべての機能をデバッグ出来ていませんが、おおよそ上手く動作しています。
普通は、モーフターゲット(morph target)はメッシュに対して処理しますが、ボーンやパスにも処理しています。
これにより、大きなモーション(stand,crouch)と小さなモーション(breath)を分けて作成、管理が可能になります。
過去に、英語フォーラムでモーフターゲット(morph-target)に関する質問があり、その時は「エディタのタイムライン上でできませんか?」でした。
今回はプログラム上(ランタイム、spTrackEntry)のお話になります。
もし、お気に召しましたら、よろしくご検討くださいませませ。
それでは、失礼します。 :beer:
I apologize for posting in English, but it would take time to get it translated and I wanted to say
I really like your idea! Also, you have prepared images, projects, a modified runtime, and many example projects, it's all extremely thorough. Thank you! :happy: We'll work on some things and get back to you soon.
Image removed due to the lack of support for HTTPS. | Show Anyway
8)
Nice to meet you Nate-SAN.
はじめましてNate-さん.。
I'm glad to have your reply soon
即返事を頂けて嬉しいです
I am amazed at the video.(it is moving already!!??)
動画に驚いています。
It was good that documents were helpful.
ドキュメントも役だったようで何よりです。
I have one request.
1つ希望があります。
This animation-mix mode requires many animation-tracks.
このミッスク方法は多くのトラックを必要とします。
I'm happy if you can increase preview-tracks to about 10.
プレビューのトラック数を10ぐらいに増やして頂ける嬉しいです。
Thank you for listening to my request.
意見を聞いてくれてありがとうございます。
I'm looking forward to next version.
次のバージョンを楽しみにしております。
Cheers.
Have a good day. :cake:
In 3.7 setting an animation on the last track adds a new row, up to a max of 15: Image removed due to the lack of support for HTTPS. | Show Anyway
The max could also be 20 or 25, but I'm not sure you ever need more then 15? Also, the +
button turns additive on/off for the current track (it needs a new icon).
We've updated the reference runtime, spine-libgdx, to support additive:
spine-runtimes/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine at 3.7-beta
We already had a MixPose parameter for Timeline apply
which controls how the blending is done, so we renamed it to MixBlend. For example:
spine-runtimes/Animation.java at 3.7-beta
AnimationState has seen a lot of improvements, using MixBlend.add
is more efficient than MixBlend.replace
. Only RotateTimeline has been updated so far, but the other timelines are the only work remaining! I wonder if additive for ColorTimeline (and TwoColorTimeline) would be useful?
We've completed the additive track mixing in spine-libgdx and 3.7.06-beta
has been released which has additive mixing in the Preview view for tracks >0. It's very neat! :happy: :beer:
Image removed due to the lack of support for HTTPS. | Show Anyway
For people not clear on what is going on: all those animations are deforming a single mesh. Tracks with additive enabled are combining the animations on the same mesh.
In 3.7 setting an animation on the last track adds a new row, up to a max of 15:
The max could also be 20 or 25, but I'm not sure you ever need more then 15?
Thank you for responding track-slot-request :talk:
I think that 10 to 15 is enough.
If need more, (Game)Developers will make a debugging preview tool.so we renamed it to MixBlend. For example:
I also think that "add,replace" is good.I wonder if additive for ColorTimeline (and TwoColorTimeline) would be useful?
That's a good idea. :sun:
it is likely to be used for "flame of a candle". (gif image)
but, mix_replace can do the same animation...mmm :mmm:
I can't come up with a good idea,sample and technic....
There will be few opportunity to use, but I think that there is a meaning as a expressing possibility.
:coffee:
About calculation method of color(and twocolor) mix, i have two kinds of ideas. I will add it to sample-program.
Would you please wait a little while.
Color mixing might be useful if RGB was animated on a lower track, and a higher track just wanted modulate alpha only. However, it would probably be better to allow keying alpha separately from RGB for that.
Looking forward to what you come up with! :happy:
Sample modified and updated
サンプルを更新しました。
sample (add color mix sample & color mix document)
https://1drv.ms/u/s!AvtcMsC8irYBgzI4aV9rou0M-N4xmultiply/screen blend (used in samples)
Like when inheriting bone and attachment's color, i think It is easy to understand using multiply and scrren blending calculation.
ボーンやアタッチメントの継承時のように、色には乗算やスクリーンの合成式を用いるのが理解しやすいと思います。
"color" goes from light to dark. (multiply/modulate)
"tintcolor" goes from dark to light. (screen)
"color"は明色から暗色へ。"tintcolor"は暗色から明色へ。
Unchanged/pass color , "color" is white , "tintcolor" is black.
通過色(変更されない色)は、color/tintcolorで白と黒になります。
multiply/modulate
out.color = out.color * color
screen
out.tintcolor = 1.0 - (1.0-out.tintcolor) * (1.0-color)
I think that "modulate alpha" will be able to do in this case.
これなら、不透明度の乗算も可能かと思います。
out.color = setup.0xFFFFFFFF * track0.0xFFFFFFAA * track1.0x88FFFFFF = 0x88FFFFAA
:coffee: