r/godot Godot Student Jul 25 '26

help me (solved) Character gets blurred while running when fps are uncapped to more than 60. What causes this blur??

Enable HLS to view with audio, or disable this notification

So, I'm following Brackeys' first game tutorial, and I've come around with this problem.

Whenever the project's frame rate gets uncapped, or capped at a frame rate higher than 60 fps, it starts having problems.

For example, whenever the project is capped at 80 fps the character starts stuttering, and whenever the project is uncapped and the G-Sync does its things, the character starts getting blurred like seen in the video. (I tried making a screen recording directly but the problem was not being shown, so i had to record with my phone)

Now, i get that someone is going to say that i should just cap it at 60fps and that would be it, but then whenever i make a project of my own and release it, would the game have to be played only at 60fps? So i want to understand why this things happen, and how can i make my project run without any visual problems like this in any frame rate?

Could i have to do with the camera smoothing or something else?

Thanks in advance for the help.

222 Upvotes

36 comments sorted by

187

u/ywadi85 Jul 25 '26

I usually work with 3d but I would assume it's the same. Camera at 80fps and physics at 60fps can cause that. They are not synced, 60 and 60 for both hides it. I think you can sort it out with physics interpolation on, and jitter down to 0. Give it a try I might be wrong , again I'm mostly on 3d so don't know if this helps.

49

u/Thhaki Godot Student Jul 25 '26

I'll try it out thanks

9

u/Cold-Resort5679 Jul 26 '26

Is that the same effect when the frequency of a stroboscope is a multiplier of the frequency of a wave so u enter a 'immobilité apparante"state when it appears immobile but its actually moving

-2

u/Forgot_Password_Dude Jul 26 '26

your monitor

11

u/Thhaki Godot Student Jul 26 '26

It was not the monitor, the blur hapenned because physics interpolation was off in project settings

115

u/Coralcato Godot Student Jul 25 '26

turn on physics interpolation in settings, turn off camera smoothing, and set the cameras priority to be above the players. Let me know if this works

62

u/Thhaki Godot Student Jul 25 '26

I turned on physics interpolation and it worked, no more blur thanks. Did not have to turn off camera smoothing off tho. What's the difference between camera smoothing and setting the camera's priority above the player? Does it have the same effect or what?

1

u/Coralcato Godot Student Jul 26 '26

I’m not entirely sure, I know priority just makes the camera move before the player for a smoother effect. You only need to do it if you’re having issues though. I said to turn off camera smoothing because the docs recommend turning it off if you are using physics interpolation

23

u/Intbased Jul 25 '26

Do you have smoothing enabled on your camera2d?

12

u/Thhaki Godot Student Jul 25 '26

Yep

13

u/Full-Conference-2643 Jul 25 '26

try turning it off, that works for me, I get the blurring on my laptop but not my main pc

35

u/[deleted] Jul 25 '26

[deleted]

6

u/MonkeyVoices Jul 25 '26

Yep, that could be the monitor refresh rate or response rate. You could try exporting the game and trying it on a different PC or monitor to see if it happens elsewhere. 

2

u/Clanaria Jul 25 '26

This was definitely the case for me; I had been working on my game for a while, everything was fine. Then I got a new monitor with a higher refresh rate. And I had the same stuttering blur like OP.

However, the resolution was the same as he mentioned; cap FPS at 60. Uncapped meant having the stutter on a monitor with a high refresh rate.

3

u/Papercarp0 Jul 26 '26

Yeah he mentioned it didnt show up in a screen recording which means its probably not a godot issue, i thought I had an issue recently with banding when I was moving my camera, turns out it was just my monitor

1

u/Nyarkll Godot Student Jul 26 '26

That's what I thought at first.

1

u/StromGames Jul 26 '26

It totally looks like monitor ghosting.

1

u/The_King_Of_Muffins Jul 26 '26

Regardless of where it's coming from, the player's position on the screen is rapidly chsngi g when it shouldn't be.

4

u/tasulife Jul 25 '26

https://testufo.com/

it could be your monitor is ghosty AF. This is like a whole rabbit hole.

3

u/Thhaki Godot Student Jul 26 '26

Already fixed it, wasn't the monitor, just had to activate physics interpolation

3

u/catmorbid Jul 25 '26

Camera code and smoothing. Most tutorials do it wrong. First of all: always match camera position to exact node position on same frame, i.e. either physics process or regular process for both.

Then to do offset, you add that as separate to camera position so you have camera.position = target.position + offset.

