Commit graph

3378 commits

Author SHA1 Message Date
Kelsi
18939af73d feat(editor): project management UI in File menu
- File > Project submenu: New/Save/Load project, add zones
- "Add Current Zone to Project" captures loaded map/tile info
- Project path editable in the menu
- Zone count shown for quick reference
- Foundation for multi-zone custom expansion workflow:
  create project → add zones → edit each → export all as WCP
2026-05-05 09:39:01 -07:00
Kelsi
1d2f25f169 feat(editor): project system for multi-zone custom expansions
- EditorProject: manages multiple zones in a single project file
  (wowee-project-1.0 JSON format)
- Project stores: name, author, description, version, zone list
- Each zone has: mapName, tileX/Y, biome, description
- Save/load project files (.json) with full round-trip
- Foundation for creating custom expansions with multiple maps,
  quest chains spanning zones, and campaign progression
- getZoneOutputDir() resolves per-zone output paths
2026-05-05 09:36:44 -07:00
Kelsi
c28d3f8a99 feat(editor): open terrain format integrated into export workflow
- File > Export Open Format (.wot/.whm) menu item for standalone export
- Every zone export (Ctrl+S, Export Zone) now also writes .wot/.whm
  alongside the ADT/WDT — dual format output
- Export package now contains: ADT + WDT + WOT + WHM + JSON files
- Both Blizzard-compatible (for existing servers) and open format
  (for wowee-native loading and redistribution)
2026-05-05 09:34:49 -07:00
Kelsi
7177463df1 feat(editor): Wowee Open Terrain format (.wot/.whm) — no Blizzard formats
Novel open terrain format unique to wowee:

.wot (Wowee Open Terrain) — JSON metadata:
- Tile coordinates, chunk grid dimensions, texture list
- Per-chunk layer assignments and hole bitmasks
- Water data per chunk (type, height)
- Format version "wot-1.0"

.whm (Wowee HeightMap) — binary heightmap:
- "WHM1" magic header
- 256 chunks × (baseHeight + 145 float heights) = 148KB
- Direct float storage, no compression, fully portable

Both formats are entirely novel — no ADT, no WDT, no Blizzard
structures. The WCP content pack can bundle .wot/.whm instead of
ADT/WDT for fully open redistribution.

Import/export functions: WoweeTerrain::exportOpen() / importOpen()
2026-05-05 09:32:13 -07:00
Kelsi
be18ceea73 feat(editor): Export Content Pack button in File menu
- File > Export Content Pack (.wcp) saves zone + packs into WCP archive
- Auto-saves zone first, then bundles into the novel WCP format
- WCP is a custom format unique to wowee (not MPQ, not CASC)
- Output: output/MapName.wcp ready for distribution
- Toast notification on success/failure
2026-05-05 09:29:57 -07:00
Kelsi
79ae91a6d5 feat(editor): Wowee Content Pack (.wcp) format for zone distribution
- WCP format: simple binary archive with magic header, JSON manifest,
  and concatenated file data. Not tied to any proprietary format.
- ContentPacker::packZone(): bundles all zone files from output dir
  into a single .wcp file (terrain, objects, creatures, quests, manifest)
- ContentPacker::unpackZone(): extracts .wcp to a directory
- ContentPacker::readInfo(): reads pack metadata without extracting
- Format: "WCP1" magic + fileCount + infoJSON + file table + data
- Foundation for distributing custom zones to other wowee users
  and private servers

Note: currently bundles ADT/WDT files as-is. Future: convert terrain
to open format (heightmap + JSON) for fully open redistribution.
2026-05-05 09:27:00 -07:00
Kelsi
f5d8dcf75a chore(editor): bump version to 0.5.0 (130 commits) 2026-05-05 09:24:21 -07:00
Kelsi
dce51d9de6 fix(editor): cleaner cursor info display in Sculpt panel header 2026-05-05 09:21:44 -07:00
Kelsi
da79244fc5 feat(editor): show cursor height and position at top of Sculpt panel 2026-05-05 09:20:28 -07:00
Kelsi
ec8e3a41b5 fix(editor): Clear All shows toast when nothing to clear 2026-05-05 09:19:02 -07:00
Kelsi
d36631d242 fix(editor): Create + Generate button now actually runs generation pipeline
- "Create + Generate" was setting a flag but never calling generateCompleteZone()
- Now properly chains: create terrain → run full procedural pipeline
  (noise → smooth → normals → height paint → slope paint → detail → water → beaches)
