-
Notifications
You must be signed in to change notification settings - Fork 6
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
Small blocks don't bounce and look odd #67
Comments
you are right, it looks very strange. I am playing with the prototype version of the website and it has a better behavior respected to this. I think that probably was some modification related to #37 and/or #33. @jonathanolson, can you review it? |
I've added three query parameters above: // Controls the proportional amount of overall result viscosity forces applied
viscosityMultiplier: {
type: 'number',
defaultValue: 1
},
// A mix between 0: Full viscosity is applied when any part of a mass is in the liquid, 1: The viscosity effect is
// multiplied times the proportion of the mass submerged (lowering viscosity when partially submerged).
viscositySubmergedRatio: {
type: 'number',
defaultValue: 0
},
// Viscosity for masses larger than this will be reduced to the force for this viscosity (somewhat of a hacK)
viscosityMassCutoff: {
type: 'number',
defaultValue: 2
} I demoed effectively |
I already play with the parameters and the one that I like most how to generate the bouncing was viscosityMassCutoff. I use the value of 0.5 like it is in this link and I like the behavior for small and big blocks with low density in water: |
by slack @jonathanolson commented that it used to be the previous value before it was changed based on one of the issues #37. Reviewing the comments in that issue @arouinfar and I agree that the behavior was acceptable, and we can use viscosityMassCutoff as 0.5. But this opens a problem with the common code between Density and Buoyancy because the behavior of low dense blocks in fluids with high density has issues. Like is shown in the gif, the less dense block starts to bounce by itself: @jonathanolson suggests finding a solution that fits both sims. And some of the options are:
the problem is that not only the explore screen allows objects with super small density. The empty bottle gets lost in the Applications screen with the denser fluid if we push it inside the fluid and then drop it. The bottle just jumps outside the pool and not come back (at least in the time that took me to write this issue, that mean minutes): My suggestion is to add in this situation a "return object" pop op screen probably, because we are not going to find a value that works for all the cases, with a sim ta allow so extreme values. |
During the last design meeting, it was discussed the idea to limit the max velocity that a block can get when it goes out of the water, making that denser blocks go faster to the equilibrium. @jonathanolson is going to play with that option. |
I limited the max velocity to 5. @DianaTavares can you try it out? |
It works perfectly for Density! I think that the behavior for the Explore screen in Buoyancy is very good, but in the bottle screen still jumping the bottle for a long time. I think that this behavior is acceptable and we can go with these values. I just want to present it today in the design meeting for second voices. |
In the design meeting, we agree that this behavior is good! |
Implemented the cutoff, can you verify things look good? |
it is looking perfect, thanks!! |
Test device
Dell
Operating System
Win 10
Browser
Firefox
Problem description
For phetsims/qa#663. May be connected to #37 and/or #33.
When you drag a large block with a small density to the bottom of the pool and let go, it shoots up and bounces a bit. This looks alright and seems to behave fine. However, if the block is a smaller size with the same density, they move up and stop more abruptly, and it looks a bit odd.
Visuals
Troubleshooting information:
!!!!! DO NOT EDIT !!!!!
Name: Density
URL: https://phet-dev.colorado.edu/html/density/1.0.0-dev.16/phet/density_all_phet.html
Version: 1.0.0-dev.16 2021-06-22 15:36:28 UTC
Features missing: touch
Flags: pixelRatioScaling
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0
Language: en-US
Window: 1280x675
Pixel Ratio: 1.5/1
WebGL: WebGL 1.0
GLSL: WebGL GLSL ES 1.0
Vendor: Mozilla (Mozilla)
Vertex: attribs: 16 varying: 30 uniform: 4096
Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32)
Max viewport: 32767x32767
OES_texture_float: true
Dependencies JSON: {}
The text was updated successfully, but these errors were encountered: