redstrate / Rebound

Limits bone physics to 60 FPS
GNU Affero General Public License v3.0
0 stars 0 forks source link
dalamud dalamud-plugin ffxiv ffxiv-modding final-fantasy-14 final-fantasy-xiv

Rebound

FFXIV's bone physics consist of wind and bounce physics. These apply to the character's hair, clothes and other body parts. However, some aspects appear broken on high framerates, especially those above 60 FPS. Notably bouncing happens so quickly that it's practically non-existent, and wind effects tend to appear jittery.

This plugin fixes this bug by locking updates to 60 FPS, and is based on Kirrana's plugin to be more opinionated with less options.

Caveat

This system was never designed to be locked to 60, so clipping will happen. If this bothers you (for example, it will easily ruin recordings and certain cutscenes) avoid this plugin. Some bones are always updated at the current frame rate, such as hair bangs to alleviate clipping.

Download

This plugin is currently available in my personal Dalamud repository.

What FPS was the physics system designed for?

I initially thought the physics was meant to run at 30 FPS, because of PS3/PS4 console performance. However, the "bounce rate" applied to bones is "60.0" (float in BoneSimulator at offset 0x54) and the physics generally look good at 60 FPS even when the game is running >200 FPS. It also avoids other issues like hair bangs clipping through the head because character positions are updated too infrequently.

What the plugin does

The plugin is extremely simple, and basically a pared down version of Kirrana's. If your current FPS is above 60, it will begin spreading out physics updates - basically locking it to a fixed rate. When the current FPS is below 60, the plugin effectively does nothing.

Caveats and lessons learned

Credits

Thanks to Kirrana and the contributors for the original plugin.

License

This project is licensed under the GNU AFFERO General Public License 3. Some code or assets may be licensed differently.