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

[style-spec] client-side hill-shading source/layer/properties #4711

Closed
mollymerp opened this issue May 12, 2017 · 4 comments
Closed

[style-spec] client-side hill-shading source/layer/properties #4711

mollymerp opened this issue May 12, 2017 · 4 comments
Labels
cross-platform 📺 Requires coordination with Mapbox GL Native (style specification, rendering tests, etc.) needs discussion 💬

Comments

@mollymerp
Copy link
Contributor

As we prepare to add a new layer type for rendering hill-shading on the client using a tiled DEM, we need to discuss the associated style-spec properties that will need to be added.

The plan right now is to initially release the hill-shading functionality using the terrain-rgb raster tiles as the source.

The properties in @kkaefer's original implementation using encoded DEM in a vector tile feature he added the following properties:

terrain-shadow-color: The color of the terrain that faces away from the light source.
terrain-highlight-color: The color of the terrain that faces towards the light source.
terrain-accent-color: The color used to accentuate rugged terrain with sharp cliffs and gorges.
terrain-illumination-direction: Direction of the light source. Defaults to top left.
terrain-illumination-alignment: Direction of the light source when the map is rotated. viewport or map
terrain-exaggeration: Intensity of the terrain

Now that we have a global light I imagine the last three can be replaced with the global light properties.

Opening this ticket to start discussing naming and additional properties we may need. @andrewharvey has suggested we call this layer type hillshade and save the terrain layer type for use with 3d mesh terrain (feature request #1489 )

cc @mapbox/gl @mapbox/cartography-cats

@mollymerp mollymerp added cross-platform 📺 Requires coordination with Mapbox GL Native (style specification, rendering tests, etc.) needs discussion 💬 labels May 12, 2017
@ajashton
Copy link

call this layer type hillshade and save the terrain layer type for use with 3d mesh terrain

+1 to "hillshade". FWIW our current use of "terrain" (as in "Mapbox Terrain") refers to the combination of elevation (incl. hillshade) and landcover information.

@1ec5
Copy link
Contributor

1ec5 commented May 13, 2017

Now that we have a global light I imagine the last three can be replaced with the global light properties.

That would be ideal. It’s difficult enough for a developer using the runtime styling API to visualize the light object’s position value; finding an appropriate corresponding value for terrain-illumination-* would be even more frustrating.

Should light object’s color value also influence the hillshading colors too?

terrain-exaggeration: Intensity of the terrain

Could this exaggeration be expressed in relation to some real-world unit? What is the default value, and how would we describe its effect on the hillshading?

@kkaefer
Copy link
Member

kkaefer commented May 15, 2017

+1 to "hillshade"

I used "terrain" intentionally because it's more than "just" hillshading in that it includes openness. However, I can see that "terrain" is too broad and overloaded, so I'd be okay with "hillshade" even if it doesn't tell the whole story.

@andrewharvey
Copy link
Collaborator

This has been done in #5286

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cross-platform 📺 Requires coordination with Mapbox GL Native (style specification, rendering tests, etc.) needs discussion 💬
Projects
None yet
Development

No branches or pull requests

5 participants