crest: Sporadic gaps / precision errors in tiles.
Is there an existing issue for this?
- I have searched the existing issues.
Have you checked the documentation to resolve your problem?
- I have read the linked documentation and could not resolve my issue.
Current Behavior
Occasionally (maybe over the course of hours) a single frame will create a gap in the tiles or parts of the ocean will be missing and then reappear the next frame. It seems unrelated to settings, it is possible its tied to camera movement.
Expected Behavior
Nothing should happen and no ocean tiles should disappear
Steps To Reproduce
- Open “BoatWakeScene” and play
- Fly the camera around near the surface of the ocean and rotate as desired
- Eventually you will see a very long slice of the ocean disappear and then reappear.
Unity Version
2021.3.26f1
Crest Version
4.19
Render Pipeline
Built-In
Editor or Standalone
Editor (Edit Mode), Editor (Play Mode)
Environment
- OS: Windows 11
- GPU: NVIDIA
- Graphics API: DX11
Anything else?
I want to say that this happens most often right after you start the editor / exe and move around low to the ocean, but its hard to see. I have seen it happen long into a session so the cause is not known.
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 37
I was able to capture the exact position information for the ocean and the camera when it occurred: Frame Before:
Frame During:
Frame After:
I was not able to force the transform information for the gap to reproduce the problem. Hopefully you find this information more useful.
@daleeidd Here is an info dump of what I have been investigating. I just ruled out camera distance (far clipping) as a cause. I am hoping this may help lead to a solution to this.
Knowns
:OceanGridPrecisionErrorschanges does not prevent gapsSnapAndTransitionVertLayoutdoes not helpminRadiusto0.499has no affectminRadiusto0.26has no affectSnapAndTransitionVertLayoutbeing appliedminScaleandmaxScaleare the same)SnapAndTransitionVertLayoutnot moving verts too farGuesses
SnapAndTransitionVertLayoutSnapAndTransitionVertLayoutis unable to account for a gap becauseoffset.xoroffset.yis unexpectedly larger thanminRadiusNot sure what else to look at. If it is in fact some sort of rounding error that results in the loss of 0.01 in any direction the results for that frame will be wrong and I am not sure there is any way to correct that without changing the way that tile grid snapping happens or how vert offsets are done. It seems to move them pretty far, very frequently. At any moment the position could be just right to produce a rounding error that
SnapAndTransitionVertLayoutcannot handle, which may be why it seems so random. (thinking out loud) My brain is a bit melted from looking at this, I sorta feel like if there was some way to not update the verts every frame at least for snapping this would disappear. Obviously there are gaps without connecting the tiles. There may be a way to do something similar when creating the mesh so that it is connected, but does not have to snap those edges all the time (would probably cause other problems).Here is a video of 2 gaps occurring at once which I had not seen before, but it is interesting they both happened at the same time. This occurred while I had the view distance set to 10000 to see if having it too high was the cause.
https://github.com/wave-harmonic/crest/assets/114962753/72721d93-49e1-4e17-8bc5-2087b8083368
Frame:
Thanks for letting me know. That should help narrow down a solution. And good to hear you have a workaround.
That’s okay. Thank you for your help so far.