heremaps / tin-terrain

A command-line tool for converting heightmaps in GeoTIFF format into tiled optimized meshes.
MIT License
584 stars 127 forks source link

meshing should have a --max-faces parameter #4

Open cleeus opened 6 years ago

cleeus commented 6 years ago

Renderers are facing practical limitations for the number of triangles they can render per scene. Instead of tuning the --max-error parameter until that limit is met, we should add a --max-faces parameter that guarantees a maximum number of faces per tile/dem.

Both terra and zemlya can trivially be extended to stop increasing the number of faces when a certain number is reached.

walkingpendulum commented 4 years ago

is there any chance to make this feature happens?

walkingpendulum commented 4 years ago

hey everyone! we implemented similar feature for dem2tin subcommand for our inner purposes and now we'd like to share code with community. kindly asking for feedback here. thank you in advance

yesitsme007 commented 4 years ago

Sounds like a useful feature, would be great to have this. In my use case I would like to model an area from a "central" point and then have decreasing resolution proportional to the distance. E.g. you are on the summit of a mountain and want to model the view. You would like to have many faces in the closer areas and only a few in far away zones. Any thoughts? Is this a very special use case or of more general use? I could think of some kind of -gradient flag.

walkingpendulum commented 4 years ago

PR with or implementation: https://github.com/heremaps/tin-terrain/pull/66