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

[HDRP] Horizon line issue #456

Closed
huwb opened this issue Mar 31, 2020 · 23 comments
Closed

[HDRP] Horizon line issue #456

huwb opened this issue Mar 31, 2020 · 23 comments
Milestone

Comments

@huwb
Copy link
Contributor

huwb commented Mar 31, 2020

Describe the bug
Sometimes a visible line appears at the horizon.

In the screenshot below there is a horizon line both above and below water. We may find these are two separate issues and break them out accordingly.

Screenshots / video
image

Versions
2019.3 HDRP

To Reproduce
How can the developers reproduce this bug? Are you able to reproduce the issue in the example content/scenes?
Please include steps to reproduce the behaviour, with the example content ideally so we can follow the steps on our side.

Platform
Editor or standalone? Platform (win/mac/...)

Hardware
What hardware are you seeing the issue on? GPU model is particularly useful.

Additional context
Add any other context about the problem here.

@daleeidd
Copy link
Collaborator

daleeidd commented Apr 2, 2020

It is very difficult to reproduce in the main scene with the provide ocean renderer settings. But if you reduce the quality (like reducing the LOD resolution to 256) it is much easier. So this could be a seam where the tiles end and the extents meet?

@daleeidd
Copy link
Collaborator

daleeidd commented Apr 2, 2020

Screenshot (138)
Game View

Screenshot (137)
Scene View

I set the LOD to 256. That is also the default value. But the main scene is set to 384.

This is probably the issue for the underwater post processing branch for built-in too.

As part of an effort to improve usability, maybe we could scale other values with Lod Data Resolution to prevent seams? Not sure which values will help or if it is feasible since it might be game resolution dependent. Or some quality presets that we know work well.

@huwb
Copy link
Contributor Author

huwb commented Apr 2, 2020

Oh so there are legit cracks in the water surface?? Ok.

I've had it on projects that precision errors generate cracks like this. Sometimes just scaling the tiles by 0.5% more effectively covers this stuff. However i think id like to take a closer look at hte above is it could be abug, or something that could be improved in the vert shader.

@skaughtx0r
Copy link
Contributor

skaughtx0r commented Apr 3, 2020

This bug (lines at the horizon) is not limited to HDRP, I've been noticing this in the Standard pipeline version as well. One of my game's users said that turning off MSAA fixed it...

I mostly see it through Unity terrain, its hard to capture because it's flickering. Here's a short video clip: https://youtu.be/baueQpZh0OQ

It's at the very beginning of the video.

@moosichu
Copy link
Contributor

moosichu commented Apr 4, 2020

Isn't this caused by the underwater post-process effect? It was one of the reasons why it hadn't been merged-in for BIRP, but we had never seen it in HDRP ourselves.

Basically, the problem is that the post-process effect depends on a contiguous mask in order to know where fog should be applied - any seams in that mask will result the post process effect either being applied where it shouldn't be (if you are above water) or not being applied where it should be (if you are under water).

@skaughtx0r
Copy link
Contributor

Oh, yeah, I'm using the underwater post-process branch, so that is likely the issue I'm seeing.

@banan5555
Copy link

banan5555 commented Apr 6, 2020

Hi, I've made a short video to show that the LOD scale on my scene is similar to that from demo scenes, and the problem seems to occur due to lack of some of the tiles. From the underwater, the horizon changes from blue to transparent.
http://youtu.be/VFyJtQRVQWg

@daleeidd
Copy link
Collaborator

@huwb I have created test/lod-chunk-gaps which positions the camera to show the gap. I set the LOD resolution to 256 since it is easier to reproduce that way. I found that increasing the chunk size by 0.1 covered the gap.

Gap

Just use the scene camera to view the gap up close.

@daleeidd
Copy link
Collaborator

@banan5555 Thanks. Do you still see the thin horizon line if you set the Geometry Down Sample Factor to 1?

@banan5555
Copy link

@daleeidd Yes, with Geometry Down Sample Factor set to 1 still have this line:
crest-horizonline-issue3
crest-horizonline-issue4

@daleeidd
Copy link
Collaborator

daleeidd commented Apr 22, 2020

@banan5555 Thank you. One last thing hopefully. Would it be possible for you to take the scene view camera over to where the line is? If it is a similar issue to what I have found then it shouldn't be too far away (maybe a 500 metres).

@banan5555
Copy link

banan5555 commented Apr 22, 2020

@daleeidd no problem. There is no gap in place where last 2 tiles are connected:
image
But after that I realized that scene camera don't use 'Crest.UnderwaterPostProcessHDRP' so i disabled it in HDRP settings and now line is gone. So this issue is related to underwater post process istead of tile geometry.

@daleeidd
Copy link
Collaborator

daleeidd commented Apr 22, 2020

Thanks for doing that. It might be a different issue then. The one I can reproduce is a gap in the tiles as per the images I uploaded. The gap itself isn't caused by the underwater effect, but rather the underwater just makes it more visible since it relies on the tiles having no gap. It should be visible from the scene view if the scene view is taken to where the camera is looking and the line issue is visible in the game view camera. It might be possible that the selection outline is covering it.

@daleeidd
Copy link
Collaborator

@banan5555 what value is your far clip plane? Does increasing it make a difference?

@banan5555
Copy link

banan5555 commented Apr 22, 2020

@daleeidd far clip plane 6000, but i check right now with different values and issue was on all of them. In one of tests I notice that line is moving:
https://youtu.be/Hzxku50E5wg

With different far clip plane values it shows with different rotations, with near clip plane set to 1 it is very hard to reproduce but this value is unacceptable for us. I made video maybe you will find anything here:
https://youtu.be/7yHGE_-9ra8

@daleeidd
Copy link
Collaborator

Thank you. I appreciate your assistance.

@banan5555
Copy link

I attached RenderDoc snapshot in different thread:
#479 (comment)

@moosichu
Copy link
Contributor

PR #484 should help with this as well.

@huwb
Copy link
Contributor Author

huwb commented May 16, 2020

Hi all, it seems like at least some horizon line issues are related to the ocean not covering the extents of the camera frustum which is currently a requirement.

If you are seeing a horizontal line above/below water at the horizon could you try experimenting with the far clip plane of the camera - does reducing it help?

If it does then this is one solution, and an alternative solution is to increase the area covered by the ocean which we can discuss.

@banan5555
Copy link

banan5555 commented May 16, 2020

@daleeidd far clip plane 6000, but i check right now with different values and issue was on all of them. In one of tests I notice that line is moving:
https://youtu.be/Hzxku50E5wg

With different far clip plane values it shows with different rotations, with near clip plane set to 1 it is very hard to reproduce but this value is unacceptable for us. I made video maybe you will find anything here:
https://youtu.be/7yHGE_-9ra8

Hi @huwb , far clip plane does not reducing it as I comment 24 days ago. In second video you can see that I test 10000 far clip plane and it not fix issue.

@huwb
Copy link
Contributor Author

huwb commented May 16, 2020

Ah fair thanks. After i posted the above that Tom also noted the same, apologies for the noise here. Tom has a fix of this that we're reviewing/testing for the next release.

@moosichu
Copy link
Contributor

PR #402 has been merged and has also been ported to HDRP so should be available soon, will close this issue when the HDRP release with this fix has landed.

@daleeidd daleeidd added this to the Crest 4.2 milestone May 22, 2020
@moosichu
Copy link
Contributor

This should be fixed it the latest HDRP release (although #479 still happens).

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

No branches or pull requests

5 participants