Commit graph

3352 commits

Author SHA1 Message Date
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
Kelsi
d50e4b3f78 feat(editor): invert button in sculpt panel alongside reset 2026-05-05 07:51:21 -07:00
Kelsi
825939db3b feat(editor): invert heights, fill entire tile with water, remove all water
- Invert Heights: flips terrain upside-down around midpoint (mountains
  become valleys and vice versa)
- Fill Entire Tile with Water: one-click fills all 256 chunks at the
  configured water height and liquid type
- Remove ALL Water: clears water from every chunk instantly
- Water panel now has three water operations: fill tile, remove under
  brush, remove all
- fillWater() and invertHeights() methods on TerrainEditor
2026-05-05 07:49:48 -07:00
Kelsi
bd1356bd08 fix(editor): enlarge sculpt panel default size for all generators 2026-05-05 07:46:46 -07:00
Kelsi
2d5692d5ad feat(editor): thermal erosion simulation for natural terrain aging
- Thermal Erosion: physically-based material transfer where steep
  slopes shed material to neighbors based on angle of repose
- Configurable iterations (1-50) and talus angle (10-80 degrees)
- Lower talus angle = more aggressive erosion (sandy terrain)
- Higher angle = less erosion (rocky terrain holds steep slopes)
- Creates natural talus fans at cliff bases and rounded hilltops
- Workflow: sculpt/generate → thermal erosion → smooth → auto-paint
2026-05-05 07:45:16 -07:00
Kelsi
9be32a6634 feat(editor): terrain terrace/step generator for layered landscapes
- Terrace tool: quantizes terrain heights into N flat shelves
  (like rice paddies, cliff shelves, or stepped pyramids)
- Configurable step count (2-20)
- Finds actual height range and divides evenly
- Auto-stitches chunk edges after terracing
- Useful for creating tiered arenas, agricultural zones, or
  stylized Meso-American terrain
2026-05-05 07:43:10 -07:00
Kelsi
f3846919a4 feat(editor): winding canyon generator with seeded sine-wave path
- Canyon Generator: carves a winding canyon across the entire tile
  using layered sine waves for natural serpentine shape
- Configurable width, depth, and seed for different canyon shapes
- Quadratic falloff at edges for smooth cliff walls
- Random seed button for quick shape exploration
- Fill with Water mode for instant river canyon
2026-05-05 07:37:27 -07:00
Kelsi
7971fd7989 feat(editor): island terrain generator with beach falloff
- Island Generator: creates raised center terrain dropping to edges
  with configurable center height and edge drop depth
- Flat interior plateau → gradual beach slope → steep underwater drop
- Preserves existing noise detail at 30% blend for natural variation
- Add water around the island for instant ocean environment
- Workflow: New Terrain → Island → Noise → Smooth → Auto-paint
2026-05-05 07:35:18 -07:00
Kelsi
f15fbf508f feat(editor): Reset + Apply noise button for quick terrain iteration 2026-05-05 07:32:41 -07:00
Kelsi
623aeff417 feat(editor): Ctrl+N and Ctrl+O shortcuts for New/Load dialogs 2026-05-05 07:31:20 -07:00
Kelsi
97f1d9c003 docs(editor): add quick actions to help overlay (Ctrl+N/O, middle-drag) 2026-05-05 07:29:04 -07:00
Kelsi
47bf2d662b feat(editor): random seed button for noise generator 2026-05-05 07:28:14 -07:00
Kelsi
629bfd6377 feat(editor): hole indicators on minimap (H marks on chunks with terrain holes) 2026-05-05 07:26:54 -07:00
Kelsi
9a3b253b14 feat(editor): frustum culling toggle in View menu 2026-05-05 07:25:32 -07:00
Kelsi
e516c3c71f feat(editor): one-click Generate Complete Zone pipeline
- File > Generate Complete Zone: runs the full procedural pipeline
  in one click: noise → smooth (3 passes) → recalc normals →
  height-based auto-paint (sand/grass/rock/snow) → slope-based
  cliff paint (rock on steep faces)
- Creates a fully textured, natural-looking zone from flat terrain
- Removed stale quickGenerate checkbox from New Terrain dialog
2026-05-05 07:21:59 -07:00
Kelsi
59c6dab2b3 feat(editor): auto-paint by slope for natural cliff texturing
- Auto-Paint by Slope: paints rock texture on steep terrain surfaces
  with configurable slope threshold (0.1 - 0.9)
- Uses per-vertex normal Z component to detect steepness
- Alpha blending based on slope gradient for smooth transitions
- Workflow: sculpt terrain → recalc normals → auto-paint slope → rock
  appears naturally on cliffs while flat areas keep their biome texture
