Announcement

Collapse
No announcement yet.

Let's Talk Instances

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

    Let's Talk Instances

    I've got a rigid-body animation project that heavily relies on instancing. Everything is made of a set of ~500 meshes that are to be arranged manually to create scenes and characters. I would also like to merge static groups of instances to a single mesh for performance and back again for animation or simulation.

    So with that simple concept I've found Unreal is just incredibly ill-equipped to handle extensive use of instances. These are my requirements, am I wanting something technically unreasonable?
    1. Quick manual placement of instances.
    2. Transform animation of instances, which would be translation, rotation, and scaling.
    3. Attachment of instances to skeletons, and animation of skeletons.
    4. Rigid-body transform simulation of instances, again translation, rotation, and scaling.
    5. Grouping of instances.
    6. Hiding of groups of instances, which should also be unloaded from memory.
    7. Copying of groups of instances.
    8. Conversion of groups of instances to a single mesh.
    Last edited by KalciferKandari; 04-25-2017, 06:50 AM. Reason: A word.

    #2
    It's definitely reasonable to do that, but you'll need to build the system yourself. Unreal doesn't have any pre-made tools for it.

    Comment


      #3
      I don't see how any project could be done without these capabilities. Surely any rigid object that exists at least twice should be an instance, but that would be difficult without more extensive tools. My project is one-man show, so I don't know if I have the resources to alter the current systems.
      Are studios just going without strong instancing tools, or do many of them have in-house versions? I cannot believe that Epic Games would never need them.

      Comment


        #4
        There's ways of doing instancing, but with animated objects that's a different matter. You don't typically deal with many animated objects that need to be instanced.

        Comment


          #5
          Have you checked out the instance tool?

          It lets you easily switch between instance and mesh and its cheap - like $10.
          https://www.unrealengine.com/marketplace/instance-tool

          Other things to keep in mind:

          You can easily simulate rigid bodies in the scene, then choose "Keep Simulation Changes".

          So workflow would be:

          Layout 100 meshes with simulate physics.
          Simulate, "Keep Simulation Changes".
          Turn off Simulate Physics.
          Use Instance tool to convert to instance.

          Rinse and repeat....

          **This assumes you want to use physics to position meshes at design time, not simulate at runtime.
          If you want to simulate at runtime, instancing is not what you want.
          Last edited by OptimisticMonkey; 04-25-2017, 12:36 PM.
          https://www.casualdistractiongames.com

          Comment


            #6
            Yes, I've seen that plugin, you can see the creator's response to my requirements here:

            Originally posted by Nate View Post
            Hi,

            1. Can instances be grouped?

            You can't group individual instances, you can only group actors in UE4.

            2. When instances are hidden, are they completely unloaded from memory?

            All instances shared same mesh and material memory, so hidding some instances would not unload the mesh/material from memory.

            3. Can instances be part of physics simulations?

            As far as I know that both ISM/HISM can generate collision but can't simulate physics.

            4. Can you attach the instances to skeleton sockets?

            Not directly. But you can use blueprint to update instance transfrom.

            5. I need to update to 4.16 when it drops, how long does it usually take for the plugin to be updated?

            I usually update my plugins to new released engine version within one week, then it's up to Epic to publish the update to marketplace (it could be 2 days or 4 weeks from my past experiences)
            Originally posted by OptimisticMonkey View Post
            **This assumes you want to use physics to position meshes at design time, not simulate at runtime.
            If you want to simulate at runtime, instancing is not what you want.
            I just need to use the sequencer to record the animation, so I don't think there will be a runtime at all.

            Originally posted by darthviper107 View Post
            There's ways of doing instancing, but with animated objects that's a different matter. You don't typically deal with many animated objects that need to be instanced.
            Well, considering it's an animation and characters are literally made of copies of objects, it follows that to have a greater number of characters, or even swaying trees, that instances would be necessary.

            Comment


              #7
              Characters you don't typically instance unless it's a special case--like for example with crowds in Assassin's Creed, but most games don't need crowds. I believe though that instanced large numbers of animated characters was a feature added to Unreal 3, but I don't know if there's an equivalent in UE4.
              As for trees--using Speedtree it has its own optimizations.

              Comment


                #8
                The characters as a whole would not be instanced, it would be the objects that make them up that would be instanced. This project uses a rigid-body world using basic shapes to build things, so the characters are just basic shapes parented to bones. There are no morphing of meshes, so I'm not sure it's the same as Assassins Creed. Also, things like buildings and vehicles use skeletons as well for rigid joints that are not right-angles. All I need are general tools, not specific like the foliage editor for example.

                And it's not specifically trees, it everything, including things that can stack on top of each other. Not sure if Speedtree would help, but I will have a look at it.

                Comment


                  #9
                  Typically you would be able to instance a whole skeletal mesh, but you wouldn't be able to instance components within the skeletal mesh. You could drive animation for instanced objects but I don't think you could drive that with a skeleton.

                  Comment


                    #10
                    Didn't think going into the project it would be this difficult and there would be so few tools. It's rigid-body, you would think that is as simple as it gets. If objects can be parented to sockets, then surely instances could too.

                    Comment

                    Working...
                    X