w3reality / three-geo

3D geographic visualization library
MIT License
1.07k stars 178 forks source link

Support for flat terrain without excessive geometry data #19

Closed samipe closed 4 years ago

samipe commented 4 years ago

Hello,

There is an example for a flat terrain, but the implementation is pretty crude - just reseting each vertice's z-position. Could we instead have an option where the PlaneGeometry is not extruded at all but instead consists of 4 vertices? That would greatly help with performance.

j-devel commented 4 years ago

Thanks for the feedback!

an option where the PlaneGeometry is not extruded at all but instead consists of 4 vertices

I would like to keep the API and internal implementation simple. In this case, rather than adding such an option, can it be solved as post-processing?

We can follow this example, where we are composing a sparse THREE.LineSegments representation of terrain parts (in blue). Using the same parameters (tile and proj in

https://github.com/w3reality/three-geo/blob/dd251693b1463fcdee4c11a089fabadb29da640d/examples/heightmaps/index.js#L106-L109

), instead, we could compose a PlaneGeometry textured with the satellite material.

samipe commented 4 years ago

Hi, thank you, will take a look at that!