Skip to content
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

When amplitude is large water can go above faucet #323

Closed
KatieWoe opened this issue Jan 22, 2019 · 11 comments
Closed

When amplitude is large water can go above faucet #323

KatieWoe opened this issue Jan 22, 2019 · 11 comments

Comments

@KatieWoe
Copy link
Contributor

Test device:
Dell
Operating System:
Win 10
Browser:
chrome
Problem description:
For phetsims/qa#264
Likely small and may not be easily solvable. When water is in side view the water splash can be high enough to go over the faucet. This can appear a bit odd.
Steps to reproduce:

  1. Go to Wave Screen, Water side view scene
  2. Adjust the Amplitude to be max
  3. Start waves

Screenshots:
splashabovefaucet

Troubleshooting information (do not edit):

Name: ‪Wave Interference‬
URL: https://phet-dev.colorado.edu/html/wave-interference/1.0.0-dev.66/phet/wave-interference_en_phet.html
Version: 1.0.0-dev.66 2019-01-22 02:30:43 UTC
Flags: pixelRatioScaling
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0
Language: en-US
Window: 1536x760
Pixel Ratio: 2.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: {}

@arouinfar
Copy link
Contributor

arouinfar commented Jan 22, 2019

Nice catch @KatieWoe. During the previous dev test (dev.51) the maximum amplitude was just behind the faucet, and was only occluded slightly for one frame. Without pausing and stepping through, it's not at all obvious that there is any overlap between the water and faucet.
image

In dev.56 through dev.62, the overlapped worsened, and began lasting for several frames.
image

Starting in dev.63 onward, the overlap looks like this:
image

@samreid this behavior is not ideal, though not particularly harmful for 1.0. Can you look into it, and see if you could return the scaling so it's more on par with dev.51?

@samreid
Copy link
Member

samreid commented Jan 23, 2019

Good catch @KatieWoe . This problem was introduced in #315 (comment). When the lattice size increased, I increased the source amplitude to match the prior decay behavior. It is currently set to 120%, noted here:

// The wave dies out more quickly on a larger lattice. At the initial calibration of lattice size = 101 = 61+20+20,
// this was 1.0
AMPLITUDE_CALIBRATION_SCALE: 1.2

@arouinfar can you please advise? Some options:

  • Leave it as it is
  • Move the faucet further away (may look odd when there are two sources). May take 1-2 hours depending on the assumptions in WaterDrop model, or less if we just increase the water drop speed accordingly.
  • reduce the amplitude scaling back to 100% and compensate by recalibrating other factors such as the wave brightness factors and light intensity screen + graph scale factors.
  • your idea here!

@samreid samreid assigned arouinfar and unassigned samreid Jan 23, 2019
@arouinfar
Copy link
Contributor

@samreid I'll go ahead and defer this for 1.0, but I think we should explore this option for 2.0:

reduce the amplitude scaling back to 100% and compensate by recalibrating other factors such as the wave brightness factors and light intensity screen + graph scale factors

@arouinfar arouinfar removed their assignment Jan 23, 2019
@samreid samreid self-assigned this Mar 31, 2019
@samreid
Copy link
Member

samreid commented Mar 31, 2019

Self-assigned for initial investigation.

@samreid
Copy link
Member

samreid commented Apr 1, 2019

If we like the rest of the calibration, perhaps this could be adjusted by simply changing the scale factor for the "side view" water height. @arouinfar do you think that could work? It could save a lot of time over re-tuning brightness/intensity screen/graph/etc.

@samreid samreid assigned arouinfar and unassigned samreid Apr 1, 2019
@arouinfar
Copy link
Contributor

If we like the rest of the calibration, perhaps this could be adjusted by simply changing the scale factor for the "side view" water height.

@samreid that sounds like a great idea! Let's give it a try.

@arouinfar arouinfar assigned samreid and unassigned arouinfar Apr 1, 2019
@samreid
Copy link
Member

samreid commented Apr 1, 2019

getWaterSideY is currently:

return Util.linear( 0, 5, waveAreaBounds.centerY, waveAreaBounds.centerY - 80, waveValue );

If I change that to

return Util.linear( 0, 5, waveAreaBounds.centerY, waveAreaBounds.centerY - 47, waveValue );

Then the water stays right under the faucet, even at max amplitude. However, this squashes the rest of the wave, which may be undesirable. Here is a superimposed image showing original and reduced:

image

@arouinfar is acceptable, or do we need to keep up the wave scale out to the right? Another alternative would be just to rescale the wave values in the vicinity of the source--not globally.

@samreid samreid assigned arouinfar and unassigned samreid Apr 1, 2019
@arouinfar
Copy link
Contributor

@arouinfar is acceptable, or do we need to keep up the wave scale out to the right? Another alternative would be just to rescale the wave values in the vicinity of the source--not globally.

@samreid I think it will be acceptable. After all, earlier dev versions didn't extend above the faucet in side-view (for example, dev.55). I'm not sure we want to disproportionally scale the amplitudes, so I'd prefer to stick to the global approach.

Can you push this change to master so I can test it out?

@arouinfar arouinfar assigned samreid and unassigned arouinfar Apr 2, 2019
samreid added a commit that referenced this issue Apr 2, 2019
@samreid
Copy link
Member

samreid commented Apr 2, 2019

Pushed to master, please review on phettest.

@arouinfar
Copy link
Contributor

Looks good in master @samreid!

@samreid
Copy link
Member

samreid commented Apr 4, 2019

Thanks, closing.

@samreid samreid closed this as completed Apr 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants