Opened 10 years ago

Last modified 2 years ago

#2692 closed defect

Water turning red — at Version 45

Reported by: brian Owned by: wraitii
Priority: Should Have Milestone: Alpha 25
Component: Core engine Keywords: patch
Cc: wraitii Patch:

Description (last modified by Itms)

Revision: 15579

RMS: cycladic_archipelago

The water can turn red in several situations, especially in Atlas and when resizing the game view.

http://trac.wildfiregames.com/raw-attachment/ticket/2692/screenshot0015.jpg http://trac.wildfiregames.com/raw-attachment/ticket/2692/screenshot0016.jpg

Change History (53)

by brian, 10 years ago

Attachment: screenshot0015.jpg added

by brian, 10 years ago

Attachment: screenshot0016.jpg added

by brian, 10 years ago

Attachment: system_info.txt added

comment:1 by brian, 10 years ago

Description: modified (diff)

comment:2 by wraitii, 10 years ago

I'm going to assume that you have recompiled the game properly.

I absolutely can't reproduce this, it doesn't happen for me. The red thing is probably because the waves move, incidentally. Also BTW that's not the impassibility grid, but that isn't really important.

Does this happen on all maps? Is it affected by zooming? Is it just moving the camera?

comment:3 by Stan, 10 years ago

I had the same issue using the last autobuild, by raising the water and making go down in atlas. Some red areas would appear on the shore.

comment:4 by Tom Brewe, 10 years ago

I had the issue with displaced shore waves when switching to windowed mode, and back to fullscreen. I Fullscreen the Waves were fine. But when in windowed mode (+ resizing the window by hand) the shore waves moved.

comment:5 by brian, 10 years ago

It happens with both the open source and proprietary drivers (HD 5770, Ubuntu 14.04)

comment:6 by Josh, 10 years ago

Same problem here (HD 5450, Open Drivers, Ubuntu 14.04, GLSL), I attached a clearer picture of the displacement which changes with zoom and camera location. It seems when the camera is at the same height as the water plane the waves are in the right place, but the more zoomed out the camera is the greater the displacement. I'd guess some confused matrix operations.

by Josh, 10 years ago

Attachment: screenshot0003.png added

Wave displacement

comment:7 by Josh, 10 years ago

Cc: wraitii added

http://trac.wildfiregames.com/raw-attachment/ticket/2692/screenshot0003.png

Last edited 10 years ago by fabio (previous) (diff)

comment:8 by Josh, 10 years ago

Owner: set to wraitii
Priority: Must HaveRelease Blocker

Happening to Gameboy on the forums as well. In January he had a Nvida GeForce GTX 650 on Windows Vista.

comment:9 by wraitii, 10 years ago

To clarify: there only are problems on HQ water, with waves?

I don't really see how my matrixes could be wrong on Linux and right on OSX but I'll look into it.

comment:10 by brian, 10 years ago

"To clarify: there only are problems on HQ water, with waves?"

Yes, as soon as I turn off HQ Water, the waves and all the graphics bugs stop.

comment:11 by wraitii, 10 years ago

Can any of you debug? If so I'd like to know what data gets passed to str_transform in: -renderer/WaterManager.cpp, line 852 -renderer/terrainRenderer.cpp, line 719 -renderer/terrainRenderer.cpp, line 764

comment:12 by Stan, 10 years ago

What do you need ? I have vs2012 near hand, but don't really know how to use it for that purpose.

comment:13 by fabio, 10 years ago

Description: modified (diff)

comment:14 by brian, 10 years ago

Ok, got the debugger working, but I wasn't really sure what values you wanted out of the str_transform. Let me know what you need from str_transform and I'll see if I can get it.

(I am a little confused as that variable doesn't seem to be defined anywhere. It also won't show up properly in my variables pane like all the other ones. I can still view some of its values on the little window provided when hovering over it.)

comment:15 by Stan, 10 years ago

http://i.imgur.com/QNyA7EJ.png Here is another example just in case.

Last edited 10 years ago by leper (previous) (diff)

comment:16 by wraitii, 10 years ago

Stan: That appeared after you raised the water in Atlas, right?

comment:17 by Stan, 10 years ago

Nope Just played around with the camera.

comment:18 by Radagast, 10 years ago

Isn't it too seldom to be a release blocker? If this happens rarely ingame and only occasionally in Atlas, then we should change the release blocker to Must have and Alpha 18.

A17 is great as is, it must not be perfect.

comment:19 by Stan, 10 years ago

It happens for me each time I do something with atlas.

comment:20 by brian, 10 years ago

Seems to be fixed for me on RMS: cycladic_archipelago. Current revision is 15712, but I imagine it was fix a little while ago. I think it required updates to individual map scripts.

comment:21 by Stan, 10 years ago

Not fixed for me at all. I can reproduce the same screenshot than the one above.

in reply to:  21 comment:22 by historic_bruno, 10 years ago

Replying to stanislas69:

Not fixed for me at all. I can reproduce the same screenshot than the one above.

Can you attach your system_info.txt here?

by Stan, 10 years ago

Attachment: system_info.2.txt added

comment:23 by historic_bruno, 10 years ago

Thanks. Both reports are AMD Radeon HDs, one on Linux and one on Windows.

I have an AMD Radeon HD on Windows 7, but so far I haven't seen this bug. It may be I have different drivers or it doesn't affect my card. I found a bug in the new water rendering code (#2784), there's a slight chance that is related, so please test again after that is fixed and a new autobuild occurs.

by Stan, 10 years ago

Attachment: interestinglog.html added

I got some warnings when loading Azure coast

by Stan, 10 years ago

Attachment: screenshot0214.png added

comment:24 by Stan, 10 years ago

I believe this is also because of switchable graphics (HD4000/RADEONHD8750M)

comment:25 by Josh, 10 years ago

I do not have switchable graphics, so that is not the cause.

comment:26 by historic_bruno, 10 years ago

I noticed this last night while testing a map in-game, but it was much less obvious than the above screenshots. It was maybe 1-2 red tiles along a river, that disappeared after moving the camera and I couldn't find a way to reproduce it after that.

comment:27 by Stan, 10 years ago

Azure coast is the worst I can make.

comment:28 by Yves, 10 years ago

Priority: Release BlockerMust Have

We agreed that this problem is important but not severe enough to block the release of Alpha 17.

comment:29 by Itms, 10 years ago

Milestone: Alpha 17Alpha 18

comment:30 by Yves, 10 years ago

This happens when you change the resolution (resize the window, enter fullscreen mode etc.). The waves don't adjust correctly to the new resolution. They appear to be rendered several meters above water level. When change the perspective by moving the camera, it's possible to move them above land and they become red.

by pendingchaos, 9 years ago

Attachment: red_water_patch.diff added

comment:31 by pendingchaos, 9 years ago

Keywords: review patch added
Milestone: Alpha 18Alpha 19
Summary: Waves uncovering red grid[PATCH] Waves uncovering red grid

comment:32 by Stan, 9 years ago

Milestone: Alpha 19Alpha 18

Don't you want it to be reviewed for next release ? :)

comment:33 by wraitii, 9 years ago

From the looks of it the solution is good but It'd need to be updated very slightly, I'll try to do it this afternoon. Could someone on a system that allows resizing check if it does fix the issue?

comment:34 by Niek, 9 years ago

The shore waves are fixed for me, they don't move around anymore.

I still have other issues though (related to water but maybe not exactly the same issue): http://i.imgur.com/LKFaam4.jpg http://i.imgur.com/f31gOiP.png http://i.imgur.com/0ocgary.jpg (this one happens when taking a big screenshot)

I think this particular patch is still worth committing though!

in reply to:  33 comment:35 by leper, 9 years ago

Replying to wraitii: Any progress?

comment:36 by wraitii, 9 years ago

I've thought about it again and there's no reason why it wouldn't work, there's probably a few more places where we could use this resize but I don't have time to check those right now and since this is an important bugfix I'll commit it.

in reply to:  33 comment:37 by historic_bruno, 9 years ago

Replying to wraitii:

Could someone on a system that allows resizing check if it does fix the issue?

You can't resize the window on your system? (that's a problem) I remember that happening to me on OS X, but not the exact circumstances. I think switching fullscreen<->windowed would be enough to test though.

Last edited 9 years ago by historic_bruno (previous) (diff)

comment:38 by wraitii, 9 years ago

Hm, I actually can. I just remembered the old days when OSX couldn't (pretty sure it was an SDL issue) and never tried again :P .

Definitely fixes the issue for me, so I'll commit right away.

Last edited 9 years ago by wraitii (previous) (diff)

comment:39 by wraitii, 9 years ago

Resolution: fixed
Status: newclosed

In 16315:

Add a new function to update the water renderer textures when resizing the renderer window. Patch by pendingchaos.
This fixes #2692 though the same issue might appear in some other cases (possibly Atlas) and those will have to be checked.

comment:40 by Niek, 9 years ago

I did check it with Atlas.

comment:41 by Stan, 9 years ago

Does That fixes red water too ? Wind direction and glitches ?

comment:42 by serveurix, 9 years ago

I still have the bug with the last svn.

small screenshot (in-game) : http://pix.toile-libre.org/upload/original/1423662041.jpg big screenshot : http://pix.toile-libre.org/upload/original/1423662098.jpg

In the game, it appears when I'm moving the camera very fast towards the water point, or under a low angle. On big screenshots it's quasi-invariable as long as there's a bit of water on the picture.

in reply to:  42 comment:43 by Niek, 9 years ago

Replying to serveurix:

I still have the bug with the last svn.

small screenshot (in-game) : http://pix.toile-libre.org/upload/original/1423662041.jpg big screenshot : http://pix.toile-libre.org/upload/original/1423662098.jpg

In the game, it appears when I'm moving the camera very fast towards the water point, or under a low angle. On big screenshots it's quasi-invariable as long as there's a bit of water on the picture.

That's a different issue. This was about coastal waves.

comment:44 by wraitii, 9 years ago

This only fixed the issue that resizing (and a variety of actions close to that) led to buggy water. The red water occasionally is a separate problem that shouldn't happen too often in an "in-game" context, though it should be improved someday.

comment:45 by Itms, 9 years ago

Description: modified (diff)
Keywords: review patch removed
Milestone: Alpha 18Backlog
Priority: Must HaveShould Have
Resolution: fixed
Status: closedreopened
Summary: [PATCH] Waves uncovering red gridWater turning red

I update the ticket then!

Note: See TracTickets for help on using tickets.