Slate Forums › Support › Animation actions on Skinned Mesh Renderers don’t revert when exiting clip
I’m seeing a weird issue that’s a little hard to describe, but I’d say that when manually leaving an Animation Clip (by clicking out of it to a different point in the cutscene), changes made to Skinned Mesh Renderers aren’t reverted. This leaves Skinned Mesh Renderers permanently keeping whatever state they had at that point in the clip when I clicked out of it.
I made a quick video showing this, which I’ll explain:
In the video, I have two different objects in the cutscene. I have a Skinned Mesh Renderer character (Leo), and a normal Mesh Renderer (Block). For each of these objects, I’m running an essentially identical Animation Clip, which simply sets GameObject.IsActive true or false. Up until the 0:16 point in the video, you can see me scrubbing through the Animation Clips to show the impact they have on the objects in the scene.
I placed those Animation Clips into a Cutscene. If I just let the Cutscene play, it will properly hide the two game objects, and show them again. Up until about 0:30 in the video, you can see the clips behave properly when the cutscene simply plays through them.
But now for the problem: At 0:33, I click to place the scrubber in the middle of the animation clips, and it triggers them to hide the two objects. I then click out of the animation clips. You can see it correctly restores the Is Active state of the block, but it does not restore the Is Active state of the Skinned Mesh Renderer. Playing through the clips again will toggle the state, as expected, but now the SMR remains inactive from now on when Slate isn’t adjusting it via an animation clip.
I’ve tried this on several Skinned Mesh Renderers, and the result is the same. I’ve also tried this on a variety of properties on a SMR, and they all seem to exhibit this problem. (I initially noticed this because Blend Shapes weren’t getting resetting on an SMR when clicking out of the clip.)
I’m going to start looking at the code a bit, to see if I can find any reason for this behavior. But I wanted to report it, since I fear it’ll be pretty complex.
Hello again,
Hmm. I am looking at this now and I could indeed reproduce some unexpected similar behaviour which I still have to figure out. By the way, is there a particular reason you want to animate the active state through an animation clip instead of from within a Slate (for example with the Animate Actor Visibility clip), considering that from within Slate you also get to see where the keyframes exactly are in relation to the cutscene time (just curious 🙂 )
Please let me know. Thank you.
Join us on Discord: https://discord.gg/97q2Rjh
By the way, is there a particular reason you want to animate the active state through an animation clip
Oh, animating the active state was just the simplest example I could easily make to demonstrate the issue, and how SMRs have issues where plain MeshRenderers do not. I don’t actually animate IsActive this way. (I discovered the SMR issue when I was animating Blend Shapes in an animation clip, for example.)
So, to be very specific about what I was really doing, I had an Animator Track on my character, which played various Animation Clips that animated the blend shapes on the SMR. I found that if I played all the way through the clip, the blend shapes were applied, and reverted, properly. But if I played part-way into the clip, and then clicked out of it, the blend shapes wouldn’t revert to the original values. I initially though this was a blend shape issue, but then found this behavior applied to basically any properties on an SMR object.
Hello again. Thank you for the clarification. I wanted to let you know that I am investigating this, but can you please further clarify whether you animated the blend shapes using animation clips (therefore an Animator Track), or did you use the relevant Slate blend shape clips (on an Action Track) for that?
Thank you.
Join us on Discord: https://discord.gg/97q2Rjh
Hello again. Thank you for the clarification. I wanted to let you know that I am investigating this, but can you please further clarify whether you animated the blend shapes using animation clips (therefore an Animator Track), or did you use the relevant Slate blend shape clips (on an Action Track) for that?
Thank you.
All of the blend shape animation I’m doing is via animation clip on an Animator track. The animations are exported from another program (Character Creator), and include a bunch of blend shapes, which would be really difficult to achieve using the Slate blend shape action clip.
I’ve attached a screenshot of how I’m animating the blend shapes.
But it seemed that this wasn’t unique to Blend Shapes. Pretty much any other property on a SMR I tried to animate via an Animation Clip produced the same result (where the SMR wasn’t returned to its initial state when stopping or reversing out of the clip.)
Hello,
I have found the culprit of the issue and working on it. Please note that I’ve sent a new version update I had ready today but unfortunately it does not include the fix for this since it requires more time and refactoring than I anticipated. As soon as it is ready I will send another small update for this. Thank you.
Join us on Discord: https://discord.gg/97q2Rjh