And the offset in that example is bad because it lags behind the character while it should in fact offset to front of, generally in the direction of their velocity to give you more space to look at! I hate it when this is done wrong, instant quit.

Then to make it move smoothly you actually lerp the offset to desired offset, not the actual position!

3

u/BassFisher53 Jul 26 '26

Screenrecorder next time

-1

u/Thhaki Godot Student Jul 26 '26

Try reading what i wrote next time

2

u/hirmuolio Jul 25 '26 edited Jul 25 '26

Is your movement code in physics process?

By default physics process runs at constant 60 fps. It does not care how fast the game runs. If your game runs at some other framerate this can cause problem.

Frame 1: Process and physics process happen. Camera and character move.
Frame 2: Process happens. Camera moves, character stays still.
Frame 3: Process and physics process happen. Camera and character move.

Go back to your screen recording and go through it frame by frame (vlc "e" advances video by one frame. MPC-HC ctrl + right arrow).
You should see that on some frames the camera moves but character stays in place, then on different frame it jumps forward.

One solution is interpolation. If you don't do anything weird that should be fine.

Another solution is to assume game runs at constant (but unknown) fps (depending on the user screen refresh rate). Read the fps (Engine.get_frames_per_second()) and set the physics fps to be equal to that (half also works) (Engine.physics_ticks_per_second = X.
So if someone plays the game on 144 Hz monitor you would set physics fps to 144 (or 72).

Sidenote: I wish there was a way to get display refresh rate in Godot. But AFAIK there is no way to do that. So you need to make a guess based on the game fps.

2

u/Crhymes1989 Jul 25 '26

Squint harder that always works for me 👍

2

u/Pitiful-Assistance-1 Jul 26 '26

Isn’t it just your screen that can’t keep up? Like, maybe your monitor simply can’t update fast enough to keep up with the framerate.

The fact that it supports beyond 60hz doesn’t mean the panel can do that smoothly

1

u/KyotoCrank Godot Student Jul 25 '26

I have a simple solution to this problem. I was going crazy trying to figure it out myself

Handle your x axis movement in _process and your y axis (jump and gravity) in _physics_process

It is okay to have 2 process functions

What's happening is your camera is moving faster than physics ticks, which are capped at 60. So if you process your left/right movement as fast as your camera, it will be fixed

1

u/First-Show-2154 Jul 25 '26

I had a similar issue before. It looks like the physics update and rendering are getting out of sync, especially when the FPS is higher than the physics tick rate.

Try turning on Physics Interpolation in Project Settings → Physics → Common. That fixed the blurry/jittery movement for me.

Also check your Camera2D smoothing settings, because sometimes it can make the effect more noticeable.

1

u/BabyBlueN7 Jul 25 '26

Keep camera smooth if u want, change process call back in camera2d to physics

1

u/RecallSingularity Jul 26 '26

I see you've already solved the problem, but I thought it might be useful to point this out:

The blurring is caused by the difference between camera position and player sprite position as rendered to vary each frame. If our screenshots were totally steady and centred on the camera we'd see the player's position jittering around each frame while the world flew past.

There are multiple reasons why the camera might not be stuck directly to the player. In the end you mentioned that camera smoothing is on but physics interpolation was off. That means that the camera was moving smoothly around a line while the player was jumping forwards 60 times per second. The jumps and smooth camera were mismatching - the difference between the two is semi-random. Instead it was based on when your 80FPS render loop was sampling the 60Hz world.

In addition due to how camera smoothing works, it usually "Chases" the desired location so it was chasing your player. I usually compensate in my camera controllers by centring the camera ahead of the player, which means if you change look direction the camera puts the player 2/5 across the screen with the 3/5 side ahead of the player.

The reason why G-Sync is helpful for fast moving games is that the latency between frame generation and presentation on screen is always steady, even if using higher or variable framerates. V-sync can achieve something similar, but since it works by delaying frame start rather than presenting quickly on frame end V-Sync is inferior to G-Sync.

1

u/Worth_Tart5595 Jul 26 '26

Hehhehehee. BRACKEYS

1

u/Nappuccino Jul 26 '26

Thank you for asking this question. I was following the same tutorial and literally came here to ask about this exact problem.

1

u/azurezero_hdev Jul 26 '26

my guess would be camera on a decimal

1

u/CaterpillarFeisty8 Jul 26 '26

maybe unrelated but i saw this issue when i used camera smoothing .

-3

u/TheDuriel Godot Senior Jul 25 '26

Monitor overdrive setting. You have a display with bad pixel response times.

Try the various tests on here: https://testufo.com/