- Uses generateAfterCreate_ flag to defer generation until after terrain is created
2026-05-05 09:17:23 -07:00
Kelsi
bdfadc7e76 fix(editor): remove all remaining brush.isActive() checks from UI buttons
- Pick height, Punch Hole, Fill Hole, Delete All in Radius buttons
  no longer require cursor to be actively on terrain
- All buttons now use last known brush position consistently
- Fixes the fundamental UX issue where clicking a UI button moves
  the cursor off terrain, making the button do nothing
2026-05-05 09:14:31 -07:00
Kelsi
560c4a40c0 fix(editor): About dialog now works, moved outside menu bar scope
- About dialog was broken because ImGui::OpenPopup inside BeginMenu
  has wrong ID scope — popup never appeared
- Changed to a proper ImGui::Begin window with showAbout_ flag
- Closeable with X button or clicking About again
- Shows version, author, feature summary, and tech stack
2026-05-05 09:11:46 -07:00
Kelsi
bab1318ec9 fix(editor): ghost preview logs warning when model file not found 2026-05-05 09:08:03 -07:00
Kelsi
c1f74d9c9c fix(editor): all generator buttons work without cursor on terrain
- Removed isActive() requirement from all "Create at Cursor" buttons
  (Mesa, Crater, Hill, Valley, Stamp, Ridge, Flatten Platform, Holes)
- Buttons now use the last known brush position which persists when
  cursor moves to the UI panel to click the button
- Fixes: "Create Mesa at Cursor can't work if cursor is clicking
  that button" — now it uses wherever the cursor was last on terrain
2026-05-05 09:06:08 -07:00
Kelsi
63f4711eb3 fix(editor): river/road path selection uses last brush pos, edge ramp note
- Set Start/End buttons for river/road no longer require brush to be
  actively on terrain at click time — uses last known brush position
  which persists when cursor moves to the UI panel
- Shows cursor coordinates above the buttons for visual confirmation
- Edge ramp confirmed to only affect terrain heights, not water levels
  (water has its own height independent of terrain)
2026-05-05 09:04:30 -07:00
Kelsi
f6d30fcf9b fix(editor): ghost preview survives object rebuilds, clearObjects resets ghost state
- Ghost model state (ID, path, active flag) properly reset when
  clearObjects() wipes the M2 renderer — prevents stale ghost
  references causing crashes on subsequent hover
- Ghost model ID uses 59999 to avoid collision with placed object IDs
- Ghost loadModel failure now handled gracefully (returns early)
2026-05-05 09:03:02 -07:00
Kelsi
34c06ede4e fix(editor): redo works in all modes, center uses real chunk positions
- Ctrl+Shift+Z redo now works globally (was only in Sculpt mode)
- Ctrl+Z undo works in all modes with toast confirmation
- centerOnTerrain() uses actual mesh chunk positions instead of formula
- Toast shows "Undo" / "Redo" / "Undo placement" for user feedback
2026-05-05 09:00:53 -07:00
Kelsi
66debe9cec fix(editor): camera auto-centers on actual terrain chunks after ADT load
- Camera now positions at the center of actual loaded terrain chunks
  instead of using formula-based coordinates that can be wrong for
  instanced maps
- Falls back to formula if no valid chunks loaded
- Fixes camera starting far from terrain on some maps
2026-05-05 08:58:07 -07:00
Kelsi
84e9146522 feat(editor): toast notification when importing ADT doodads/WMOs 2026-05-05 08:56:52 -07:00
Kelsi
61f0f39611 fix(editor): ADT doodad/WMO coordinate conversion, auto-find tile on map select
- ADT doodad/WMO positions now converted from ADT space to render coords
  via core::coords::adtToWorld() — fixes objects appearing at wrong positions
  when loading existing WoW maps
