Skip to content
This repository has been archived by the owner on Apr 10, 2018. It is now read-only.

don't permanently crossfade patterns #236

Closed
ansis opened this issue Jan 21, 2015 · 8 comments
Closed

don't permanently crossfade patterns #236

ansis opened this issue Jan 21, 2015 · 8 comments

Comments

@ansis
Copy link
Contributor

ansis commented Jan 21, 2015

This is how patterns currently look:

z15
screen shot 2015-01-21 at 2 00 45 pm

z15.5
screen shot 2015-01-21 at 2 01 18 pm

z16
screen shot 2015-01-21 at 2 01 40 pm

At fractional zooms, the pattern is permanently crossfaded. The waves in the z15.5 image aren't clear.

Would it be better to not permanently fade and just show one scale?
For comparison, z15.5 without permanent crossfading looks like this:

screen shot 2015-01-21 at 2 17 36 pm

Whenever a zoom boundary is crossed (from 15.99 to 16) the scale resets to avoid infinitely scaling. We could use timed transitions to make those smooth.

@nickidlugash @edenh @peterqliu

@edenh
Copy link
Contributor

edenh commented Jan 21, 2015

It would be great if patterns were crossfaded the way labels are instead of making the fade relative to zoom level. For example, as soon as z > 2, start fading to the new pattern scale. If necessary, add the equivalent to raster-fade or use the global transition setting to control fade duration.

@nickidlugash
Copy link
Contributor

This sounds good to me.

@peterqliu
Copy link
Contributor

The one upside of zoom-based crossfading, is that any change to the pattern begins and ends with the user's explicit zooming action.

The tradeoff with using time-based fading, is a split-second of pattern shifting after the user has finished zooming. If this transition is long it'll feel like a lag; if it's short, it'll feel like a very sudden jump.

@edenh
Copy link
Contributor

edenh commented Jan 21, 2015

The tradeoff with using time-based fading, is a split-second of pattern shifting after the user has finished zooming.

Labels are faded as you hit specific zoom levels, not after.

@ansis
Copy link
Contributor Author

ansis commented Jan 21, 2015

I was imagining that pattern fading would occur during zoom in the current manner, but snap to the nearest scale when zoom ends.

I think this would be more distracting. What I meant was fading only during a timed transition after crossing a boundary where the scale is reset. For example:

start zooming
z13 - scale 1
z13.5 - scale ~1.5
z13.99 - scale ~1.99
z14 - start fading from scale 2 to 1
z14.5 - middle of fade from scale ~3 to 1.5
stop zooming
z14.5 - scale ~1.5 when fading ends maybe 150ms or whatever after hitting z14

@peterqliu
Copy link
Contributor

@edenh explained it to me via chat as well 👍 sounds good

@jfirebaugh
Copy link
Contributor

Are there spec-side changes required for this or is it purely a renderer change?

@ansis
Copy link
Contributor Author

ansis commented Jan 23, 2015

No spec changes necessary. Implemented:
mapbox/mapbox-gl-js#950
mapbox/mapbox-gl-native#773

@ansis ansis closed this as completed Jan 23, 2015
@jfirebaugh jfirebaugh mentioned this issue Jan 26, 2015
Merged
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants