mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-08 01:53:52 +00:00
Converts a grayscale PNG into a heightmap mesh. Each pixel becomes one vertex; brightness becomes Y. Mesh is centered on the XZ plane with X spanning [-W*scaleXZ/2, +W*scaleXZ/2] and Z spanning the same for H. Defaults: scaleXZ=0.1 (a 64×64 PNG covers a 6.4×6.4 yard patch), scaleY=2.0 (full white pixels rise 2 yards above black). Capped at 512×512 source images to keep vertex count bounded (the cap raises to 262K verts for the largest legal input). Normals are computed from finite differences against the height field, giving smooth shading across the surface. Single batch + one empty texture slot ready for downstream binding via --add-texture-to-mesh. Pairs naturally with --gen-texture-noise (synthetic terrain) or any artist-painted heightmap exported from Photoshop / GIMP. Adds stb_image.h include — implementation is already linked via the existing tools/editor/stb_image_impl.cpp. Verified: 64×64 noise heightmap → 4096 verts (= 64²) + 7938 tris (= 2×63²), 6.4×6.4 span, height range 0..1.99; 1024×1024 input rejected with size-cap error. Brings command count to 228. |
||
|---|---|---|
| .. | ||
| asset_extract | ||
| auth_login_probe | ||
| auth_probe | ||
| blp_convert | ||
| dbc_to_csv | ||
| editor | ||
| asset_pipeline_gui.py | ||
| backup_assets.sh | ||
| diff_classic_turtle_opcodes.py | ||
| gen_opcode_registry.py | ||
| generate_ffx_sdk_vk_permutations.sh | ||
| m2_viewer.py | ||
| opcode_map_utils.py | ||
| validate_opcode_maps.py | ||