- Selecting a map in the Load dialog now auto-finds the first valid tile
  (no more clicking "Find Tile" manually — it's automatic)
- Better error messages with toast for failed terrain loads
- Validates mesh has valid chunks before attempting GPU upload
2026-05-05 08:55:09 -07:00
Kelsi
9c0bc5fbd1 fix(editor): override ADT internal coords with filename coords on load
Root cause of ADT loading failures: instanced maps (dungeons, raids)
have arbitrary internal coord values (e.g. tile 62,0 for a file named
_28_27.adt). The terrain mesh generator uses these coords to compute
world positions, resulting in chunks placed thousands of units away
from the camera → "Failed to upload terrain to GPU".

Fix: override terrain_.coord with the tileX/tileY from the filename
before mesh generation. This ensures chunks are positioned correctly
regardless of what the ADT file's internal header says.
2026-05-05 08:49:26 -07:00
Kelsi
79db38219f feat(editor): sand dune generator for desert terrain
- Dune Generator: creates rolling sand dune patterns with primary
  and secondary sine waves plus hash-based variation
- Configurable wavelength, amplitude, wind direction, and seed
- Directional waves create realistic parallel dune ridges
- Secondary wave adds natural irregularity at 2.3x wavelength
- Perpendicular variation breaks up uniform dune lines
- Pair with Desert biome paint for instant Tanaris-style zones
2026-05-05 08:47:44 -07:00
Kelsi
8255cda9a8 chore(editor): bump version to 0.4.0 2026-05-05 08:45:24 -07:00
Kelsi
29fe4bd062 feat(editor): quick biome paint presets (6 biomes, one-click full texture)
- Quick Biome Paint: select a biome (Grassland/Forest/Desert/Snow/Swamp/Barrens)
  and apply its full texture set in one click
- Sets base texture for all chunks + scatters variation patches
- Each biome has a primary ground texture + secondary variation
- Much faster than manual painting for initial zone texturing
2026-05-05 08:42:47 -07:00
Kelsi
b00143e8f7 feat(editor): scatter texture patches for natural surface variety
- Scatter Patches: randomly places texture circles across the terrain
  for natural-looking surface variation (dirt patches, rock outcrops)
- Configurable count, min/max radius, and seed
- Preset buttons for dirt and rock patches
- Uses the existing paint() method with random positions
- Adds visual variety to otherwise uniform terrain texturing
2026-05-05 08:40:43 -07:00
Kelsi
16a096b25d fix(editor): include quest count in export README, version tag 2026-05-05 08:37:51 -07:00
Kelsi
c8446fb782 feat(editor): seed step buttons (<< >>) for quick terrain seed cycling 2026-05-05 08:36:09 -07:00
Kelsi
14d305a477 feat(editor): rotate terrain 90 degrees clockwise
- Rotate 90 CW button in Mirror/Rotate section
- Snapshots outer vertex heights into 129x129 grid, rotates in-place,
  writes back with inner vertices averaged from surrounding outers
- Useful for reorienting terrain features or creating rotational
  symmetry (rotate + mirror for 4-way symmetric arenas)
2026-05-05 08:32:59 -07:00
Kelsi
66b6404d25 fix(editor): recalculate normals after detail noise in Generate pipeline 2026-05-05 08:30:07 -07:00
Kelsi
0a6e54e8a2 feat(editor): gradient texture blend for biome transitions
- Gradient Blend: smoothly transitions base texture from one biome
  to another across the entire tile (horizontal or vertical)
- Preset buttons: Grass→Sand and Grass→Snow gradients
- Creates natural biome transition zones without manual painting
- Alpha blending from 0% to 100% across 16 chunks
2026-05-05 08:28:09 -07:00
Kelsi
0907bb5ca2 feat(editor): undo/redo status in Info panel 2026-05-05 08:25:46 -07:00
Kelsi
d8c249e08f chore(editor): update About dialog tech stack info 2026-05-05 08:24:07 -07:00
Kelsi
571ea38efd feat(editor): Generate Complete Zone now adds detail roughness step 2026-05-05 08:22:09 -07:00
Kelsi
3504e57f75 feat(editor): detail noise for adding small-scale terrain roughness
- Detail Noise: adds high-frequency roughness to existing terrain
  without destroying the overall shape (amplitude 0.5-10, freq 0.01-0.5)
- Useful after smooth/generate to break up unnaturally smooth surfaces
- Workflow: generate → smooth → detail noise for natural look
- Separate seed from main noise generator for independent control
2026-05-05 08:20:54 -07:00
Kelsi
fab77952a6 feat(editor): river carver now auto-paints sand banks alongside carved channel 2026-05-05 08:18:07 -07:00
Kelsi
6de6da766d feat(editor): auto-texture roads with cobblestone on flatten
- paintAlongPath(): paints a texture along a line segment with
  configurable width and quadratic edge falloff
- Road mode now automatically applies Elwynn cobblestone texture
  when flattening a road path (flatten + texture in one operation)
- Quick distance check skips chunks far from the path for performance
- Alpha blending uses max() so overlapping paths don't wash out
2026-05-05 08:16:40 -07:00
Kelsi
8974cef9c0 milestone(editor): commit #100 — v0.3.0, 9.1k lines, complete world editor
Wowee World Editor milestone: 100 commits, 9,067 lines, 39 files.

Complete standalone zone creation tool with:
- 6 editor modes (Sculpt/Paint/Objects/Water/NPCs/Quests)
- 30+ terrain tools: noise (value + voronoi), hill, valley, mesa,
  crater, canyon, island, ridge, river, road, terrace, thermal erosion,
  stamp/clone, mirror, flatten platform, holes, smooth beaches,
  edge ramp, height scale/clamp/offset/invert/reset
- 6 brush modes: raise/lower/smooth/flatten/level/erode
- Auto-paint by height bands and slope
- 1285 tileset textures, 11k M2 models, 2k WMO buildings
- 631 NPC creature presets with stats/behavior/patrol paths
- Quest editor with objectives, rewards, and NPC linking
- Full export: zone.json + WDT + ADT + objects/creatures/quests JSON
- Map browser with tile availability checker
- Minimap with height/objects/NPCs/camera/brush/holes
- One-click Generate Complete Zone pipeline
- Persistent layout, auto-save, camera bookmarks, toast notifications
2026-05-05 08:14:14 -07:00
Kelsi
6277800773 feat(editor): edge ramp tool for seamless multi-tile connections
- Edge Ramp: smoothly transitions tile borders to a target height
  so adjacent tiles can connect seamlessly
- Configurable target height and ramp width (how far in from the edge)
- Quadratic blend for smooth start from edge → interior
- Essential for multi-tile zone creation: ramp each tile's edges to
  match its neighbor's border height
2026-05-05 08:13:04 -07:00
Kelsi
d56ea9ae64 feat(editor): Randomize All button for instant terrain exploration 2026-05-05 08:10:21 -07:00
Kelsi
312a7e03e0 fix(editor): update minimap legend with hole indicator 2026-05-05 08:09:13 -07:00
Kelsi
aed6e00aac feat(editor): Generate Complete Zone now includes water fill + beach smoothing 2026-05-05 08:07:49 -07:00
Kelsi
426863f19a feat(editor): smooth beaches tool for natural water-land transitions
- Smooth Beaches button in Water panel: creates gentle beach slopes
  near water level by blending terrain toward waterline height
- Configurable beach width (15 units default)
- Quadratic falloff creates natural concave beach profile
- Use after filling water to soften harsh land-water edges
- Workflow: sculpt → fill water → smooth beaches → paint sand
2026-05-05 08:06:20 -07:00
Kelsi
c8897eca83 feat(editor): Create + Generate button in New Terrain dialog 2026-05-05 08:04:05 -07:00
Kelsi
171fff3843 chore(editor): include editor version in zone manifest export 2026-05-05 08:02:38 -07:00
Kelsi
e7ce94448a chore(editor): update About dialog with current stats 2026-05-05 08:01:09 -07:00
Kelsi
b113c218bd feat(editor): voronoi cell noise for organic terrain patterns
- Voronoi noise generator: creates cell-like terrain patterns with
  ridge features at cell boundaries (F2-F1 distance field)
- Configurable cell count (5-100) and amplitude
- Toggle between Value noise and Voronoi in the noise generator section
- Creates interesting mesa/plateau formations and organic shapes
- Random cell centers with per-cell height variation
2026-05-05 07:59:10 -07:00
Kelsi
e65fc7caa2 chore(editor): bump version to 0.2.0 (89 commits, 8.9k lines) 2026-05-05 07:57:09 -07:00
Kelsi
d247aee728 fix(editor): Generate Complete Zone resets terrain first for clean slate 2026-05-05 07:54:26 -07:00
Kelsi
5f9bf5c924 feat(editor): height offset tool for shifting entire terrain up/down
- Offset Heights: shifts all terrain heights by a constant amount
  (-100 to +100 range with Apply button)
- Useful for raising terrain above water level or sinking below
- Slider + Apply button in the Noise Generator section
2026-05-05 07:53:01 -07:00