tentone / geo-three

Tile based geographic world map visualization library for threejs
https://tentone.github.io/geo-three/docs/
MIT License
657 stars 105 forks source link

Possible way to handle seams between tiles #1

Open mattrei opened 3 years ago

mattrei commented 3 years ago

You have published a really neat library where the results look very promising.

However I have just a remark, that the seams between the tiles are quite strong. There should be some interpolation be made between the tiles so that everything is much more fluid. Like this recently developed library named map33.js does it within its own shader material (see code here.

Maybe that's something you could also try to include (or me in a PR ... haha)

tentone commented 3 years ago

Hello

Thanks a lot. That library seems to do a good job handling those seams but all tiles there have the same resolution.

I have already implemented a solution to handle the interpolation between tiles i still need to figure out a fast way to constantly recompute neighbors for every tile after subdivision to readjust the seam interpolation after subdivision.

One of the problems with the seams in this library if the fact that I'm trying to puzzle together tiles from different resolution levels so i have for example to interpolate one bigger tile with smaller ones.

Another thing that i want to add is the possibility of using GPU generated height by unpacking the height values on the GPU. I still want to keep the CPU generated mesh as an option for easier interactivity by using for example raycasting.

Thanks a lot for the suggestion.

I will take a look and try to solve most of these problems as soon as possible.

Cheers!

mattrei commented 3 years ago

hi, ok, you are the expert! Thx for the explanation. Cessium.js does a fine job here, however there is also a huge team working behind...

Concerning the GPU picking method, its a huge performance booster and is normally integrated with ease, see my terrain library for A-Frame here .

Looking forward to your solution.

farfromrefug commented 3 years ago

@tentone there might be a quick way to solve this at least temporary. The idea is to add a skirt https://github.com/visgl/loaders.gl/issues/712 I think it could be fairly easy to add in MapNodeGeometry. Those skim points would simply need to have a normal of 0,0,0 or any factor to define the height for the skirt. I tried to to do it but i could not have the points in the right order :s Maybe you could look at that?

tentone commented 3 years ago

@farfromrefug

It could be a solution to use skirts, i have been trying to avoid implementing them but seems to be the fast solution for the problem.

I will try to take a lookt at it.