-
-
Notifications
You must be signed in to change notification settings - Fork 478
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
Foam / wake vibration when approaching whirlpools #1123
Comments
Flow does cause pulsing artefacts. Is that what you are seeing? I will need a video to understand if it is not too much trouble. |
I will get some video. |
Videos are low res and broken up to support upload. This first one is the scene more or less following the repro steps: 2023-06-24.07-53-40_2.mp42023-06-24.07-53-40_3.mp4This one is with an actual physics objects / boat stuff happening. 2023-06-24.07-53-40_5.mp4This is something new I am pretty sure, it did not used to do this. |
Thanks. I wasn't able to reproduce it myself. Not sure what it could be. Have you changed any of the simulation settings files (Foam or Dynamic Waves)? There is a simulation frequency setting for both that may help. What is your frame rate? |
The framerate for these in game is ~60FPS. I believe the framerate in the example scene is unbound so it was probably ~300fps. The only settings I changed in the boatwakes scene was zeroing out the spectrum for the waves to make it easier to see and adding whirlpools on empty game objects where I moved around and changed the radius. I was able to verify this is some sort of regression, I ran the same test with the BoatWakes scene in crest version 4.15 (same unity version) and everything is nice and smooth as it gets sucked down into the whirlpools. It seems reproducible on multiple computers with 4.17. Here is some more video comparing the 2 versions. As far as I can tell both of these have the same settings and are unaltered from the branch, with the exception of the spectrum and addition of whirlpools. The only difference I noticed is that the whirlpools do not appear until playback has started in 4.15 4.15 (smooth): 415.mp4417.mp4 |
Thanks. I was able to reproduce it only intermittently. Some machines were harder than others. I was able to reproduce a more subtle jitter reliably 4.17 and 4.15. Not sure if that means 4.15 will reproduce the less subtle case or not. Are you able to reproduce the more noticeable jitter case (like the red plane video) reliably? I agree that it may have something to do with SWI and flow together. Since SWI queries flow I think it has to do with queries. I will see if I can get a reliably reproducible together at some point. |
That is good news, thanks. I'm not concerned with 4.15 except as a comparison. 4.17 fixed a lot of other issues so I'm probably going to stick with it and continue updating as needed. I think there is subtle jitter in 4.15 in general, but not as extreme (that I noticed.) and it did not appear in any game builds.
Yes. Its 100% of the time in the current build with 4.17. The BoatWake scenes is about 90% of the time. I am happy to try out any available fixes / branches in the future and / or get it thoroughly tested.
|
Yeah, it is more about getting a more reproducible case. I am not having much luck and starting to doubt previous findings.
Is that Dynamic Waves? Foam also has a simulation frequency. Have you tried increasing it to 120 too? Everything seems related to simulation frequency so far for me. This will be especially the case at high speeds. |
I attempted to adjust both of the sliders related to simulation frequency. They seemed to have little affect on the jitter. The only time the jitter ever stopped was when flow was turned off in some form. |
I looked at this some more and I noticed something odd and something else useful. What was odd was that after closing the crest project and opening it later (today), it was much harder to see any jitter. I had to play around with a bit to even see a hint of what I saw before. I noticed when I was trying to figure out where there jitter went that by removing the camera from the wake rig, the jitter seemed less, so I used a free moving camera and placed some spheres around a new whirlpool and everything seemed mostly fine. So I checked in game and it does seem related to movement in some way. It does not occur when boats are kinematic. Could be related to velocity. I was able to narrow this down a bit more specific. I created a sphere with a foam override that also has a CrestSimpleFloatingObject on it. I placed it in the BoatWake scene and it seems fine spinning around the flow of the whirlpool. I placed an identical object in game and it freaks out like the boat does. So now I can only assume there is something different. A settings somewhere... something that changed from 4.15 -> 4.17 I copied the entire ocean from BoatWake into the problem scene and the issue still occurs. I am going to have to start picking things apart to see when the problem stops I guess. The more I examine this the less it seems to make sense. I added a sphere with foam override at the same time the boat was having issues and it seemed to make things smoother. Removing the sphere seemed to make it worse, seems to indicate a timing issue to me or some sort of rendering out of order. The camera in the demo scene is using Update to move the camera around, my camera is using LateUpdate. Changing camera to use Update (which is not really an option) does not make it smooth however copying the Demo camera into the scene seems to be slightly smoother for some reason. It feels like I am chasing the symptoms of a different timing issue upstream related to changes from 4.15 -> 4.17 as I cannot pinpoint any one thing causing the problem and it seems unrelated to any configuration of the Ocean given that the example one has the same issues. To confuse matters even more I am no longer able to reproduce jitter in the boat wakes scene even though I was able to this morning and previously. |
@daleeidd Were you able to reproduce this? |
Here is a repro scene modifying the BoatWakes scene. Move the camera around and follow the cube. Its a bit goofy setup, but it took a while to repro in latest. |
I don't believe I was able to reliably reproduce it before, but I could with your scene. Just to confirm the issue, is it only related to physics objects? Applying interpolation to the rigid body to the repro seems to be a pretty good workaround. |
Excellent, glad you are able to see the issue now. It does seem directly related to being tied to a physics object and flow/foam. PhysX Interpolation is not an option and does not resolve the problems at runtime or in my project. Override foam on "static" objects or transform based movement seems to have less issue. One bizarre note about this I have been seeing off an on is that solutions can be inconsistent, for example interpolation may momentarily appear to solve the issue the same way that reducing the flow speed or changing some other setting will, but it quickly goes back to vibration foam. Similar things happen when adding new foam to the scene or removing them while attempting to troubleshoot, almost seems like it changes the timing for the better momentarily, couldn't say for sure. I would say its some sort of timing / update issue that is revealed by FixedUpdate behavior of some sort. Something in the execution order is moving the foam/flow back to where it was or predicting its location erroneously. |
Any updates on this? |
No. I noticed Follow Horizontal Motion is disabled for the foam input. Does enabling change anything? |
It does not appear to have an affect. |
Is there an existing issue for this?
Have you checked the documentation to resolve your problem?
Current Behavior
If a boat or other object approaches a whirlpool (in various configurations) as the foam or wake begins to touch the spiral / flow the rendering of the foam will beginning shake and / or vibrate from its current position as it is sucked into the flow of the whirlpool
Expected Behavior
As the boat wake approaches the whirlpool and is sucked it, the foam should appear to move smoothly with the flow of the whirlpool as it is sucked in.
Steps To Reproduce
Note: The shakiness may not always be immediately apparent but it can be much much worse at times. Given this image below (obviously not shaking because it is a still frame) the vibration in the render occurs at the forward most edge of the foam on the right. Depending on how things are configured the entire foam cap inside the flow will vibrate
Unity Version
2021.3.26f1
Crest Version
4.17.3
Render Pipeline
Built-In
Editor or Standalone
Editor (Edit Mode), Editor (Play Mode), Standalone
Environment
- OS: Windows
Anything else?
I am fairly certain this used to work in an older version (4.15.2 maybe), I recently updated my version and resolved many of the other issues I had mentioned previously. I was unable to mitigate this behavior by tweaking the settings of the whirlpool other than setting the eye radius to 0 which is not really a solution.
The text was updated successfully, but these errors were encountered: