godotengine / godotengine/godot

Skeleton2D SkeletonModification Execution Mode set to physics_process causes flickering/jitter.

Open
#100,504 0 comments 1 reaction 0 assignees View on GitHub
bug topic:2d topic:animation
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

Reproduced in:
- v4.3 stable
- v4.4 dev 5

### System information

Godot v4.3.stable - Pop!_OS 22.04 LTS - Wayland - Vulkan (Forward+) - dedicated AMD Radeon RX 6800 XT (RADV NAVI21) - AMD Ryzen 9 5900X 12-Core Processor (24 Threads)

### Issue description

**What I got**
I was messing around with prototyping/benchmarking performance of 2d skeletons and found out that
Setting skeletonModification execution mode to physics_process bricks the animation and causes flickering/jitter.

**What I Expected:**
Can set execution_mode to physics_process and it works the same as process, although with assuredly better performance because it would be running at the physics tick rate rather than unlimited.

_Side note_ _(optional reading)_: 2D skeleton performance seems okay, I can get 200 skeletons at 60fps, however animation doesn't seem to make much difference which makes me think the overhead from nodes is more of a bottleneck (or even when the skeleton isn't moving it is processing?)... I don't think you can sidestep that with the Rendering server because the Bone2Ds need to be attached to the SceneTree? I assume... I wonder if one optimization would be to have the bone2Ds be internal/able to be setup/assigned within the skeleton2d and then set remote transforms/paths in it?

### Steps to reproduce

1. Open up minimal project provided below.
2. Change execution_mode on the SkeletonModification2D in Skeleton2D.
3. Observe flickering like in video below:

https://github.com/user-attachments/assets/9bc2f442-5f7c-442e-8cc1-cf4d74b9d3e2

Additionally can try running animation in animation player and/or dragging around the right_hand node2d which has inverse kinematics setup.

### Minimal reproduction project (MRP)

[skeleton2d_process_example.zip](https://github.com/user-attachments/files/18163363/skeleton2d_process_example.zip)

I don't know why the project zipped is 6.9MB its only half a MB unzipped...

Contributor guide

Open the contributing guide

Research direction

Start with the provided skeleton2d_process_example.zip and reproduce the flickering by changing SkeletonModification2D's execution_mode in Skeleton2D, then compare physics_process with process while using the AnimationPlayer or dragging right_hand. Done means the physics_process mode produces stable animation and inverse-kinematics behavior without flickering or jitter.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, godot
Domain
game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.