Better HN
topnewbestaskshowjobs
Log inSign up

Comment

by mourner · 7y ago · 0 comments

Author here — thanks for checking this out, everyone! Happy to answer any questions in comments.
Comments
spython7y ago
Not a question about the mesh generator, but if I want to create a (leaflet or mapbox) map that uses raster images as textures in vector maps, where do I start?

Similar to the Middle earth style map, but for the web: https://adventuresinmapping.com/2018/09/10/middle-earth-map-...

mourner
OP
7y ago
Just open https://studio.mapbox.com and have a go! It's a really powerful tool with a ton of customization options, including ones related to textures & patterns. Also check out one of the recent tutorials for a textured map: https://blog.mapbox.com/designing-the-treasure-map-style-431... We also have a cool guide for map design: https://www.mapbox.com/map-design/
spython7y ago
Awesome, thanks a lot!
num3ric7y ago
Did you leverage this approach to optimize terrain rendering/add detail on devices where hardware tessellation is not supported? Lovely algorithm in any case. [Edit: Just remembered the limitation is with WebGL itself, doh.]
jacobolus7y ago
Firefox looks a bit wacky: https://i.imgur.com/ivLwxyG.png

Vs. Chrome: https://i.imgur.com/Go0mt1K.png

mourner
OP
7y ago
Wow, what OS / device is this on? Looks fine on Firefox 68 / OS X for me.
jbarberu7y ago
I'm seeing similar results on FF68.0.2 Win10 with a GTX 1060.
jacobolus7y ago
Firefox 68.0, OS X 10.14.6
mourner
OP
7y ago
Really weird! No idea what could be the culprit. Some GPU bug maybe?
galangalalgol7y ago
On android firefox doesnt seem to work at all. Nor does ff preview. Chrome works.
colkassad7y ago
This is awesome. I wrote a Terrain-RGB to greyscale PNG converter and would love to play around with this in a demo map for a 3D preview or something. How are you rendering the mesh in your notebook? Threejs?
mourner
OP
7y ago
All the code is there — browse to the bottom and click on the left side of ThreeJS sections to expand them.
colkassad7y ago
Duh! Thanks!
skvj7y ago
great work! a little simpler minus the triangle conversion, have you seen the openFrameworks chapter for generating mesh from color saturation values? https://openframeworks.cc/ofBook/chapters/generativemesh.htm...
mourner
OP
7y ago
Haven't seen this, thanks for sharing!
caffed7y ago
Super neat! I will definitely be checking this lib out.