How to use animation sharing plugin?

I try use documentation, but can’t get needed result. Does more detailed guide exist?
In particulare, i can’t undestand where to use Anim Sharing State Instance and where can i create rules for plaing animation (for example, transition between walk and run).

1 Like

I need this information too. Can anyone help us?

I also want to know how to use the Animation Sharing Plugin.
I can’t find any useful information in Google.

While the documentation is confusing and seems to be lacking, the information is there. regarding what you posted on my other question, you are getting the wrong idea of the plugin. This isn’t meant to share an existing animation blueprint across other actors. This is meant to be a self-contained way of having a pool of animations that can be shared to a huge amount of actors. This is really only useful in my opinion if you have a large amount of actors (probably at least 50+ to make this useful) on screen that all share the same basic animations.

First we need the basic “containers” for our animations. This is the Anim Sharing State Instance part of the documentation, you can really copy paste that piece of code and there’s no need to fill the “animation to play.” Then we need a transition blueprint to handle the transition between animations and that is right below the Animation Blueprint Setup part of the documentation. Again, you can follow the directions exactly.

Now we need the logic driving how characters move between animations. We can find that in the Animation Sharing State Processor part of the doc. For the processor, we need to create a simple enum that we will use to point towards our animation blueprints we created earlier. (If we had walk, run, idle - in the enum we want a walk, run, idle). In the class defaults, select that enum you created. Now, we want to override ProcessActorState in the functions. In our actor that will use this system, create a variable of that same enum. You can see the documentation casts to the actor and grabs the variable. This is how our characters move between animations- just change the enum value on its variable.

Last, the Animation Sharing Manager is pretty straight forward. Hook up all the things we just created. Animation States is where you hook up the anim bps. Anim sequence is the animation you want to be played in that BP.

Also don’t forget on the character to run the register code.

1 Like

Thank you for your generous help first.
Now by following your instructions, I have made my characters sharing one pose fine. However, I encounter some other troubles when I want to let my characters move between animations.

I create a variable of that same enum in my sharing characters blueprint, and the enum has two states corresponding to different animation sequences(idle, run). I change its value by a keyboard input event. To verify the value of enum change correctly, I print the value of enum variable in string. It changed to the correct value indeed.

But, I don’t know why the animation of character doesn’t change. If I change the default value of the enum variable in SharingCharacter, the playing animation of sharing characters will be different.

There is also a numerical cast from enum to integer since the out state of ProcessActorState is integer type.
I don’t know whether it is because my configuration in AnimationSharingSetup is not correct. I don’t turn on the on-demand option, and I also don’t set the AnimationSharing AdditiveInstance.

Look forward to your reply,
May you have a nice day,

Regards,

282537-running-screenshot.png

In your process actor state you forgot to check the box “should process”

Yes, it is exactly the key. Now I can make my sharingCharacters share animations and the movement between them is also right. Thanks a lot !

In addition, I also want to know what the on-demand option in AnimSharingSetup means? By watching the GDC19 presentation video, I found that the sharing characters in same state, they also can have different animation by playing the same animation sequence with different starting play point.

Some additive animation pose is also can be attached to the characters at runtime.
It seems to generate some transient state at runtime?

The GDC19 video URL: New Animation Features in Unreal Engine | GDC 2019 | Unreal Engine - YouTube (From 30:00, it is Animation Sharing part)

Best Regards,

My guess would be you could make the boolean a variable so you could turn off or on the ability for your characters to transition animations at runtime. If you look into the settings inside the Animation Sharing Setup it has a few options related to the starting point. I haven’t used the system enough to know exactly what they all do, but most of them seem to be related to additive, blends, and optimization.

Okay, I will look into the C++ source code about this plugin to figure out how to use these options in detail.
Thanks a lot :slight_smile:

Best Regards,

i want to know whether the performance will be great,when i use this plugin?
actually,i tried my best to understand how to use it.My target is optimizared performance,but now i think i am fault

I also want to know.
Actually,My metahumans use the same skeleton.Would the plugins help me to reduce performance overhead?

I have a few questions for you.

  1. When AI dies and play the dead state anim, which BP should be used to destroy the actor?
  2. Since collision is removed from mesh and capsule could be used instead, any better solution to detect collision.
  3. I have AI doing melee attacks which uses line trace on arms to do hit detection and apply damage. How would that be implemented?