GithubHelp home page GithubHelp logo

Comments (11)

klauskobald avatar klauskobald commented on June 7, 2024

Sorry! I found the problem.
I was scaling the object with the spline by a factor of 4, for testing. That screwsed up the thing.
Setting all to 1 solved the problem!

from crest.

klauskobald avatar klauskobald commented on June 7, 2024

Unfortunately it is still not really solved. I made some tests:
This is a sphere moving at a speed of 6 thru not flowing water:
image

And this is a sphere sitting still in a water flow of 6
image

It generates way less waves in the moving water. I have put the same FFT wave settings onto the flow component.

Overall the waterinteractions produces way less waves inside a flow area.
Any advise?

Another thing I found out is that the SphereWaterIteraction.VelocityOffset works on the world speed of the object. This is wrong! It has to use the relative speed thru the water, right?

from crest.

klauskobald avatar klauskobald commented on June 7, 2024

Better images:
Flow: OFF
image
Flow: ON
image

Same relative speed of 6.
Seems also to be a difference in the created foam.

from crest.

daleeidd avatar daleeidd commented on June 7, 2024

Yeah, that doesn't seem right. I would think it would be stronger if anything but I could be wrong. If you disable the following line it does a bit to keep the interaction strength - can go even further by changing it to an add to increase the interaction strength:

relativeVelocity -= new Vector3(surfaceFlow.x, 0, surfaceFlow.y);

I don't know if this will be the actual solution as going against something that seems intentional but worth a test anyhow. LMKWYT

Another thing I found out is that the SphereWaterIteraction.VelocityOffset works on the world speed of the object. This is wrong! It has to use the relative speed thru the water, right?

That makes sense and will look into it.

from crest.

klauskobald avatar klauskobald commented on June 7, 2024

Yes! That's it. Looks right to me! Please do not forget to change this for the next update!

from crest.

kyleli avatar kyleli commented on June 7, 2024

Unfortunately removing that line or adding the surfaceFlow vector to relativeVelocity creates a new issue where the interaction sphere effect begins to compound on itself over time when no input is applied. This is what happens when you remove the line with a flow of 9 and do not add any input to the spheres (just let it move with the flow).

Screen.Recording.2023-11-20.at.9.06.30.AM.mp4

This is the behavior normally without removing or adding the surfaceFlow vector, note the lack of amplified interaction sphere forces:

Screen.Recording.2023-11-20.at.9.10.19.AM.mp4

I do believe that the issue might stem from taking the world object speed and not relative speed.

Edit:
Upon further testing this unwanted amplification occurs at any flow rate. You can reproduce by setting a curve with flow, placing an interaction sphere with no further inputs in the flow, and disabling the following line:
relativeVelocity -= new Vector3(surfaceFlow.x, 0, surfaceFlow.y);

Ideally the behavior should replicate wakes similarly between non flow and flow elements with the same interaction settings.

from crest.

daleeidd avatar daleeidd commented on June 7, 2024

Thanks for the additional input. I will look into it further and see if I can come up with something.

from crest.

daleeidd avatar daleeidd commented on June 7, 2024

I had a harder look and the velocity calculations are correct.

There is an issue where wakes do not work very well at higher velocities which flow can contribute to and may be related in certain cases.

There is certainly a diminished wake in flow. I am not sure how SWI should behave in flow and whether this is correct or needs fixing. It may take a while before a conclusion on that.

For the time being I think the loss of wakes can be compensated by modelling the boat's propulsion system and further compensated with water spray as the boat will have to work harder against flow to maintain velocity.

from crest.

daleeidd avatar daleeidd commented on June 7, 2024

Alright... so wakes are far more diminished when flow is not axis aligned. When axis aligned it is pretty close to expectations.

from crest.

kyleli avatar kyleli commented on June 7, 2024

I had a harder look and the velocity calculations are correct.

There is an issue where wakes do not work very well at higher velocities which flow can contribute to and may be related in certain cases.

There is certainly a diminished wake in flow. I am not sure how SWI should behave in flow and whether this is correct or needs fixing. It may take a while before a conclusion on that.

For the time being I think the loss of wakes can be compensated by modelling the boat's propulsion system and further compensated with water spray as the boat will have to work harder against flow to maintain velocity.

I do actually agree with this, I was doing thinking as well and flow should definitely dampen the effect of SphereWaterInteractions, however I think the current iteration of flow is neutering this far too much to where at any flow above
certain values completely removes any impact of a sphere interactor e.g. in flows of 5 or above. If we refer to even shallow rapids we can see a noticeable impact of the watercraft e.g. https://youtu.be/FW8c75CUBGU. Perhaps the impact of water interactions in flow should be a tunable setting on the flow side?

from crest.

daleeidd avatar daleeidd commented on June 7, 2024

e.g. in flows of 5 or above

Fastest river speed would be around 3MPS (in rare cases almost 5MPS). Flash flooding is around 7MPS.

This will take a while to solve properly as there is potentially various factors.

As for increasing the weight of SWI in flow that is a possible workaround. I made a branch you can try: fix-weak-flow-swi-interaction

from crest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.