Moving camera in relation to a moving object causes stuttering/lag

Hello everyone, this is my first forum post, so please let me know if I have done anything incorrect in regards to that.

I am currently working on a project involving 3 cars driving. One of the shots requires that the camera follows one of the cars while it looks at the other cars. I recorded the movements of these cars with take recorder and combined them in the sequencer. However, when I parent the camera to one of the cars, the car that the camera is parented to is fine, but the other cars start to stutter as if they were trying to keep up with the moving camera.

If I exit the camera, the cars are completely fine and the animation is smooth. It is only when I view the cars through the moving camera that they stutter or lag. Even if I get rid of the camera entirely and just follow the cars manually within the viewport, I still see stuttering. This issue only occurs when a camera is moving at relatively the same speed as another object. I thought this was possibly only a problem that occurs within the viewport, but it still happened even when rendered. I rendered through sequencer and MRQ, and the stutter still persists. I have tried increasing and decreasing the fps in the sequencer as well as checked on and checked off lock to display rate at runtime. I have been plagued with this problem for 2 days on a project with a tight deadline, so any help at all is greatly appreciated.

I’ve attached a video with captions for context showcasing the stutter/lag:

Hey there @flixyyvfx! Welcome to the community! This is quite odd! Kind of looks like the physics are ticking out of sync with the frames. This only occurs if your camera is attached to a moving vehicle or the same if you move concurrently say with a sequence? Is it only the takes or is it that way while just testing in editor as well? Do you have Tick Physics Async on in your project settings? That should be off in this case.

you’d already tried my original thought, which was to lock the frames.

A couple of things to play with:

Head over to Project Settings → Engine → Physics and play with Max Physics Delta Time and possibly enable substepping.

Let me know how things go!

Hey @SupportiveEntity ! This occurs both if my camera is attached to a moving vehicle and if I exit the camera and just move concurrently with another vehicle. It also occurs while testing in editor, only as long as I am piloting the camera of a moving vehicle and looking at another vehicle moving alongside it.

I tried your suggestions and they unfortunately did not work. Is this really a physics issue? Or does it possibly have something to do with only the camera? Because the takes and animations of the vehicles themselves are completely fine. And at 0:20 in the compilation I sent, the stutter occurred with a completely baked alembic file. The camera was only following the trajectory of the ball, but the ball still stuttered. But if I adjust the camera animation so it doesn’t completely follow the ball exactly, the stutter gets less apparent.

@flixyyvfx perhaps try changing the CineCamera tick group could help?
Instead of the standard “During physics” maybe “Post Physics” would help force it’s update after the car physics have been calculated?

Did not work sadly. I messed with the tick groups for both the camera and the vehicles, but saw no difference, unless I am doing it incorrectly.

I know I said it may have something to do with the camera, but the stutter still occurs even if I am not piloting a camera. If I manually move along with the vehicle using wasd, it still stutters.

Considering the baked animations are doing it as well that’s extra odd. Guessing the issue could be the camera rendering, but if it’s the viewport too it’s project wide. If you can see it every frame, can you step through frame by frame during play and check the velocity and location to see if it jumps back and forth with the vehicles themselves or just remains the same and it’s just visual offset. I’m setting up a test project now to see if I can replicate, will help to see if I can get around it there.

It’s a bit hard to tell from the location itself, but from what I can gather, it seems like it is just a visual offset and the vehicles themselves aren’t necessarily stuttering. Unless you were referring to somewhere else to check the velocity and location? I was just looking at the location parameters in the details panel.

In case you were wondering or if it helps to recreate the problem, you can just use the ue vehicle template and create a take recording of driving the vehicle straight. Then duplicate the vehicle and create another take recording to the side of the first car and drive straight. Then just create a sequence and import both take recorders as subsequences. From there, you can create a camera and parent it to one of the cars or just use the camera already attached to the car in the blueprint. That’s at least the process of how I did things in case it makes a difference

Hmm in a number of my tests it’s not nearly as bad as yours. This was the smoothest (handling the camera curve manually) Just a little quick and dirty look in the editor. I’m rendering it out now as well. Will edit the post if the render shows any different. This is going to be an odd one!

Yea the whole thing is pretty weird. But what you’re seeing is definitely what I’m experiencing, so at least the problem can be recreated on your end and it isn’t just some voodoo magic only my pc haha

The render did the same, so I’m going to have to ask around on this one. How far is your deadline out? I’ve got a couple more ideas but lack the knowledge on them.

Deadline was a few hours ago. Ended up having to go an entirely different route and come up with and execute a new idea in the 2 days I had left. But I would still love if a solution was found for future projects since the stuttering kind of limits my creative freedom in the realm of work I do.

What’s weird is that I’ve seen the stuttering in one of the breakdowns of the Matrix Awakens at 30:34. Granted, it was a previz, but the stuttering was still there.

Ahhh yeah sorry about that! I’ll keep taking a look to see what I can find on the topic. Every answer I’ve seen are the things we’ve already tried, such as locking the frames, substepping, etc. I actually sat down and watched through the matrix awaken’s breakdowns and such to see if it was mentioned, but it doesn’t seem like it.

No worries! But I really appreciate you helping me out through this. Hopefully we do find a solution soon :pray:

Hello everyone. I am just checking in if somebody found a solution to this issue that appears on my end aswell. Thanks for any help!

1 Like

I think I found a solution to this. You have to record your car movement with fixed framerate (eg 24fps) option checked in project settings and then having the same framerate in sequencer. You have to set desired framerate before actual recording, not after. I am experiencing no stutter. Hope it helps!

That’s an excellent idea. I would have figured during playback it would have interpolated between frames it didn’t have before. @flixyyvfx let us know if this works out for you, if so we can mark this as a solution.

Hey! This sounds very promising. I apologize for not responding, been busy these past 2 weeks irl and am going to be away from my computer for another 2 weeks starting in a few days. If I can find some time to test that out before then, I’ll let you know the results. If not, I’ll test it out after I get back.

There’s no rush, don’t put yourself out, I’ll be here when you get back!

Did you manage to find a solution to this problem?

Hey there @antonklock! Welcome to the community! Have you given Batsi’s solution a try?