36
© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. DragonBonesの紹介とv2.0アップデート Andy Hall | アドビ システムズ株式会社 テクニカルエバンジェリスト

Dragon bones ボーンアニメーション紹介&v2.0アップデート

Embed Size (px)

DESCRIPTION

Flash向けのボーンアニメーション ライブラリDragonBonesの紹介。ボーンアニメーションの考え方、Flashでの作り方、そしてライブラリのv2.0の新機能。

Citation preview

Page 1: Dragon bones ボーンアニメーション紹介&v2.0アップデート

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

DragonBonesの紹介とv2.0アップデート Andy Hall | アドビ システムズ株式会社 テクニカルエバンジェリスト

Page 2: Dragon bones ボーンアニメーション紹介&v2.0アップデート

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

だれだっけ?

2

§  職歴はウェブ制作 → Flash開発 → アドビで色々 §  正式な肩書きは「クリエイティブ クラウド エバンジェリスト」 になりました

§  興味はデザインとコードをまたぐところ §  ゲーム好き

@fenomas

Page 3: Dragon bones ボーンアニメーション紹介&v2.0アップデート

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

今日のテーマ

さて、質問: Stage3D対応アニメーション制作の もっともややこしいところは

どこでしょう?

3

Page 4: Dragon bones ボーンアニメーション紹介&v2.0アップデート

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 4

プログラマー デザイナー

Page 5: Dragon bones ボーンアニメーション紹介&v2.0アップデート

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 5

プログラマー デザイナー

ここです! スプライトシートは単なる コマアニメなのでどうしても 何らかのアニメーションを コードで書く必要が出る。

Page 6: Dragon bones ボーンアニメーション紹介&v2.0アップデート

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 6

DragonBonesとは、 そのワークフロー問題を緩和してくれる、 最近注目されるライブラリーである。

プログラマー デザイナー

萌 萌 萌

Page 7: Dragon bones ボーンアニメーション紹介&v2.0アップデート

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 7

Page 8: Dragon bones ボーンアニメーション紹介&v2.0アップデート

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

DragonBonesの全体像

8

デザイナー プログラマー

ボーン アニメーション

Page 9: Dragon bones ボーンアニメーション紹介&v2.0アップデート

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

インストールの一言:

9

Page 10: Dragon bones ボーンアニメーション紹介&v2.0アップデート

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

インストールの一言:

10

Page 11: Dragon bones ボーンアニメーション紹介&v2.0アップデート

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

インストールの一言:

11

Page 12: Dragon bones ボーンアニメーション紹介&v2.0アップデート

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

インストールの一言:

12

Page 13: Dragon bones ボーンアニメーション紹介&v2.0アップデート

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

パネルを使った制作の流れ

13

1.  Flashでタイムラインアニメーションを作る

2.  DragonBonesパネルに読み込み

3.  アニメーションのタイミングと設計を パネルで調整

4.  ボーンアニメーションを書き出し、 コードベースのプロジェクトに使う

Page 14: Dragon bones ボーンアニメーション紹介&v2.0アップデート

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

ボーンアニメーションの設計と考え方

14

Page 15: Dragon bones ボーンアニメーション紹介&v2.0アップデート

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

ボーンアニメーションの考え方:

15

スプライトシート

+ <メタデータ>

Page 16: Dragon bones ボーンアニメーション紹介&v2.0アップデート

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

ボーンアニメーションの考え方:

16

スプライトシート

フレーム4 フレーム5 フレーム6

Page 17: Dragon bones ボーンアニメーション紹介&v2.0アップデート

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

ボーンアニメーションの考え方:

17

スプライトシート ボーンアニメーション

+ <メタデータ>

フレーム4 フレーム5 フレーム6

Page 18: Dragon bones ボーンアニメーション紹介&v2.0アップデート

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

ボーンアニメーションの考え方:

18

スプライトシート ボーンアニメーション

頭: t=0 x=0 y=0 rot=0 t=1 x=2 y=3 rot=0 t=2 x=5 y=7 rot=3 t=3.."

"

フレーム4 フレーム5 フレーム6

Page 19: Dragon bones ボーンアニメーション紹介&v2.0アップデート

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

ボーンアニメーションの考え方:

19

ボーンアニメーション

頭: t=0 x=0 y=0 rot=0 t=1 x=2 y=3 rot=0 t=2 x=5 y=7 rot=3 t=3.."

"

大事なポイント!

1.  PNGに入るのはコマアニメ ではなくてパーツ。

2.  アニメーションデータは フレーム毎ではない! キーフレーム毎である。

Page 20: Dragon bones ボーンアニメーション紹介&v2.0アップデート

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

