Home AnimToTexture for Crowds in Unreal
Post
Cancel

AnimToTexture for Crowds in Unreal

Animated Crowd as Foliage

Anyone working in game development knows that placing a large number of animated characters on the screen can be nearly impossible when you’re trying to keep framerates high. Unfortunately, skeletal meshes are slow for a number of reasons.

Vertex animation is a technique to optimize when rendering large groups of skeletal meshes, and it involves baking down animation data into textures for extremely efficient animation and rendering.

AnimToTexture is a plugin in Unreal that can generate vertex or bone-animated meshes and their corresponding textures. This was used to handle the crowds for the The Matrix Awakens Demo, and was made available originally in the City Sample Project. The plugin is now avaliable in Unreal 5.1 and can be easily enabled in the Edit > Plugins menu. There are some great references for working with AnimToTexture here:

If you’re interested in learning how to use AnimToTexture, I highly recommend starting with the resources above, but there are a few key notes to remember:

  • Use Enforce Power of Two if you want your animation to be smooth. The logic seems to require both this and the 16-bit precision option before using high-fidelity animation.

Enforce Power of Two

  • If you’re using PerInstanceRandom in a custom material layer as mentioned by Stephen Phillips to randomize the animation starting time, I recommend using a multiply node to multiply this by some larger negative number to give a bit more variety than just 1 second. This will also ensure that you have randomized animation during Movie Render Queue renders (if you’re using a positive number here, renders will potentially come out with frozen animation for a few frames).

Multiply Node

This post is licensed under CC BY 4.0 by the author.

-

-