Note
I am waiting for written confirmation directly from the OpenVAT Blender Toolkit developer that my Godot Plugin can use a MIT license. I will change my plugin license from AGPL to MIT once I get written confirmation. The only reason why I set it to AGPL initially, is because I did not want any legal risks from OpenVAT in the future.
A plugin that provides OpenVAT support to Godot.
OpenVAT is a Blender-native toolkit for baking Vertex Animation Textures (VATs) enabling engines and DCCs to seamlessly play back complex animated deformation as vertex offsets on GPU via low-cost vertex shaders. OpenVAT GitHub: https://github.com/sharpen3d/openvat
In addition, a new, easy to use OpenVATMultiMeshInstance3D node is provided for
instanced animation support, with auto OpenVAT configuration importing.
2026-03-28.17-55-07.mp4
- Auto import of the OpenVAT JSON configuration file. This includes:
- minimum/maximun vectors
- all animation track meta data
- Can support multiple baked in animation tracks (supports a total of 4096 combined frames).
- Ability to set a unique animation track per instance.
- Ability to change animation track at any time per instance.
- Ability to control the alpha channel for individual instances.
- All the
MultiMeshInstance3Dfeatures such as a unique transform (scale, rotation, and position) per instance. - Works on all renderers, and on HTML builds.
- Mesh must be less than 8192 vertices.
- Total number of frames for all animations must be less than 4096.
- No blending or mixing of animation tracks.
- Although the complete OpenVAT animation meta data is imported and stored in the
OpenVATMultiMeshInstance3Dnode,framerateandisLoopingare ignored. All animation tracks will use the same framerate. All animation tracks will loop. MultiMeshInstance3Dcustom_datais used by this plugin so you will not have access to use it.
- Godot 4.5+
- Blender 4.2+ with the OpenVAT Extension installed.
Maybe if this plugin gets noticed, I will add it to Godot's AssetLib. Until then follow these instructions:
- Download this repository as a ZIP file.
- Extract the ZIP file.
- Copy the
addonsdirectory from the extracted ZIP file into your Godot project'sres://filesystem. - Go to
Project > Project Settings > Pluginsand enable OpenVAT Animated MultiMeshInstance3D Plugin. - Add the new
OpenVATMultiMeshInstance3Dnode into a scene.
This plugin provides a new node called OpenVATMultiMeshInstance3D which inherits MultiMeshInstance3D.
Important
Crucial information necessary for to use the OpenVATMultiMeshInstance3D node.
- Not going to explain how to use OpenVAT Blender tool, as the OpenVAT developer has hours of videos demonstrating how to use it.
However, the Godot version of the OpenVAT shader assumes you exported your model in Blender with the OpenVAT tool using these settings:
Vertex Normals=PackedUse Single RowcheckedExport ModelcheckedModel Format=glTF BinaryImage Format=EXR16
- The Blender OpenVAT Tool output will be 3 files. Copy these 3 files into your Godot project:
- a
.glbfile - single mesh version of your 3D model - a
.exrfile - vertex and normal (packed together) encoded Vertex Animation Texture (VAT) - a
.jsonfile - contains the mix/max extents and animation meta data for your model
- a
- Make sure the
.exrfile is re-imported with compress mode asLosslessand turn offGenerateMipmaps. - Open the
.glbmodel, go to the Meshes tab, select the mesh, then on the right selectSave to Fileoption. Re-import. - Open your newly saved
Meshresource. InSurface 0, change theMaterialto aShaderMaterialand assign the OpenVAT instanced shader:res://addons/openvat_animated/shaders/openvat_instanced_shader.gdshader - Drag the
.exrOpenVAT file into theVertex Animation Textureshader parameter. - Set the
Speedshader parameter to the FPS of the animation that was in Blender (defaults to 30). - (Optional) Drag or configure any albedo, metallic, roghness, normal map textures into the provided shader paramters.
- Save your configured Mesh.
✅This Mesh can now be used in any OpenVATMultiMeshInstance3D
🎞️This video will show you how to prepare your Mesh for the OpenVATMultiMeshInstance3D node.
-
Exported Mesh:
ArrayMesh= the mesh that you prepared in the previous step. -
Instance Count:
int= the number of instances -
Rand Anim Offset:
bool= randomize the animation offset (true/false) -
OpenVAT JSON Config File:
String= the path to the JSON file exported by the OpenVAT Blender tool -
Min and Max Values:
Vector3= these values will be filled in when the OpenVAT JSON file is imported
🎞️This video will show you how to use OpenVATMultiMeshInstance3D.
You can manually force the loading of the JSON file by click on the Import JSON button in the inspector.
Note
The JSON file is automatically imported on _ready() which means it imports on every activation. This makes sure that the latest JSON file is used.
The JSON importer outputs information on the console:
If you want to change the animation track for a specific instance, use:
update_instance_track(instance_id: int, track_number: int)
If you want to change the alpha so can fade a specific instance out (or fade in), use:
update_instance_alpha(instance_id: int, alpha: float)
If you want to change the animation offset of an instance, so that different instances playing the same animation track are not syncronized, use:
update_instance_animation_offset(instance_id: int, animation_offset: float)
You can also change all parameters of a specific instance by using:
update_instance(instance_id: int, animation_offset: float, track_number: int, alpha: float)
You can also change ALL instances by using:
update_all_instances(animation_offset: float, track_number: int, alpha: float)
You can play the next animation track of an instance using:
play_next_track_instance(instance_id: int)
Or play the next animation track of all instances using:
play_next_track_all_instances()
Animation meta data is stored in the animation_tracks variable. It is an Array of OpenVATAnimationTrack:
var animation_tracks: Array[OpenVATAnimationTrack] This is the OpenVATAnimationTrack class :
class_name OpenVATAnimationTrack
extends RefCounted
var name: String
var startFrame: int
var endFrame: int
var framerate: int
var isLooping: boolTo get the OpenVATAnimationTrack object from an instance:
get_animation_from_instance(instance_id: int) -> OpenVATAnimationTrack
To get the animation track index from the provided OpenVATAnimationTrack object:
get_track_number_from_animation(animation: OpenVATAnimationTrack) -> int
To get the currently playing animation track index from the instance, use:
get_track_number_from_instance(instance_id: int) -> int
To get the animation track index from the start and end frames, use:
get_track_number_from_start_end_frames(start: int, end: int) -> int
The inherited MultiMeshInstance3D custom_data is used by this plugin and instanced shader. Here is how it is used:
custom_data.r= animation offset: used to randomize instances playing the same animation trackcustom_data.g= animation start framecustom_data.b= animation end framecustom_data.a= alpha of mesh: used to fade in/out a unique instance
❓Question: My mesh is all white, with no colors or textures. 💡Answer: You forgot to add Albedo, Metallic, Roughness, Normal Map textures that came with the original model to the shader.
❓Question: My mesh's verticies are cracked or all over the place. 💡Answer: Re-import your VAT texture (.exr file) with compress mode as Lossless and turn off Generate Mipmaps.
❓Question: My animations still looked deformed. 💡Answer: This is a Blender/OpenVAT usage issue, and it could be caused by many things. Check out the OpenVAT videos, or post an issue on OpenVAT on GitHub.
❓Question: How do I implement a static pose in an animation track:
- 💡Answer 1: Create a 3 frame action on your NLA strip in Blender with each keyframe being the same, then do an OpenVAT export, and re-import into Godot. The shader will loop these 3 frames, and look like the model is static because the vertext positions have not moved.
- 💡Answer 2: Manually encode another animation track with the same startFrame and endFrame, then do an OpenVAT export, and re-import into Godot. (TODO: test this)
A demo is provided. Just run the project. Pressing SPACE or F1 key will load the next scene.
Pressing the F3 key will display more FPS information.
MSAA 2x is set at the project level. Turning off MSAA improves performance.
I have provied the official OpenVAT Godot shader for you to use on your own custom solutions. Remember that the official OpenVAT Godot shader does not have support for animations.
The unaltered OpenVAT Godot shader is in: res://addons/openvat_animated/shaders/openvat_singleton_shader.gdshader
See the MIT license of rthis shader below.
The most up to date version can be downloaded from the OpenVAT GitHub at: https://github.com/sharpen3d/openvat/blob/main/OpenVAT-Engine_Tools/GLSL/VertexAnimationPBR-GLSL.gdshader
You will have to set the min/max values, and all other shader parameters manually.
Some of the demo scenes (cloth.tscn, jello.tscn) use this, so look at the code to see how it is done.
This plugin uses a modified OpenVAT GLSL shader from the OpenVAT-Engine_Tools folder of
the OpenVAT GitHub: https://github.com/sharpen3d/openvat/tree/main/OpenVAT-Engine_Tools
This comes with a MIT license:
MIT License
Copyright (c) 2024 Luke Stilson
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
This license applies only to the recursive contents of this folder (`OpenVAT-Engine_Tools`) and
does not affect the licensing of the core OpenVAT tool, which is licensed under GPL-3.0.
Skeleton by Kay Lousberg - CC0 License
Floor Tile by Kenney - CC0 License
Cloth Sim Waves Perfect Loop by SonicVisual - CC BY 4.0
Animated Jello by Logan S. - CC BY 4.0
Shape Key Bone Driver Test by Tsawodi - CC BY-SA 4.0