Procedurally generated Blueprint assets for keyframed animation


I’ve come to UE from Houdini and I’m therefore very keen to use procedural workflows as much as possible. Having looked into Blueprints lately, I can see their potential and I’ve already successfully created a bunch of assets this way.

However, I always seem to hit a road block when trying to animate my BP assets using keyframes in Sequencer and then export these animations via the Movie Render Queue. Things look fine when previewed in the editor, but they fall apart once I hit the render button.

Let me show you the type of asset I want to create:

This BP actor was created entirely with Construction Script, all the components are created procedurally, i.e. I can decide via a variable whether I want to have three or thirty meshes arranged around the center and the asset will update accordingly. Here’s a picture of the graph:

This part is easy and I think I’ve got the hang of it.

HOWEVER, I now want to be able to animate this setup, maybe something like this:

Now this works when I preview it in the editor (as you can see from the video above), but I’ve already learned the hard way that Construction Script animations do not render out via the Movie Render Queue. They instead remain static.

I therefore have to apply the animations via the Event Graph. Here is my setup, with a keyframe-able variable to animate the meshes’ offset from the center. I’m using a “Tick” event, to “call” the animation when I’m in “Play mode”.

Everything works as it should. In the editor…

…as well as in “Game Mode”.

But, when I now try to render this via the Movie Render Queue, the animation just ‘explodes’:

Thanks to ClockworkOcean’s help, I already learned that this happens, because I am using the “Add Local Offset” node, which - when using the “Tick” Event, seems to be constantly ‘adding’ to the animation, instead of stopping when the keyframe says so.

This is obviously strange behaviour, since the preview of the animation in the editor’s “Game Mode” looks fine.

I already received some suggestions, like using the “Set Relative Transform” node instead, but that doesn’t work, as it overrides the rotation around the center (which is created on an earlier node) and I need that in order to achieve the ‘circular’ distribution of the meshes.

With the way my BP actor is set up at the moment, I can’t achieve my goal, of a procedurally generated and keyframe-animatable asset that can be rendered out correctly via the Movie Render Queue.

Would anyone on the forum have an idea? That’d be much appreciated :slightly_smiling_face:

1 Like

You are moving your static mesh components Offset centimeters / Tick.
Have you set a fixed value for Tick?

Hi Ramon, thanks for the quick reply. I’ve set up an ‘animatable variable’ for the tick event. So it goes from ‘0’ to ‘200’ in Sequencer.

Is ExportAnimation always false?

Only when working inside the editor. When I want to export via the Movie Render Queue, I set it to ‘true’, as the Movie Render Queue doesn’t pick up animations that are based on Construction Script. So once I’m ready to render, ticking this option sends the animation part over to the Event Graph. Hope this makes sense.

1 Like

So you are modifying the value Offset. It has a value from 0 to 200.
In Tick you are moving your static mesh component by Offset centimeters per DeltaTime. Did you set a fixed value for how often your blueprint ticks per second?

1 Like

No, I didn’t. How would I do that?

(And yes, you are correct about the general setup of the animation at runtime).

Go in your blueprint details and write in
Tick Interval (secs): 1 / TargetFrameRate
where TargetFrameRate is … well your target frame rate, maybe 60 or so :slight_smile:

1 Like

Trying that right now :slight_smile:

OK, I did that, but the exported animation still flies off into space :frowning:

I don’t understand why your meshes are bouncing back when you are adding a local offset to the mesh. You are not using negative values anywhere.

If you mean the ‘overshoot’ at the end of the animation, I did that with keyframes in Sequencer.

Yes, you move the Offset value from 200 back to a smaller value and then back to 200, but there is no reason why your mesh actually moves back.

So you mean, my original setup already shouldn’t be working? Or is that based on the animation misbehaving on export?

Yes it shouldn’t work at all.

:smile: But it does. What am I doing right or wrong here?

Just to reiterate - keyframe-driven Construction Script animations work absolutely fine in Sequencer when you’re viewing them in editor. You can animate the same way as you would do in After Effects, Blender or any other animation package.

But in order to export via the Movie Render Queue you have to pipe this animation into the Event Graph, as otherwise the Movie Render Queue doesn’t ‘see it’.

Previewing the Event Graph animation in editor (after ticking the option to ignore animations in Construction Script) works perfectly in my case - it’s doing exactly the same as it did via the Construction Script animation.

But once I hit the render button, something else happens. And I don’t understand why.

1 Like

Please try the following

  1. Set ExportAnimation to True.
  2. Use a negative Offset value for the bounce.
1 Like

Just so I get you right, if I would get rid of the ‘bounce’ there shouldn’t be a problem, is that correct? Because I could just test a ‘simple’ A-B animation.

The problem is that you are moving your meshes always in the same direction. In play mode it should be impossible for the meshes to move back.

1 Like