x

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"

Make actor copy animation state of another?

Hello,

I've made a water shield effect on my actor by using a second mesh with a tessellation material on it.

alt text

The problem is that when I play the scene, the animations are not in sync! I've tried a ton of things to make them work, but they always end up playing out of sync, so his idle/run/etc animation moves differently than the water mesh.

How can I set the water mesh to be at the same frame as the original animation? (Instead of just giving them the same AnimationBlueprint and crossing my fingers)

Thanks!

Note: I also need to use a 2nd inner mesh with custom depths for a proper fresnel shader, so this would help me out there also. :)

Product Version: UE 4.9
Tags:
more ▼

asked Oct 06 '15 at 08:10 PM in C++ Programming

avatar image

Juice-Tin
152 38 37 45

avatar image Matthew J Oct 06 '15 at 08:32 PM

Hello Juice-Tin,

Are you calling all of the exact same animations on these two meshes but they're still out of sync? How are you going about setting up and/or calling your animations? We would need more details about the surrounding elements to see where the problem is.

avatar image Juice-Tin Oct 06 '15 at 10:04 PM

Hi Matthew, I have an actor with 2 meshes, each with this extended AnimInstance class:

alt text

Next, in my actors Tick method, it sets all his animation variables as needed: (An example below, however all the values are set throughout the Tick method)

alt text

At the very end of the Tick, it copies his main animation data into the 2nd mesh's animation with this function:

alt text

This should theoretically make them identical as they always leave the Tick with identical AnimInstance values. The 2 meshes do play through the right animation states, however they are not in sync, the second mesh is always a little behind.

(Shown here with a darker material)

alt text

That's why I ask is there's any way to directly copy the anim state of another animation, as it seems even with the exact same AnimInstance variables at the exact same time, they still play out slightly differently. It's like this the moment the scene plays. The desync amount seems to be random when the states change.

Thanks for checking this out, I'd be happy to give any other info as needed. :)

avatar image ElChipacabra Oct 07 '15 at 06:15 PM

I'm having exactly the same issue with my project as well. I've got an ice material that I apply to my actors to indicate being frozen. The animations never sync up despite duplicating every animation property that I can find.

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

3 answers: sort voted first

Hi there, here to necro this thread, because I had the same problem with secondary meshes that were used as Clothing and another one that needed to copy the AnimMontages:

In the construction script of your character, pull out a Set Master Pose Component node, connect the child mesh on target and the Parent on New Master Bone Component, and that should do the trick...alt text

d5989b8254[1].png (75.5 kB)
more ▼

answered Aug 01 '17 at 06:53 PM

avatar image

Rumpelstilskin
62 6 6 10

avatar image Matthew J Aug 01 '17 at 07:01 PM

Please create a new post about your particular issue, as this has been resolved for a very long time.

avatar image Juice-Tin Aug 01 '17 at 07:07 PM

Actually, the answer I accepted was just a workaround that never actually worked properly. I only recently discovered SetMasterPoseComponent which is the correct way to do it.

If Rumpelstilskin wants to change his comment into an Answer I'd gladly accept it so this question will have the right answer for anyone else seeing it in the future.

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

Unfortunately it seems that his delay isn't something that can be avoided when attempting to copy anything related to animation. Applying the animation blueprint to both of the meshes would be the best way to go about doing this without having the delay. I just attempted it in the ThirdPerson template with the default mannequin and didn't receive any delays or inconsistencies.

more ▼

answered Oct 07 '15 at 06:48 PM

avatar image Juice-Tin Oct 07 '15 at 08:07 PM

Edit: After more testing, very basic things such as the thirdperson will be synced, yes. My character also starts off synced as well, however any complex movements or small scene modifications such as changing the material, creating a particle, etc, creates syncing issues.

Ex: When the main mesh's material was changed to a fresnel material, it became permanently de-synced. This also happened when the water tesselation material became visible, after a number of acrobatic movements, etc. (Look at the top/bottom of the hair)

alt text

It's much more visible on large/fast movements, and when using the custom depth pass with transparent fresnel materials.

Note: Armor and Weapons are attached(children) to the main mesh. Could these factor in the reason it's slows down or gets de-synced?

avatar image staticvoidlol Oct 08 '15 at 12:38 PM

Apologies if I'm suggesting the obvious or asking a stupid question here, but why would you guys take the approach of using two distinct meshes instead of a single mesh with a more complex, additive material (where the water and or other effects can be switched on or off)?

avatar image Juice-Tin Oct 08 '15 at 02:22 PM

The main reason I need it is for transparent fresnel which requires a second mesh to be used for custom depths. My game is heavily based around that effect. https://answers.unrealengine.com/questions/308382/fresnel-translucency-parts-clip-through-body.html Also for things like the water barrier in the first image, you can see it's physically around the player and not just applied to the base material (its also wavey while the player inside it is not)

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

Finally found a solution, despite what everything seems to say, do not put the depth/2nd mesh parented to the first mesh.

This will never sync properly (unless the project is super basic like the 3rd person):

alt text

This will allow both mesh's animate in perfect sync if their anim values are the same (just parent them both to some other object, so they are beside each other):

alt text

Not sure if it's a bug with recent unreal releases, but simply not parenting one mesh to the other does the trick.

more ▼

answered Oct 16 '15 at 10:03 PM

avatar image

Juice-Tin
152 38 37 45

(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