Sequencer and Gameplay Camera Blending
UE4’s most recent tool for making level animations, cutscenes and other cinematics is called Sequencer. I only just started using it this week, and I really like it.
However, I had a lot of difficulty at first with a problem I thought would be extremely common: smoothly transitioning from your normal gameplay view into a cutscene, and back out again afterwards. The default is to just jump cut to whatever camera you have in your sequence, which can be a bit jarring. You can hide a jump cut with a fade, but sometimes a “sweep up from your normal position to show something” is far more useful because the spatial context is much more clear.
I spent a good few hours looking for an in-built feature to blend smoothly to & from sequences, but I didn’t find it. I found lots of people asking about it, with no good answers - but this was a while ago. Initially, I came up with my own solution. There’s nothing in the documentation about it, only about how to blend your character’s animations smoothly out of gameplay, nothing about gameplay cameras.
Luckily, in the end, Chris Murphy came to my rescue and showed me how to do it much easier using in-built features. You need a really sharp pair of eyes to spot it (which I clearly don’t have), so I figured since it’s so easy to miss, and not referenced in any of the official documentation, I’d write it up so that hopefully other people might find this blog in future when looking for it like I did this week.
How To Do It
The Camera Cut Track
You can add a Camera Cut Track to your sequence; the main advertised purpose of which is to cut between multiple cameras. But, it also controls the initial cut away from your possessed Pawn, and the cut back again at the end. By default, it’s a jump cut.
Setting the “Can Blend” Option
The first thing you need to do is enable blending on the Camera Cut Track by right-clicking on it and checking the “Can Blend” checkbox:
I’ve no idea why this isn’t enabled by default. The tooltip suggests that it allows you to overlap shots inside the sequence, but what it doesn’t tell you is that it also allows blending with your gameplay cameras at the start / end of the sequence.
Dragging the Blend marker
The next part is the bit I completely missed until it was pointed out to me. Once you’ve enabled “Can Blend”, when you hover the mouse over the Camera Cut Track timeline, a teeny tiny marker appears at the start and end points.
Just look at this:
Blink and you’d miss it. It doesn’t help that because usually it’s at the start and end of the track, it’s half obscured by the start/end time markers. And because it only appears when you hover, you won’t see it until you do - and sometimes the tooltip popups and general mouse pointer changes can obscure it. Sigh.
So, to blend in this camera at the start of the sequence, you drag this marker into the track, like this:
It’s very important that you drag the teeny tiny marker and not accidentally the edge of the track cut itself (which, unhelpfully, displays exactly the same mouse pointer), otherwise you’ll move the start of the cut instead. 🙄
You do the same at the end of the sequence to blend back to your gameplay camera. And that’s it! It’s a feature that works really, really well - if you can find it 😉
Here’s an example of blending into a sequence using this feature while possessing a regular first person camera:
No jump cut, nice transition, sorted.
Customising the curve
If you want to tweak the easing curve of the blend (default is cubic), you need to hover your mouse over the curve until it turns yellow, then right-click to bring up the context menu. The easing settings are under Easing Curve > Options:
A Small Rant
This feature really isn’t very intuitively exposed at all - you need to:
- Know to enable “Can Blend” even though it only mentions blending between Sequencer shots
- Spot the tiniest marker in the world that appears only when hovering (hope the tooltips don’t get in the way!)
- Drag on exactly the right spot
And none of this is even hinted at in the Sequencer docs. It’s like they don’t want people to find it 😉 I knew what I was looking for, found the “Can Blend” option, and still didn’t spot the teeny-tiny-hover-only marker, and so went on to write a completely pointless custom implementation (before deleting it).
I hope Epic will consider doing the following:
- Documenting the fact that this feature exists at all
- Make the camera cuts blend marker far more obvious (size & contrast)
- Display the marker all the time and not just on hover, where it can be even more obscured by tooltips & pointer changes
- Perhaps enable “Can Blend” by default
Extension: Transitioning Back To Pawn In A Different Location
It’s great that our camera smoothly leaves and returns back to our Pawn now. But, what if we wanted to transition back with the Pawn in a different location?
You’ll find that if you try to move the Pawn while the animation is running, it’ll mess up the blending. The answer to this is to set the “Lock Previous Camera” option, which you’ll find by right-clicking the Camera Cut timeline section which includes the transition into the Sequencer animation.
This causes Sequencer to copy the transform of the gameplay camera at the point “Play” is called, and to always use that as a blending source. This means that directly after you call “Play”, you can teleport the Pawn to a new location, and then when Sequencer finishes, it will blend back to that new location, rather than the old one. Like this:
What you can’t do, however, is change the Pawn while Sequencer is running. When the Sequencer plays, it saves the current Player Controller View Target (e.g. the Pawn) internally, and will always transition back to that. If you want to change the Pawn “during” the sequence, I suggest the following sequence:
- Set the new Pawn as invisible
- Match its camera transform with the current Pawn’s camera, to avoid any noticeable jump
- Call Possess on the new pawn
- Call Play on the Sequencer immediately
- Optionally, move the new Pawn to its new location (this assumes that you have enabled “Lock Previous Camera”)
This makes sure that Sequencer blends from your current camera location (albeit now from the new Pawn, that’s why the camera transform needs to match), but then blends back to the new Pawn in its new location at the end.
My intention with this blog post is to highlight a really useful feature in a way that I hope gets picked up with search engines, so other people won’t waste their time like I have. 😄 Hopefully you found it useful!