Efficient crowd simulation

Hello I am working now in a way to create thousand character at the same time for a project.

I found this tutorial in the Epic Learning stuff, the guy is speaking about encoding positions in a regular texture and then we decode that inside the material to use it as world offsets in the vertex shader, this is just perfect. But unfurtunately like always the explanation is waaay little, he said a “DCC tools” instead of offering more details when he is explaining.

I would like to know what tool is he using at least


The issue with having a croud is the skeletal meshes.
you would have to have an Extremely simple bone structure to use skeletal meshes. And even then you would cap out at around 100 on screen depending on the details of the environment.

encoding/decoding a texture makes sense in terms of a walk cycle.
so would using morph targets which already do all of that encoding/decoding without having to bog down a material with all the required math.

The issue with morphs is that you would have to re-code the static meshes on the engine to utilize the morph targets which are associated to skeletal meshes.
it is a better overall way you both should look into.

another possibility would be an Alembic cache… it may be worth look into either option before you start trying to encode/decode positions on a texture.
is it doable? Absolutely, every pixel has 4 possible values.

hey @Grot13 Salut

Sorry you are right, here is the tutorial I mencioned before, also I found he is using this tool in 3dsmax, it allow you to bake an animated characters into textures that later you can read in your material. it is a very cool technique, the only problem I saw is the texture limit size, your character cannot have more that 8k vertices like a texture, it did not work in my case because my crowd is more dense, but it definitely work in yours.

here is the doc for the 3dsmax texture baker too: results are prettycool!

After looking a bit into it, I would suggest trying out alembic files along with the foliage tool to check performance on 2k instances of the same alembic thing.

hey [USER=“3140864”]MostHost LA[/USER] the solution that I’m exploring is with the Anim Sharing system that was implemented back in 4.22: it give me the flexibility I need and for the very dense crowd I am thinking to implement the texture bake solution + instanced static meshes like in the video tutorial and I can use those in a far background just to populate.

The problem with alembic right now, is that those aren’t shared information, so if you have many with complex data, they each will take a part of the CPU cake.