mapbox/martini

Provide a way to create a mesh with a maximum triangle size

davenquinn opened this issue · 1 comments

davenquinn/cesium-martini#2 reports that Martini-produced meshes covering a significant angular radius appear faceted due to the low number of triangles. This is a major problem at low zoom levels in Cesium.

Right now, I am simply falling back to a height field for low-zoom tiles, but this will not show any topography if, for instance, vertical exaggeration is enabled. It would be preferable if this could be handled in the initial mesh-generation step — would it be possible for Martini to support a "max-triangle-size" optional parameter in getMesh that would force continued iteration until the legs of all generated triangles were shorter?

I could accomplish this with another loop, but it seems overly complex.

would it be possible for Martini to support a "max-triangle-size" optional parameter in getMesh

Sorry for a late response — I think this totally makes sense!