Looking for help implementing a VAT animation

Godot Version



I’ve been looking for optimizations for my game where a large number of enemies will be on the screen at the same time, from my tests the biggest performance throttle ends up being the animation skeleton of the enemies.

I ended up finding out about VATS and got interested in the subject but I am not experienced enough in shaders to figure out how to implement a practical pipeline:

  • Have a blender file containing the mesh and the animations
  • Bake each animation into a texture with normals and offsets (i found out a way of doing this process in blender using a very old plugin which works only for blender 2)
  • Import the assets to godot(meshes + images with normal and offset)
  • Apply those in a VAT shader

I’ve found this tutorial:

But was unable to use it in Godot 4, the issue was reported but not concluded.

1 Like

Have you seen this YouTube video? https://www.youtube.com/watch?v=NQ5Dllbxbz4

I haven’t seen it yet, took a quick look and it seems promising, I will try to reproduce the steps on the video later.

See GitHub - yanorax/Godot-VertexAnimation-Demo: Vertex Animation Demo Project for Godot Engine v3.3+ that is for Godot 3 but the shader works with small adjustments in Godot 4 as well.

I’ve seen it but could not make it work on Godot 4

What part of it didn’t work?


I had the same problem demonstrated in this issue Issues when upgrading to Godot 4 · Issue #1 · yanorax/Godot-VertexAnimation-Demo · GitHub

It’s because the .exr VAT position image is being compressed, use Lossless or VRAM Uncompressed and it should work.

You can probably keep Generate Mipmaps on, while I don’t see an issue in the editor, mipmaps usually do bad things to VAT type textures, so check that off if you see any more issues.

One more thing, removing the .exr alpha channel will reduce the cost by 25%, and it looks like it’s the same deal with the normals texture too. The shader at least in this project, doesn’t use the channels.

1 Like

Thank you so much :blush:
I will test it after work

Hey it worked thank you, about the .exr removal of the alpha channel, converting it to jpg and back to exr will work?

That won’t work sadly, you will destroy the data unless you can find some format that can convert the 32bit exr to something lower, or look to any other photo editor like GIMP or Photopea, etc to see if there is a plugin for that.

Try opening the exr in the photo app you are using and see if you see something like I see in photoshop:


and choose as Alpha Channel, then you can delete it and resave (that is what I did to test).

1 Like