Repository navigation
Releases: shanto462/HeightMapTo3dTerrain
Releases · shanto462/HeightMapTo3dTerrain
Release list
v2.0.0
Complete rewrite in Rust. The command is now hmterrain.
Added
- Adaptive meshes (TIN) by greedy Delaunay insertion, the new default. Every
pixel stays within--max-errorof the mesh, and flat areas need far fewer
triangles.--max-trianglesand--max-verticesset a size budget instead. - Output formats: binary glTF (
.glb), binary STL (.stl) and binary PLY
(.ply), next to OBJ. --base THICKNESScloses the terrain into a watertight solid for 3D printing.- 16-bit and floating-point heightmaps, plus TIFF, JPEG, BMP, TGA and PNM input.
- Non-square heightmaps.
- Texture coordinates, so the source image or a satellite photo can be draped
over the terrain. --pixel-size,--invert,--no-normalize,--no-center,--format,
--threadsand--quiet.- A Rust library (
heightmap_terrain) with the same features. - CI on Linux, macOS and Windows, release binaries for seven targets with
build provenance, CodeQL, OpenSSF Scorecard, cargo-deny and Dependabot.
Changed
- Heights are given with
--min-heightand--max-height. The v1 form
hmterrain in.png out.obj -200 200still works. - Grid cells are split along the diagonal with the closer heights, so diagonal
ridges and valleys stay sharp. - The mesh is centered on X and Z only. The heights you ask for are the heights
you get. - Output is written to a temporary file first, so a failed run never leaves a
truncated mesh. - The output file is no longer opened in another program after conversion.
Fixed
- Height normalization divided by
max - min + 1, so terrain used only part of
the requested height range. - Face indices in OBJ files were 0-based, which shifted every triangle by one
vertex. - Each grid cell was covered by four overlapping triangles with mixed winding,
and a two-pixel border was missing. - Normals were deduplicated as text and never referenced by faces, so viewers
ignored them. - Numbers used the system locale, which wrote commas as decimal separators on
some systems and broke the OBJ file. - Only the green channel was read, and 16-bit images lost precision.