Greetings! I developed an in-editor tool for baking skeletal mesh animation into textures, allowing for instanced static meshes to be animated through the material shader.
Here is another video of 2500 Mannequin Instances of a single HISMC showing multiple animations. Each individual instance can be on a different state: Idle in place, Running from the sphere or walking back to their original position. https://youtube.com/watch?v=C94CImc6qOM
-Take the vertex deformation from a skeletal mesh animation (both bone and morph target) and bake it into two textures (one for positions and another for normals).
-Vertex positions and normals are encoded to allow for different LODs of the same model to use the same texture (on the videos only one texture is used for all LODs).
-Multiple animations can be packed into one texture, and animation can be interpolated, only needing to bake a few frames of animation.
-Create static mesh asset from skeletal mesh with the additional UV-Set needed for fast animation texture lookup. Can also stack multiple rows to acomodate models with more vertices than UE’s texture resolution limit.
As long as you can access the Instanced Mesh Component you’ll be able to update the location / rotation with the “Update Instance Transform” function.
The content example will include a simple RTS example with an actor that manages the instances desired velocity, updates the transforms and sets the animation to be played by each instance.
I have posted a comment on your YouTube video, I would absolutely love to test this ASAP. I have a great use case and would love to share the concept with you, as well as have a future conversation. Thank you!
In my experience publishing the Mirror Animation System, Epic can take months to release a product.
Because of that I’m gonna put up a BETA version through Gumroad at a reduced price. You can find it here (full Source Code included): https://gumroad.com/l/rXMUp
Everyone who purchases the BETA version will get the final release in the UE Marketplace, I did the same aproach with the Mirror Animation System.
Since I was a little busy with this I was not able to respond to all the questions, will answer as much as I can now that I’ve finished version 1.0.
It can be used for the rendering side of the crowd, however dealing with the collision / AI with lots of characters is another issue on its own.
For reference or as a starting point you could check out the content examples of the plugin where there’s a crowd of agents driven by the standar UE 4 AI + Recast navigation.
The agents in that video do not have any collision resolution.
As for having crowds of enemies with complex collisions like swords and all that you may have to resort to doing what ubisoft did for crowds in assassins creed, where they have a crowd of simple instances, but they spawn full characters in the place of the instances when the Main character gets too close, or hits them, etc.
Hey finally saw your comment, you can now test the BETA version through gumroad, as for any questions involving your specific use case you can put them in this thread or message me about it at: hethger@gmail.com
Interesting!
Will definitively try the Beta! I just have to finish some stuff am doing this days, and will go for it!
Just quick question that pop-up on my mind. The crowd of agents on the content examples of the plugin driven by the standard method they use the same tech right?
And also now i got this other question as well:
Is it correct/accurate in your opinion to describe this tech as “Vertex animation texture with multiple segments in the texture for different animations”, and then having to use distance to point to select segment?
The Crowd of agents is an array of regular characters, but rander than having a Skeletal Mesh, theres only 1 Instanced static mesh component that Updates the transform of each instance to the transform of their corresponding character actor, the material shader for the instances uses the material functions included in the plugin.
As for the second question, the way animation is selected is by simply scrolling the UV coordinates along the y axis, it is mostly based off of Houdini’s version of the same technique explained here:
I don’t get why textures are 2048 with all that wasted space. they are not going to be streamed anyway so you don’t need mips (any mipmap is useless except the full resolution, so don’t need power of 2)
will you support animation blending of some kind? I understand this is for crowds but even then the hard cuts are jarring
also since animation textures are generated per mesh * per animation * per LOD, you’re probably aware that if you have more than a handful of characters you’re going to end up with a big texture library and potentially a lot of texture memory used.
at my previous work some years ago we developed a similar system but instead of animating per vertex, the animations had bone transforms (rotation only though), and every character had a vertex-to-bone-mapping texture. this way animations could be shared between LODs and even between meshes with the same skeleton, while animation textures had much less data (since there’s always less bones than vertices in a character).
it’s a long shot and highly technical, but you might consider it interesting
I’ll probably buy this very soon as it looks incredibly useful :). I have a few questions after watching the videos:
How are you changing the animations on the instances? For example, how does each instance know it has to play the Idle / walk / run animations? Do you have control over this via BP?
Since this is WPO, Im assuming that collision for each instance is based on the static mesh data (and does not account for the animation). Is that correct?
How many animations can we reasonably include in the data asset? Is there a practical limit?
@Hethger Just bought off gumroad! I have been using the Houdini vertex animation baking extensively - would love to be able to bake the textures in UE.
@Chosker I was pondering a similar idea - the rigid body vertex animation in houdini takes a similar approach to what you describe. I am thinking about attempting a similar approach - do you have any other docs or links about it?