vange-rs icon indicating copy to clipboard operation
vange-rs copied to clipboard

Dynamic terrain polygonization

Open kvark opened this issue 5 years ago • 6 comments

The terrain is mostly smooth. It would be most efficient to render from any angle if we could polygonize it. This crate may come handy - https://github.com/PsichiX/density-mesh . It supports providing a height (or a steepness) map. We just need to figure out how to generate one based on the level data.

kvark avatar Oct 08 '20 14:10 kvark

hi! author of the crate here. Could you provide me a file (PNG preferred) with the heightmap data? i could perform optimizations and quality test on that and improve the crate :)

PsichiX avatar Oct 08 '20 16:10 PsichiX

@PsichiX thank you for showing up here! I'll surely do. The first step is to generate a PNG for it properly. Vangers level data uses a 2.5-layer inteleaved in-house format, so I'll need to make some adjustments to the converter first to process this in the format density-mesh expects.

kvark avatar Oct 08 '20 16:10 kvark

Just published version 1.2 with support for chunks and other optimizations :D

heightmap vis

PsichiX avatar Oct 09 '20 00:10 PsichiX

Whoa, that was super quick, greatly appreciated! I'm excited to try this out, although I may start working on this in a week or so. It's good to know there is a path forward ❤️

kvark avatar Oct 09 '20 02:10 kvark

Nice! It's was my original idea 5 years ago... ) I hope you reach success.

stalkerg avatar Oct 09 '20 03:10 stalkerg

The closest thing in research that I found is this - https://tildesites.bowdoin.edu/~ltoma/teaching/cs350/spring04/Handouts/scape.pdf Basically, a modification of Delauney algorithm for height maps. There is a few variations with different trade-offs.

kvark avatar Jan 31 '22 20:01 kvark