wave-harmonic / crest

A class-leading water system implemented in Unity
MIT License
3.47k stars 479 forks source link

Static lighting sky and foam bubbles create weird square shapes #671

Closed CheoCD closed 3 years ago

CheoCD commented 3 years ago

Hello, I'm currently using Crest HDRP in an empty project on Unity 2020.1.8f1 with HDRP 8.2.0. The following issue happens in both the editor and a build, and I'm using Windows and a GTX 1070.

When a static lighting sky is set through an environment profile in the lighting panel, square shapes are created in the ocean as shown by the images below. The strength and color of those shapes are determined by the "Foam bubbles coverage" and "Foam bubbles colour" values in the default "Ocean" and "Ocean-Underwater" materials - setting the foam bubbles coverage value to 0 or the color to black removes the shapes.

Crest1 Crest2 Crest3

I hope this bug report will be useful and that you will be able to solve this issue :)

daleeidd commented 3 years ago

Thank you for reporting.

I have removed HDRP since it is an issue for all pipelines.

The issue is that foam bubbles requires a higher mesh density (mesh density is affected by the detail params Lod Data Resolution and Geometry Down Sampling Factor) to look good at that distance. This shouldn't be the case as we want visual quality to be consistent. This can also happen when close to the surface if the mesh density is low enough.

We will have to investigate further. But for now I recommend scripting the foam bubble coverage (might have a different name for HDRP) so that no foam bubbles are shown when the camera is at that height.

huwb commented 3 years ago

It might help to tweak the foam bubble texture scale - the texture itself should ideally help break up the regularity of the mesh triangles.

daleeidd commented 3 years ago

Fix will be out for 4.13

daleeidd commented 3 years ago

4.13 has been release. Thank you for reporting.