2026-05-05 07:19:05 -07:00
Kelsi
8aee357a34 feat(editor): selected object name labels in viewport 2026-05-05 07:16:52 -07:00
Kelsi
2ed521a8f7 feat(editor): NPC name labels floating above markers in viewport
- Creature names rendered as screen-space text above each NPC marker
- Red text for hostile, green for friendly
- Labels project from 3D world position to screen coordinates
- Only visible when NPC is in front of camera (clip.w > 0)
- Much easier to identify placed creatures at a glance
2026-05-05 07:15:12 -07:00
Kelsi
0742abfe94 fix(editor): separate NPC marker updates from M2 rebuild cycle
- NPC placement now only updates cheap marker geometry (no M2 reload)
- Full M2 rebuild only triggers when PLACED OBJECT count changes
  (not NPC count — NPCs use markers, not M2 instances for now)
- Split lastObjectCount_ into lastObjCount_ + lastNpcCount_ to track
  objects and NPCs independently
- Prevents the destructive clear+reload cycle that caused GPU crashes
  when rapidly placing multiple NPCs
2026-05-05 07:13:24 -07:00
Kelsi
16308011ee fix(editor): filter bad M2 models, toast on tile not found, robustness
- Filter known effect/particle models from NPC presets (alliancebomb,
  blackhole, etc.) that cause vertex explosions — these are particle
  effect models misclassified as creatures
- "Find Tile" button now shows toast when no ADT exists for a map
- Vertex validation catches NaN/infinite/extreme positions before GPU
- These models are now skipped entirely from the creature browser
2026-05-05 07:10:29 -07:00
Kelsi
c60ddcfed4 fix(editor): stop destructive M2 rebuild on every NPC click, fix Clear All
Root cause of GPU crashes (VK_ERROR_DEVICE_LOST): every NPC placement
triggered a full clear+reload of ALL M2 models. After several cycles
the GPU state corrupted, causing vertex explosions and device lost.

Fixes:
- NPC placement now only updates cheap marker geometry (no M2 reload)
- Full M2 rebuild only happens when object COUNT changes (not every click)
- clearAllObjects() properly resets viewport, placer, spawner, markers,
  and history in one call with vkDeviceWaitIdle fence
- New Terrain uses clearAllObjects() for consistent reset
- Clear All menu item calls clearAllObjects()
- M2 vertex validation: rejects models with NaN/infinite/extreme
  vertex positions before GPU upload (prevents vertex explosions)
- NPC marker building extracted to updateNpcMarkers() method
  (can be called independently without M2 rebuild)
2026-05-05 07:07:33 -07:00
Kelsi
1c58911da0 feat(editor): ridge/mountain range generator between two points
- Ridge Generator: creates mountain ranges by setting start and end
  points, with configurable width and height
- Cross-section uses quadratic falloff, along-axis uses sqrt taper
  for natural mountain range silhouette (wider at center, tapering
  at both ends)
- Same start/end workflow as river/road tools
2026-05-05 07:00:05 -07:00
Kelsi
d6c58b5dc9 feat(editor): hill/valley generator with smooth bell curve shape
- Hill Generator: creates smooth bell-curve hills at cursor position
  with configurable radius and height
- Valley mode: same shape inverted, creates natural depressions
- Uses (1-t^2)^2 falloff for very smooth natural-looking slopes
- Two buttons: "Create Hill" and "Create Valley" for quick terrain
  shaping without switching brush modes
2026-05-05 06:57:18 -07:00
Kelsi
88416bbb1d fix(editor): NPC markers always on top, mesa generator, terrain tools
- NPC markers now render with NO depth test (via gizmo pipeline) so
  they're always visible even on sloped/rough terrain
- Mesa/Plateau generator: creates raised flat areas with steep cliff
  edges — configurable radius, height, and edge steepness
- NPC markers drawn after gizmo in the render pipeline to guarantee
  they appear on top of everything
- Fixes NPC visibility on non-flat terrain
2026-05-05 06:55:04 -07:00
Kelsi
1502c2ed85 feat(editor): crater generator for lakes, arenas, impact sites
- Crater Generator in Sculpt panel: creates a bowl-shaped depression
  with configurable radius, depth, and raised rim height
- Parabolic bowl interior with sinusoidal rim and smooth outer falloff
- Perfect for creating lakes (fill with Water mode), arenas, or
  impact craters for volcanic zones
- One click at cursor position, uses brush position for center
2026-05-05 06:50:24 -07:00
Kelsi
496f97f9db feat(editor): middle mouse orbit camera around terrain point
- Middle mouse drag orbits camera around the terrain point under cursor
  (or 100 units ahead if no terrain hit)
- Maintains distance from pivot while rotating yaw/pitch
- Much more intuitive for inspecting terrain features, placed objects,
  and NPC positions from different angles
- Works alongside right-drag (free look) and WASD (fly)
2026-05-05 06:48:05 -07:00
Kelsi
62cfb92c38 feat(editor): persistent window layout between sessions (ImGui ini) 2026-05-05 06:45:13 -07:00