Re:Show HN: Map33.js – a library to build 3D maps with Three.js
by somishere on Tuesday July 07, 2020 @08:46PM
(#23765891)
Yeah, Martini seems promising. Yet to implement at map scale which is why I was interested if you'd tried already!
The RTIN processing itself is very straightforward / lo-rent ... that said, if you were optimising the DEM tiles on the fly you'd probably refactor / integrate the two processes to save some loops. Dropped into a service worker (or WASM) I'm guessing it would be reasonably performant. Though perhaps meshoptimizer is more flexible with mesh dimensions?? (rtin is limited to a 2^nish grid)
With that in mind had you considered zooming out for your dem only, so as to lower the heightmap resolution (but leave the env map as is)? Maybe you're already doing that?
Re:Show HN: Map33.js – a library to build 3D maps with Three.js
by somishere on Tuesday July 07, 2020 @08:57PM
(#23765939)
Actually here's a similar demo I put together in 2017 using heightmap only .. it's low-res, stitching together higher-altitude DEMs, but actually fairly performant without any trickery. You can zoom in on a section by drawing on the rendered tile on the left.
Re:Show HN: Map33.js – a library to build 3D maps with Three.js
by kylebarron on Tuesday July 07, 2020 @07:14PM
(#23765318)
I'd be really interested in seeing performance comparisons with Martini!
I actually opensourced this code at https://github.com/blaze33/dem2mesh, just have to use dem2mesh.png2mesh which given a png data, computes the heightmap, builds a mesh, simplifies it and return the data to javascript. (can be tricky though to deal with wasm)