rigs-of-rods
rigs-of-rods copied to clipboard
Waves on water is broken
Hardware: AMD Ryzen 3 5300U, integrated graphics Software: Garuda Linux, latest RoR dev build, OpenGL render (of course) Settings: RoRcfg.txt
HydraX with waves on water glitches out badly (but only if you have a vehicle spawned, else it works as normal):
HydraX without waves on water somehow seems to have waves actually:
Reflection + refraction with waves on water doesn't have waves at all:
Hello.
The 'waves on water' (EDIT) works by creating a grid mesh and shaping it dynamically to simulate a wavy sea, both physically and visually.
(EDIT2) I just atested that the 'waves on water' setting in 'Settings/Graphics' is always affects physics (both vehicle and character) but under HydraX it doesn't apply to graphics. HydraX waves are always visible, even if they don't affect physics.
I found a crash scenario (Win10, Directx9, PSSM off, configuration=RelWithDebInfo) - OGRE crashes when rendering a frame:
Steps to reproduce:
- In main menu, go to settings, set water=basic and Waves=on (EDIT: it seems to happen even if you start with Water=Hydrax)
- Load a map with water, like 'Small Island' (the one on screenshots below).
- Set the 'Waves height' slider in 'Top menubar/Settings' menu to middle value.
- Go back to main menu, set water=Hydrax and resume game (EDIT: seems to occur whether you leave 'Waves' on or turn them off)
- Go back to main menu again -> crash.
I'd try under Debug but there's a showstopper - the terrain calculates lightmap on background thread, and you can't return to menu until that finished. It takes ~15sec on RelWithDebInfo. On Debug it would take at least 5min. I need to code an option to force-disable lightmap calc to test.
UPDATE: with the new Settings added below, I could test right away. Apparently the culprit is incomplete initialization or cleanup of the previous water.
I managed to reproduce the issue (Win10, Directx9, Visual Studio 2022, config=RelWithDebInfo, terrain=Small Island).
Apparently it gets worse the more vehicles (or the more complex vehicle) is simulated.
I couldn't figure anything out from the code, so I added GUI to fiddle with HydraX params...
anyway, when I figure out what causes this glitch, I'll try to replicate it as rain effect. It really looks like pouring water.
Strangely, under Debug, I get this glitch even with simple water, and even if no vehicles are spawned. Probably because under Debug everything is slower by default :)
Yeah I made a video with this and other bugs some time ago. And my guess was that you have some uninited vars for water.
And my guess was that you have some uninited vars for water.
You win. The glitch of Basic water was unitialized variable Water::m_waves_height
. I have no progress on the Hydrax glitch though.
Cool. Well since @tritonas00 is working on the new water (btw is it on a branch?) , I also think it'd be best to finish that, and just forget Hydrax.
I didn't find the issue yet, but I'm getting close ... I made a debug UI displaying min/max vertex height, so now I know the problem is in C++ code updating the water mesh.
Yes, Tritonific water is super promising, but I haven't looked at it yet. I was just curious if this can be patched easily - from my experience on this project, quick and dirty solutions usually work out better that longer term projects.
EDIT: The branch is here https://github.com/tritonas00/rigs-of-rods/tree/water-2 and apparently it's GLSL-only at the moment.