Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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).

Product Version: UE 4.22
more ▼

asked Jun 08 '19 at 01:08 AM in Using UE4

avatar image

13 4

avatar image Snufkin83 Jun 18 '19 at 01:28 PM

I need this information too. Can anyone help us?

avatar image sjy_unreal Jul 09 '19 at 07:07 PM

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

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

While the documentation is confusing and seems to be lacking, the information is there. Jieyuan shi 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.

more ▼

answered Jul 13 '19 at 03:12 PM

avatar image

41 3 5

avatar image sjy_unreal Jul 16 '19 at 10:26 AM

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, Jieyuan Shi alt text alt text alt text alt text

processor.png (207.8 kB)
sharingcharbp.png (483.1 kB)
avatar image Duddee Jul 16 '19 at 06:34 PM

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

avatar image sjy_unreal Jul 17 '19 at 04:27 AM

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: https://www.youtube.com/watch?v=tWVZ6KO4lRs (From 30:00, it is Animation Sharing part)

Best Regards,

Jieyuan Shi

avatar image Duddee Jul 17 '19 at 04:30 AM

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.

avatar image sjy_unreal Jul 17 '19 at 06:26 AM

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 :-)

Best Regards,

Jieyuan Shi

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question