Announcement

Collapse
No announcement yet.

Efficient crowd simulation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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

    Cheers

    #2
    Hi ! You forgot to leave the link of the tutorial (crowd simulation could be usefull for my fishes )
    Facebook page : https://www.facebook.com/Otholithe-g...6187709110889/
    YT channel: https://www.youtube.com/channel/UCuS...IIFzVZZVmfniug
    Discord : https://discord.gg/65vRCu3

    Comment


      #3
      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.

      Comment


        #4
        You are right, I have simple skeletal meshes and with 100 fish I get about 6-7 fps. I have only one simple animation in the anim BP, but on top of that there is 3d pathfinding so I think it is normal.
        I thought I could gain fps by culling these pawn (I mean mesh set to invisible, tick disabled, ai controller destroyed, anim mode set to none) but it is merely perceptible, don't know why.

        That's why I'm interested in vertex animation techniques and instanced meshes, I'm wondering if the position encoding can be used with that, and with the 3d pathfinding
        Facebook page : https://www.facebook.com/Otholithe-g...6187709110889/
        YT channel: https://www.youtube.com/channel/UCuS...IIFzVZZVmfniug
        Discord : https://discord.gg/65vRCu3

        Comment


          #5
          hey Grot13 Salut

          Sorry you are right, here is the tutorial I mencioned before, https://learn.unrealengine.com/cours...69316453932197 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: https://docs.unrealengine.com/en-US/...ool/index.html results are prettycool!

          Comment


            #6
            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.

            Comment


              #7
              hey MostHost LA the solution that I'm exploring is with the Anim Sharing system that was implemented back in 4.22: https://www.youtube.com/watch?v=-2LZyV8SJ5o 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.

              Comment

              Working...
              X