Skip to content

HK416/bevy_open_vat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bevy OpenVAT

Crates.io MIT/Apache 2.0 Bevy

Bevy OpenVAT is a high-performance Vertex Animation Texture (VAT) plugin for the Bevy game engine. It enables rendering massive amounts of animated meshes with minimal CPU overhead by offloading animation processing to the vertex shader.

Features

  • GPU-Powered Animation: Decodes position and normal offsets directly in the vertex shader for maximum efficiency.
  • High Performance Instancing: Uses StorageBuffers to render thousands of animated entities with few draw calls.
  • Smooth Interpolation: Supports frame blending for fluid animation playback.
  • PBR Compatible: Built on top of Bevy's StandardMaterial, fully supporting lighting, shadows, and depth pre-pass.
  • Flexible Control: Per-entity control over playback speed, looping, and time offsets.

Installation

Bevy Version Crate Version
0.18 0.18

Add the following to your Cargo.toml:

[dependencies]
bevy = "0.18"
bevy_open_vat = "0.18.0"

Asset Preparation

To use this plugin, you need exported VAT assets. Typically, this includes:

  1. Geometry (.glb or .gltf): A static mesh with UV2 coordinates mapped for VAT lookup.
  2. VAT Texture (.exr): High-precision texture encoding vertex position (and optionally normal) offsets.
  3. Remap Info (.json): Metadata containing animation frame counts, bounding box info, and clip names.

Note: Ensure your VAT textures are exported with settings compatible with your shader (e.g., coordinate system handling).

Preparation

  1. Install the OpenVAT plugin for Blender.

Conversion Workflow

Asset Workflow Example

  1. Load Model: Open Blender and load the model file containing your animations.
  2. NLA Setup: In the NLA (Non-Linear Animation) editor, combine the animations you want to extract into a single continuous sequence.
  3. Open Panel: Open the OpenVAT panel (Press N).
  4. Configure: Select the target model and configuration options.

    Important: You must manually set the frame range at the bottom of the panel to match your NLA sequence.

  5. Export: 1. Generate/Export the VAT texture using the plugin. 2. Select the preview model generated by OpenVAT in the viewport. 3. Export this preview model to glTF format.

Export Notes

  • Materials: Models extracted directly by the OpenVAT tool often have stripped material data. We recommend exporting the generated preview model as glTF to maintain material slots.
  • glTF Settings: When exporting the glTF, ensure the following data is EXCLUDED (unchecked):
    • Animation Data
    • Skinning Data

License

This project is licensed under either of

at your option.

About

OpenVAT (Vertex Animation Texture) plugin for Bevy

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Contributors