BUG REPRO'D: Morph target not updating smoothly

We have a skeletal mesh with a morph target in it called “Water_Pump_Pool_02”.

Over time, we vary the morphing smoothly from 0 to 1 and back to 0, following a sine wave.

We’re simply calling a custom Blueprint function every frame, and then in the blueprint that owns the skeletal mesh, we’re calling Set Morph Target on the mesh, passing in the value and the string “Water_Pump_Pool_02” as appropriate.

What we’re seeing is that in the game, the morphing doesn’t happen smoothly; it will stagger over time, randomly halting for up to 5 seconds before “popping” to a new position.

This despite the fact that we’re calling it every frame.

What on earth could be going on? Any ideas? Should I be doing something else after the call to Set Morph Target to force it to update?

Epic: I just tested this in Debug, and it consistently works fine (smoothly) in Debug but jerks around with horrendous lag in Development builds.

I’ve managed to repro the bug in an independent copy of the third-person game. Epic: how do I get this to you so you can repro and fix? The project is around 741 MB zipped.

In order for us to test it on our end we would need only the bare assets needed for the morph target and its dependencies.

That stuff still comes to 15.8 MB after I ZIP it, and your system will only let me apply an attachment of 5 MB. Should I split it into parts, or is there a better way to send it?

Hey -

If you can link us a dropbox link we can get the asset from there, but if you need to keep it private feel free to private message us in the forums.

Thank You

Eric Ketchum

OK – here’s the link: Dropbox - Mothership_Epic_Shared - Simplify your life

Basically, I have a sine wave moving the morph target on that skeletal mesh between 0 and 1; it makes the shimmery surface move up and down. Wait long enough and you should see the shimmer “hitch” for up to several seconds while animating.

This was tested with 4.4.1, by the way, so I guess there’s always a chance this bug has been fixed in 4.5; I haven’t had a chance to test it yet.

Awesome. Thanks for the fix, Andrew!

Hello Mothership.Entertainment,

So after downloading your assets and testing them, we were able to confirm the way you were setting up your morph target was one extra step which caused your target to “jump.” The variable your created called time was actually being called within multiple stages of your event tick. Because the event tick is based on frames per second, the variable “Timer” was being combined with the SIN and ABS to call each frame of the SIN wave per tick. This is why you were getting random jumps in your morphing.

Just to clarify, the SIN function in Blueprints, acts differently than the SIN in Materials. The SIN in blueprints is using a mathematical value whereas the SIN in Material is based upon the overall set time within a default SIN Wave.

One simple way we found to fix your issue and get your morph target to update smoothly between the two stages was to create a timeline using a SIN Wave itself. Follow these steps as well as using the images as reference to get your Morph Target to work correctly.

Steps to Follow:

  1. Go into the Blueprint Event Graph of your “ConstructionMudbox2”
  2. Delete all of your Events and Functions aside from your Variable “Pool” and the “Set Morph Target” function
  3. Create a new Timeline
  4. Double click your Timeline and create a new “Float Track” and name it whatever you would like.
  5. To match the Image posted “Shift + Click” on the Timeline itself to create a new point.
  6. After you have the five points, highlight all of the points and rightclick on one of them and change the curve settings to “Auto”
  7. Be sure your Length is set to 1.00 secs. AutoPlay is checked. Loop is checked.
  8. Connect the “Update” from the Timeline to the execute of the Set Morph Target and the Timeline value to the value of the Set Morph Target.
  9. Compile and Save.
  10. Place “ConstructionMudbox2” into your level and watch the morphing!

Blueprint Set-Up

Timeline Set-Up

Thank you and I hope this helped clarify your question and resolved your issue!