-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Heavy buoyancy jitter #10
Comments
Could you share your settings/OS/render mode? I'm not getting any jitter if frameskip and heightmap sync frameskip are set to 0, and only getting the amount of jitter I'd expect to see with those settings increased. |
Bildschirmaufzeichnung.vom.2024-02-13.22-03-56.webmThis is the latest commit on devel. I also have frameskip and heihgtmap sync set to 0. I reduced the lods to 1 to get acceptable fps. |
I use Linux/integrated graphics, so I only got ~25fps, but that shouldnt affect the waves. |
I think that may possibly be Z-fighting, the cameras in the example scene have a very large range (near 1.0 far 16000.0) which would make that likely to happen. If you lower the far plane on the camera, does that reduce this flickering? |
I've finally had a chance to sit down and investigate this closer, and it's definitely not Z-fighting. It's also noticeable on Windows 10 with a Radeon 6700. It appears to be the result of the ocean simulation being out of sync with the buoyancy/physics system. If I run on a strong enough computer to reach 60fps, Vsync enabled, and 0 simulation and height map sync frame skips, then the ocean simulation is in sync (or near enough) with the physics system, the jitter is not noticeable. If the Ocean TPS counter in the example scene is either above or below 60, the jitter becomes noticeable. Possibly because the height map is getting updated by the compute shaders on the render thread when the physics thread is trying to use it. So the solution here is likely to make the height map sync in the render thread happen in sync with the buoyancy calculations in the physics thread, ideally without a significant performance impact. |
Also setting the "maximum physics steps per frame" godot setting to 1 helped for me a bit. I tried once to get the wave height of buoyancy probes in _process(), store them, and access them later in _physics_process(), but that didnt seem to work (maybe I did it wrong though) |
Once asynchronous gpu readbacks get implemented into godot it might help with the jitteriness of buoyant objects as explained by acerola in his buoyancy video |
When switching in the demo to the boat mode and increasing wind speed and chopiness, the jitter is very visible. It seems to not come from the physics system, but the wave heights computed in the compute shader.
The text was updated successfully, but these errors were encountered: