Skip to content
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

Waves on water is broken #3137

Open
Miner34dev opened this issue Mar 5, 2024 · 6 comments
Open

Waves on water is broken #3137

Miner34dev opened this issue Mar 5, 2024 · 6 comments

Comments

@Miner34dev
Copy link

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):
Screenshot_20240305_132508
HydraX without waves on water somehow seems to have waves actually:
Screenshot_20240305_133006
Reflection + refraction with waves on water doesn't have waves at all:
Screenshot_20240305_132818

@ohlidalp
Copy link
Member

ohlidalp commented Mar 24, 2024

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.

@ohlidalp
Copy link
Member

ohlidalp commented Mar 24, 2024

I found a crash scenario (Win10, Directx9, PSSM off, configuration=RelWithDebInfo) - OGRE crashes when rendering a frame:
obrazek
Steps to reproduce:

  1. In main menu, go to settings, set water=basic and Waves=on (EDIT: it seems to happen even if you start with Water=Hydrax)
  2. Load a map with water, like 'Small Island' (the one on screenshots below).
  3. Set the 'Waves height' slider in 'Top menubar/Settings' menu to middle value.
  4. Go back to main menu, set water=Hydrax and resume game (EDIT: seems to occur whether you leave 'Waves' on or turn them off)
  5. 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.
obrazek

@ohlidalp
Copy link
Member

I managed to reproduce the issue (Win10, Directx9, Visual Studio 2022, config=RelWithDebInfo, terrain=Small Island).
obrazek
Apparently it gets worse the more vehicles (or the more complex vehicle) is simulated.
obrazek

@ohlidalp
Copy link
Member

I couldn't figure anything out from the code, so I added GUI to fiddle with HydraX params...
obrazek

anyway, when I figure out what causes this glitch, I'll try to replicate it as rain effect. It really looks like pouring water.

@ohlidalp
Copy link
Member

ohlidalp commented Mar 25, 2024

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 :)

@cryham
Copy link
Contributor

cryham commented May 7, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants