Skip to content

Conversation

karimnaaji
Copy link
Member

@karimnaaji karimnaaji commented Oct 11, 2017

  • Polygons UVs are mapped to the tile coordinates, meaning that if a polygon is covering the whole tile area, its UVs would range from 0 to 1. This seems to be a fairly good use case in order to use heightmap or have contiguous textures between tiles:

screen shot 2017-10-11 at 15 59 02

  • Side of the buildings have coordinates stretched to their faces, as this can be used for specific use cases, I think that we would benefit from having another option here to make the UVs be appropriately scaled based on the width and height of those polygon sides:

screen shot 2017-10-11 at 15 57 13

  • The polygon and polyline builder now have different extrusion option: top, top and sides, sides, none. This gives enough granularity at the filter level in order to assign materials to different part of a polygon (for example generating a building with a material associated with its wall faces and a different one for the top). In the current PR the material is at the layer filter level, after testing this for a bit it appears more natural to selectively apply material at the builder extrusion option level, so a material could directly be applied without too much work while authoring the filters, this part is subject for change.

  • Polylines have their UVs continuing between different part of the polyline, and are stretched based on the polyline width. This covers some straight use cases like applying a repeating pattern to road networks:

screen shot 2017-10-11 at 14 54 42

This PR supersedes #56 .

TODO:

  • Potentially add an option for polygon UVs to 'map' the uvs between the bounding box of the polygon and interpolate the UVs in that range instead of mapping it to the tile coordinate, this would affect the top of the polygon only.
  • Associate material with the extrusion option for filter authoring ease.
  • Update earcut binaries for other platforms

@karimnaaji
Copy link
Member Author

Build is failing because of new API usage for network IO. Depends on #57 .

@tallytalwar
Copy link
Member

@karimnaaji you can rebase the PR now.

@karimnaaji karimnaaji merged commit 9720ddd into master Oct 24, 2017
@karimnaaji karimnaaji deleted the constant-uvs branch October 24, 2017 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants