kvark / vange-rs

Rusty Vangers clone
https://vange.rs
Apache License 2.0
428 stars 21 forks source link

Dynamic terrain polygonization #127

Open kvark opened 3 years ago

kvark commented 3 years ago

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.

PsichiX commented 3 years ago

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 :)

kvark commented 3 years ago

@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.

PsichiX commented 3 years ago

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

heightmap vis

kvark commented 3 years ago

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 ❤️

stalkerg commented 3 years ago

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

kvark commented 2 years ago

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.