Skip to content

Chootana/VRCU_AnimMeshGpuParticle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

VRCU_AnimMeshGpuParticle

アニメーションや頂点メッシュに合わせて動くGPU Particle

AnimatorやSkinned Mesh Rendererを使用せず, shader側でアニメーション再生することで低負荷・大量描画できます.

anim_mesh_gpu_particle_main

anim_mesh_gpu_particle_packs

このプロジェクトはβ版であり,今後継続開発予定です!

shaderの中身の勉強に利用したり,サンプルのそのまま利用することをおすすめします.

Features

  • アバターP-V5にのみ対応(今後対応予定)

    • 好きなアニメーションを使用したい場合はP-V5を合わせてご購入ください
  • アニメーションによっては対応しない可能性あります(今後対応予定).あらかじめご了承ください.

How To Use

  • VRCSDK3-WORLDとUdonSharpをインポートした後, AnimMeshGpuParticle.unitypackageをインポートしてください.
  • Particle Sceneに設定済みのprefabがあるのでご参考ください.

Ex.1 Packs

  • Vket2021ブースで使用したアニメーション詰め合わせ

  • Assets/AnimMeshGpuParticle/Textures/MotionPacks/にあるMemory_pos p5 Pack.matのパラメータを操作することでアニメーションやパーティクルの動きを変更できます.

    image

  1. Animationの切り替え

    Start Frame, Frame Countの値を変更するとアニメーションが切り替わります.下の画像のXがStartFrame,YがFrame Countです.

    1. Cheering (1, 57)
    2. Cheering2 (58, 87)
    3. Salsa Dancing (145, 68)
    4. Sitting Clap (213, 125)
    5. Standing Thumbs Up (338, 125)
    6. Victory Idle (463, 50)
    7. HipHop Dancing (513, 134)
    8. Boxing (647, 52)
    9. Boxing2 (699, 66)
    10. Bboy HipHop (765, 66)
    11. Idle (831, 250)
    12. Agura (1081, 326)

    image

  2. Gravityの変更

    GravityYを変更するとパーティクルに加わる重力方向が変更されます

Ex.2 Dance

  • ShaderFes2021で展示予定.

用意したアニメーションに変更したい

  • まずは用意したアバターのメッシュ情報とアニメーション情報からAnimation Textureを作成する必要があります.詳しい変換方法はAnimation GPU Instancingをご参考ください.

  • 以下で簡単な説明をします

    1. P-V5を用意して,いつも通りAnimatorを追加して好きなAnimationをセットする

    2. Animation GPU Instancingの変換ツールを使用する.

    3. 2.で作成されたフォルダ内のTexturesフォルダにAnimTex_###.assetというテクスチャが生成されます(イメージ下図)

      image

    4. Assets/AnimMeshGpuParticle/Textures/MotionPacks/にあるMemory_###.matのマテリアルのAnimation Textureを3.で作成したものに変更します.

      image

Requirement

  • Unity: 2019.4.31
  • VRCSDK3: 2021.09.30.16.18
  • UdonSharp: 0.20.3

Author

chootana (ちゅーたな)

twitter: @choo_zap

License

Anim Mesh Gpu Particle is under MIT license.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published