ボーンアニメーションの考え方:

20

ボーンアニメーション

頭: t=0 x=0 y=0 rot=0 t=1 x=2 y=3 rot=0 t=2 x=5 y=7 rot=3 t=3.."

"

ところでボーンアニメーションをPNG (XML結合)として書き出すと アニメーションのデータがPNGの メタデータに入り、ボーン アニメーションがPNG一枚で済む。

自分的には感動。

Page 21: Dragon bones ボーンアニメーション紹介&v2.0アップデート

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

ボーンアニメーションの考え方

ボーンアニメーションのメリット: §  メモリー使用量は圧倒的に低い

§  パーツを動的に入れ替えられる

§  全体シーンのアニメーションを Flashで作ることも可能

§  アニメーションの長さ、細かさはほぼ無制限

弱点:

§  パフォーマンスはスプライトシートほど出ない

21

Page 22: Dragon bones ボーンアニメーション紹介&v2.0アップデート

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

ボーンアニメーションの設計

基本的なのパーツ:  Armature & Bone アーマチュア  ボーン

22

Pix: http://jvk.deviantart.com/art/Claymation-armature-42001869

Page 23: Dragon bones ボーンアニメーション紹介&v2.0アップデート

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

ボーンアニメーションの設計

基本的なのパーツ:  Armature & Bone アーマチュア  ボーン

23

Pix: http://jvk.deviantart.com/art/Claymation-armature-42001869

Page 24: Dragon bones ボーンアニメーション紹介&v2.0アップデート

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

ボーンアニメーションの設計

考え方として:

24

アーマチュア ≒ MovieClip

§ アニメーションのコンテナ § 子ボーンのリストを持つ § アニメーションのリストも持つ

ボーン ≒ Sprite § 動くパーツの一つ § 親アーマチュアを持つ § 子アーマチュアも持てる!

だが!どちらも「Container」ではない。

Page 25: Dragon bones ボーンアニメーション紹介&v2.0アップデート

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

FlashProを見ながら言うと:

25

コンテナMCは アーマチュア

Page 26: Dragon bones ボーンアニメーション紹介&v2.0アップデート

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

FlashProを見ながら言うと:

26

子グラフィックは ボーン

Page 27: Dragon bones ボーンアニメーション紹介&v2.0アップデート

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

FlashProを見ながら言うと:

27

タイムラインの ラベル付きの空フレームは 当アーマチュアの アニメーションになる

Page 28: Dragon bones ボーンアニメーション紹介&v2.0アップデート

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

FlashProを見ながら言うと:

28

子ムービークリップは アーマチュアの条件を

満たせば、

Page 29: Dragon bones ボーンアニメーション紹介&v2.0アップデート

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

DragonBones v2.0 の新機能!

29

Page 30: Dragon bones ボーンアニメーション紹介&v2.0アップデート

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

DragonBones v2.0 の新機能

1.アーマチュア ⇔ アニメーションの再利用

一つのアーマチュアに定義してあるアニメーションを 違うアーマチュアに適用する。 (各アーマチュアのボーンの設計が一致すれば)

30

Page 31: Dragon bones ボーンアニメーション紹介&v2.0アップデート

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

DragonBones v2.0 の新機能

2.ボーンのZ順序が動的に変わる

アニメーションのパーツの重ねの順が変わった場合が認識される。

31

Page 32: Dragon bones ボーンアニメーション紹介&v2.0アップデート

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

DragonBones v2.0 の新機能

3.マルチ解像度の対応

PNGの画像データをいくつかのスケールで書き出して、 デバイスによって適切なデータを読み込んで、スケールを かけて表示する。

32

Page 33: Dragon bones ボーンアニメーション紹介&v2.0アップデート

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

DragonBones v2.0 の新機能

4.タイムラインイベント

タイムラインアニメーションにあるサウンド再生と イベントをランタイムで取得し対応できる

33

Page 34: Dragon bones ボーンアニメーション紹介&v2.0アップデート

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

DragonBones v2.0 の新機能

5.TextureAtlasの読み込み

DragonBonesパネルで作った物以外にも、別方法で 作られたテキスチャーアトラスを利用できる

34

Page 35: Dragon bones ボーンアニメーション紹介&v2.0アップデート

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

DragonBones v2.0 の新機能

6.時間ベースのアニメーション

各アニメーションの再生スピードを変えたり、 巻き戻したりできる。

35

Page 36: Dragon bones ボーンアニメーション紹介&v2.0アップデート

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 36

Andy Hall http://aphall.com @fenomas

ご清聴ありがとうございました!