feat(editor): add standalone world editor (rough/WIP)
Standalone wowee_editor tool for creating custom WoW zones.
This is a rough initial implementation — many features work but
M2/WMO rendering still has issues (frame sync, texture layout
transitions) and needs further polish.
Terrain:
- Create new blank terrain with 10 biome types (Grassland, Forest,
Jungle, Desert, Barrens, Snow, Swamp, Rocky, Beach, Volcanic)
- Load existing ADT tiles from extracted game data
- Sculpt brushes: Raise, Lower, Smooth, Flatten, Level
- Chunk edge stitching prevents seams between tiles
- Undo/redo (100-deep stack, Ctrl+Z/Ctrl+Shift+Z)
- Save to WoW ADT/WDT format
Texture Painting:
- Paint/Erase/Replace Base modes
- Full tileset texture browser (1285 textures from manifest)
- Per-zone directory filtering and search
- Alpha map editing with 4-layer limit (auto-replaces weakest)
Object Placement:
- M2 and WMO model placement with full manifest browser (11k M2s, 2k WMOs)
- M2Renderer + WMORenderer integrated (loads .skin files for WotLK)
- Ghost preview follows cursor before placing
- Ctrl+click selection, right-click context menu
- Transform gizmo (Move/Rotate/Scale with axis constraints)
- Position/rotation/scale editing in properties panel
NPC/Monster System:
- 631 creature presets scanned from manifest, categorized
(Critters, Beasts, Humanoids, Undead, Demons, etc.)
- Stats editor: level, health, mana, damage, armor, faction
- Behavior: Stationary, Patrol, Wander, Scripted
- Aggro/leash radius, respawn time, flags (hostile/vendor/etc.)
- Save creature spawns to JSON
Water:
- Place water at configurable height per chunk
- Liquid types: Water, Ocean, Magma, Slime
- Rendered as translucent colored quads
- Saved in ADT MH2O format
Infrastructure:
- Free-fly camera (WASD/QE, right-drag look, scroll speed)
- 5-mode toolbar: Sculpt | Paint | Objects | Water | NPCs
- Asset browser indexes full manifest on startup
- Editor water/marker shaders (pos+color vertex format)
- forceNoCull added to M2Renderer for editor use
- AssetManifest::getEntries() and AssetManager::getManifest() exposed
Known issues:
- M2/WMO rendering may not display on first placement (frame index
sync between update/render was misaligned — now fixed but untested
end-to-end)
- Validation layer errors on shutdown (resource cleanup ordering)
- Object placement on steep terrain can miss raycast
- No undo for texture painting or object placement yet
2026-05-05 03:47:03 -07:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "editor_brush.hpp"
|
|
|
|
|
#include "editor_history.hpp"
|
|
|
|
|
#include "terrain_biomes.hpp"
|
|
|
|
|
#include "pipeline/adt_loader.hpp"
|
|
|
|
|
#include "pipeline/terrain_mesh.hpp"
|
|
|
|
|
#include "rendering/camera.hpp"
|
|
|
|
|
#include <vector>
|
|
|
|
|
#include <functional>
|
|
|
|
|
|
|
|
|
|
namespace wowee {
|
|
|
|
|
namespace editor {
|
|
|
|
|
|
|
|
|
|
class TerrainEditor {
|
|
|
|
|
public:
|
|
|
|
|
TerrainEditor();
|
|
|
|
|
|
|
|
|
|
void setTerrain(pipeline::ADTTerrain* terrain) { terrain_ = terrain; }
|
|
|
|
|
pipeline::ADTTerrain* getTerrain() { return terrain_; }
|
|
|
|
|
const pipeline::ADTTerrain* getTerrain() const { return terrain_; }
|
|
|
|
|
|
|
|
|
|
EditorBrush& brush() { return brush_; }
|
|
|
|
|
const EditorBrush& brush() const { return brush_; }
|
|
|
|
|
EditorHistory& history() { return history_; }
|
|
|
|
|
|
|
|
|
|
static pipeline::ADTTerrain createBlankTerrain(int tileX, int tileY, float baseHeight = 100.0f,
|
|
|
|
|
Biome biome = Biome::Grassland);
|
|
|
|
|
|
|
|
|
|
// Raycast against terrain, returns true if hit
|
|
|
|
|
bool raycastTerrain(const rendering::Ray& ray, glm::vec3& hitPos) const;
|
|
|
|
|
|
2026-05-05 14:22:21 -07:00
|
|
|
// Sample terrain normal at a world XY position (for object alignment)
|
|
|
|
|
glm::vec3 sampleTerrainNormal(const glm::vec3& worldPos) const;
|
|
|
|
|
|
feat(editor): add standalone world editor (rough/WIP)
Standalone wowee_editor tool for creating custom WoW zones.
This is a rough initial implementation — many features work but
M2/WMO rendering still has issues (frame sync, texture layout
transitions) and needs further polish.
Terrain:
- Create new blank terrain with 10 biome types (Grassland, Forest,
Jungle, Desert, Barrens, Snow, Swamp, Rocky, Beach, Volcanic)
- Load existing ADT tiles from extracted game data
- Sculpt brushes: Raise, Lower, Smooth, Flatten, Level
- Chunk edge stitching prevents seams between tiles
- Undo/redo (100-deep stack, Ctrl+Z/Ctrl+Shift+Z)
- Save to WoW ADT/WDT format
Texture Painting:
- Paint/Erase/Replace Base modes
- Full tileset texture browser (1285 textures from manifest)
- Per-zone directory filtering and search
- Alpha map editing with 4-layer limit (auto-replaces weakest)
Object Placement:
- M2 and WMO model placement with full manifest browser (11k M2s, 2k WMOs)
- M2Renderer + WMORenderer integrated (loads .skin files for WotLK)
- Ghost preview follows cursor before placing
- Ctrl+click selection, right-click context menu
- Transform gizmo (Move/Rotate/Scale with axis constraints)
- Position/rotation/scale editing in properties panel
NPC/Monster System:
- 631 creature presets scanned from manifest, categorized
(Critters, Beasts, Humanoids, Undead, Demons, etc.)
- Stats editor: level, health, mana, damage, armor, faction
- Behavior: Stationary, Patrol, Wander, Scripted
- Aggro/leash radius, respawn time, flags (hostile/vendor/etc.)
- Save creature spawns to JSON
Water:
- Place water at configurable height per chunk
- Liquid types: Water, Ocean, Magma, Slime
- Rendered as translucent colored quads
- Saved in ADT MH2O format
Infrastructure:
- Free-fly camera (WASD/QE, right-drag look, scroll speed)
- 5-mode toolbar: Sculpt | Paint | Objects | Water | NPCs
- Asset browser indexes full manifest on startup
- Editor water/marker shaders (pos+color vertex format)
- forceNoCull added to M2Renderer for editor use
- AssetManifest::getEntries() and AssetManager::getManifest() exposed
Known issues:
- M2/WMO rendering may not display on first placement (frame index
sync between update/render was misaligned — now fixed but untested
end-to-end)
- Validation layer errors on shutdown (resource cleanup ordering)
- Object placement on steep terrain can miss raycast
- No undo for texture painting or object placement yet
2026-05-05 03:47:03 -07:00
|
|
|
// Apply brush at current position (call per-frame while painting)
|
|
|
|
|
void applyBrush(float deltaTime);
|
|
|
|
|
|
|
|
|
|
// Begin/end a paint stroke (for undo grouping)
|
|
|
|
|
void beginStroke();
|
|
|
|
|
void endStroke();
|
|
|
|
|
bool isStrokeActive() const { return strokeActive_; }
|
|
|
|
|
|
|
|
|
|
// Get chunks modified since last call (for re-upload)
|
|
|
|
|
std::vector<int> consumeDirtyChunks();
|
2026-05-05 14:28:14 -07:00
|
|
|
void markDirty(int chunkIdx) { dirtyChunks_.push_back(chunkIdx); dirty_ = true; }
|
|
|
|
|
void stitchChunkEdges(int chunkIdx) { stitchEdges(chunkIdx); }
|
|
|
|
|
glm::vec3 getChunkVertexWorldPos(int ci, int vi) const { return chunkVertexWorldPos(ci, vi); }
|
|
|
|
|
void beginGeneratorUndo() { recordGeneratorUndo(); }
|
|
|
|
|
void endGeneratorUndo() { commitGeneratorUndo(); }
|
feat(editor): add standalone world editor (rough/WIP)
Standalone wowee_editor tool for creating custom WoW zones.
This is a rough initial implementation — many features work but
M2/WMO rendering still has issues (frame sync, texture layout
transitions) and needs further polish.
Terrain:
- Create new blank terrain with 10 biome types (Grassland, Forest,
Jungle, Desert, Barrens, Snow, Swamp, Rocky, Beach, Volcanic)
- Load existing ADT tiles from extracted game data
- Sculpt brushes: Raise, Lower, Smooth, Flatten, Level
- Chunk edge stitching prevents seams between tiles
- Undo/redo (100-deep stack, Ctrl+Z/Ctrl+Shift+Z)
- Save to WoW ADT/WDT format
Texture Painting:
- Paint/Erase/Replace Base modes
- Full tileset texture browser (1285 textures from manifest)
- Per-zone directory filtering and search
- Alpha map editing with 4-layer limit (auto-replaces weakest)
Object Placement:
- M2 and WMO model placement with full manifest browser (11k M2s, 2k WMOs)
- M2Renderer + WMORenderer integrated (loads .skin files for WotLK)
- Ghost preview follows cursor before placing
- Ctrl+click selection, right-click context menu
- Transform gizmo (Move/Rotate/Scale with axis constraints)
- Position/rotation/scale editing in properties panel
NPC/Monster System:
- 631 creature presets scanned from manifest, categorized
(Critters, Beasts, Humanoids, Undead, Demons, etc.)
- Stats editor: level, health, mana, damage, armor, faction
- Behavior: Stationary, Patrol, Wander, Scripted
- Aggro/leash radius, respawn time, flags (hostile/vendor/etc.)
- Save creature spawns to JSON
Water:
- Place water at configurable height per chunk
- Liquid types: Water, Ocean, Magma, Slime
- Rendered as translucent colored quads
- Saved in ADT MH2O format
Infrastructure:
- Free-fly camera (WASD/QE, right-drag look, scroll speed)
- 5-mode toolbar: Sculpt | Paint | Objects | Water | NPCs
- Asset browser indexes full manifest on startup
- Editor water/marker shaders (pos+color vertex format)
- forceNoCull added to M2Renderer for editor use
- AssetManifest::getEntries() and AssetManager::getManifest() exposed
Known issues:
- M2/WMO rendering may not display on first placement (frame index
sync between update/render was misaligned — now fixed but untested
end-to-end)
- Validation layer errors on shutdown (resource cleanup ordering)
- Object placement on steep terrain can miss raycast
- No undo for texture painting or object placement yet
2026-05-05 03:47:03 -07:00
|
|
|
|
|
|
|
|
// Regenerate mesh for specific chunks
|
|
|
|
|
pipeline::TerrainMesh regenerateMesh() const;
|
|
|
|
|
pipeline::ChunkMesh regenerateChunkMesh(int chunkIndex) const;
|
|
|
|
|
|
|
|
|
|
void undo();
|
|
|
|
|
void redo();
|
|
|
|
|
|
2026-05-05 04:24:20 -07:00
|
|
|
// Recalculate normals for modified chunks (improves lighting after sculpt)
|
|
|
|
|
void recalcNormals(const std::vector<int>& chunkIndices);
|
|
|
|
|
|
feat(editor): procedural noise generator, sky presets, viewport lighting
- Noise Generator in Sculpt panel: applies procedural value noise
with configurable frequency, amplitude, octaves, and seed
to create hills/valleys across entire tile instantly
- Sky/Lighting presets: View > Sky menu with Day (blue sky, high sun),
Dusk (orange, low sun), Night (dark blue, moonlight)
- Viewport clear color and light direction now configurable at runtime
- Noise uses smoothstep interpolation with octave fractal layering
2026-05-05 04:40:37 -07:00
|
|
|
// Noise generator: applies procedural height noise to the terrain
|
|
|
|
|
void applyNoise(float frequency, float amplitude, int octaves, uint32_t seed);
|
|
|
|
|
|
2026-05-05 05:00:31 -07:00
|
|
|
// Global smooth pass across entire tile (N iterations)
|
|
|
|
|
void smoothEntireTile(int iterations);
|
|
|
|
|
|
2026-05-05 05:51:03 -07:00
|
|
|
// Clamp all heights to a min/max range
|
|
|
|
|
void clampHeights(float minH, float maxH);
|
|
|
|
|
|
2026-05-05 06:40:26 -07:00
|
|
|
// Reset all heights to zero (flat terrain)
|
|
|
|
|
void resetToFlat();
|
|
|
|
|
|
2026-05-05 05:55:05 -07:00
|
|
|
// Scale all heights by a factor (useful for exaggerating or flattening)
|
|
|
|
|
void scaleHeights(float factor);
|
|
|
|
|
|
2026-05-05 06:15:33 -07:00
|
|
|
// Terrain stamp: copy heights from source area, paste at destination
|
|
|
|
|
void copyStamp(const glm::vec3& center, float radius);
|
|
|
|
|
void pasteStamp(const glm::vec3& center);
|
2026-05-05 14:33:52 -07:00
|
|
|
bool saveStamp(const std::string& path) const;
|
|
|
|
|
bool loadStamp(const std::string& path);
|
2026-05-05 06:15:33 -07:00
|
|
|
bool hasStamp() const { return !stampData_.empty(); }
|
|
|
|
|
|
2026-05-05 06:24:28 -07:00
|
|
|
// Mirror terrain along X or Y axis through tile center
|
|
|
|
|
void mirrorX();
|
|
|
|
|
void mirrorY();
|
|
|
|
|
|
2026-05-05 06:30:26 -07:00
|
|
|
// Carve a river/path between two points (lowers terrain along line)
|
|
|
|
|
void carveRiver(const glm::vec3& start, const glm::vec3& end, float width, float depth);
|
|
|
|
|
|
2026-05-05 06:37:54 -07:00
|
|
|
// Flatten a road between two points (smooths to average height along path)
|
|
|
|
|
void flattenRoad(const glm::vec3& start, const glm::vec3& end, float width);
|
|
|
|
|
|
2026-05-05 06:50:24 -07:00
|
|
|
// Create a crater at a position (bowl shape with raised rim)
|
|
|
|
|
void createCrater(const glm::vec3& center, float radius, float depth, float rimHeight);
|
|
|
|
|
|
2026-05-05 06:55:04 -07:00
|
|
|
// Create a mesa/plateau (raised flat area with steep cliff edges)
|
|
|
|
|
void createMesa(const glm::vec3& center, float radius, float height, float edgeSteepness);
|
|
|
|
|
|
2026-05-05 06:57:18 -07:00
|
|
|
// Create a smooth hill/mountain
|
|
|
|
|
void createHill(const glm::vec3& center, float radius, float height);
|
|
|
|
|
|
2026-05-05 07:00:05 -07:00
|
|
|
// Create a ridge/mountain range between two points
|
|
|
|
|
void createRidge(const glm::vec3& start, const glm::vec3& end, float width, float height);
|
|
|
|
|
|
2026-05-05 07:35:18 -07:00
|
|
|
// Create an island shape (raised center, dropping to base at edges)
|
|
|
|
|
void createIsland(float centerHeight, float edgeDropoff);
|
|
|
|
|
|
2026-05-05 07:37:27 -07:00
|
|
|
// Create a winding canyon across the tile
|
|
|
|
|
void createCanyon(float width, float depth, uint32_t seed);
|
|
|
|
|
|
2026-05-05 07:43:10 -07:00
|
|
|
// Terrace/quantize heights into N steps
|
|
|
|
|
void terraceHeights(int steps);
|
|
|
|
|
|
2026-05-05 07:45:16 -07:00
|
|
|
// Thermal erosion: material falls downhill based on angle of repose
|
|
|
|
|
void thermalErosion(int iterations, float talusAngle);
|
|
|
|
|
|
2026-05-05 07:49:48 -07:00
|
|
|
// Invert terrain (flip heights around midpoint)
|
|
|
|
|
void invertHeights();
|
|
|
|
|
|
2026-05-05 07:53:01 -07:00
|
|
|
// Offset all heights by a constant
|
|
|
|
|
void offsetHeights(float amount);
|
|
|
|
|
|
2026-05-05 07:59:10 -07:00
|
|
|
// Voronoi cell noise — creates cell-like terrain patterns
|
|
|
|
|
void applyVoronoiNoise(int cellCount, float amplitude, uint32_t seed);
|
|
|
|
|
|
2026-05-05 07:49:48 -07:00
|
|
|
// Fill entire tile with water at a height
|
|
|
|
|
void fillWater(float height, uint16_t liquidType);
|
|
|
|
|
|
2026-05-07 10:17:36 -07:00
|
|
|
// Add a water layer only to chunks the line segment passes through
|
|
|
|
|
// (within `width`). Used by the river tool so rivers actually fill
|
|
|
|
|
// with water without flooding the rest of the tile. Per-chunk water
|
|
|
|
|
// height is computed from the post-carve terrain so the water sits
|
|
|
|
|
// in the carved channel.
|
|
|
|
|
void fillWaterAlongPath(const glm::vec3& start, const glm::vec3& end,
|
|
|
|
|
float width, uint16_t liquidType);
|
|
|
|
|
|
2026-05-05 08:06:20 -07:00
|
|
|
// Smooth terrain near water level to create natural beaches
|
|
|
|
|
void smoothBeaches(float waterHeight, float beachWidth);
|
|
|
|
|
|
2026-05-05 08:13:04 -07:00
|
|
|
// Ramp tile edges to a target height for seamless multi-tile joins
|
|
|
|
|
void rampEdges(float targetHeight, float rampWidth);
|
|
|
|
|
|
2026-05-05 08:20:54 -07:00
|
|
|
// Add random detail noise to existing terrain (preserves shape, adds roughness)
|
|
|
|
|
void addDetailNoise(float amplitude, float frequency, uint32_t seed);
|
|
|
|
|
|
2026-05-05 08:32:59 -07:00
|
|
|
// Rotate terrain 90 degrees clockwise
|
|
|
|
|
void rotateTerrain90();
|
|
|
|
|
|
2026-05-05 08:47:44 -07:00
|
|
|
// Create rolling sand dune pattern
|
|
|
|
|
void createDunes(float wavelength, float amplitude, float direction, uint32_t seed);
|
|
|
|
|
|
2026-05-05 04:52:36 -07:00
|
|
|
// Import/export heightmap (raw 16-bit grayscale, 129x129)
|
2026-05-05 04:49:43 -07:00
|
|
|
bool importHeightmap(const std::string& path, float heightScale);
|
2026-05-05 15:42:35 -07:00
|
|
|
bool importHeightmapImage(const std::string& path, float heightScale);
|
2026-05-05 04:52:36 -07:00
|
|
|
bool exportHeightmap(const std::string& path, float heightScale);
|
2026-05-05 04:49:43 -07:00
|
|
|
|
feat(editor): add standalone world editor (rough/WIP)
Standalone wowee_editor tool for creating custom WoW zones.
This is a rough initial implementation — many features work but
M2/WMO rendering still has issues (frame sync, texture layout
transitions) and needs further polish.
Terrain:
- Create new blank terrain with 10 biome types (Grassland, Forest,
Jungle, Desert, Barrens, Snow, Swamp, Rocky, Beach, Volcanic)
- Load existing ADT tiles from extracted game data
- Sculpt brushes: Raise, Lower, Smooth, Flatten, Level
- Chunk edge stitching prevents seams between tiles
- Undo/redo (100-deep stack, Ctrl+Z/Ctrl+Shift+Z)
- Save to WoW ADT/WDT format
Texture Painting:
- Paint/Erase/Replace Base modes
- Full tileset texture browser (1285 textures from manifest)
- Per-zone directory filtering and search
- Alpha map editing with 4-layer limit (auto-replaces weakest)
Object Placement:
- M2 and WMO model placement with full manifest browser (11k M2s, 2k WMOs)
- M2Renderer + WMORenderer integrated (loads .skin files for WotLK)
- Ghost preview follows cursor before placing
- Ctrl+click selection, right-click context menu
- Transform gizmo (Move/Rotate/Scale with axis constraints)
- Position/rotation/scale editing in properties panel
NPC/Monster System:
- 631 creature presets scanned from manifest, categorized
(Critters, Beasts, Humanoids, Undead, Demons, etc.)
- Stats editor: level, health, mana, damage, armor, faction
- Behavior: Stationary, Patrol, Wander, Scripted
- Aggro/leash radius, respawn time, flags (hostile/vendor/etc.)
- Save creature spawns to JSON
Water:
- Place water at configurable height per chunk
- Liquid types: Water, Ocean, Magma, Slime
- Rendered as translucent colored quads
- Saved in ADT MH2O format
Infrastructure:
- Free-fly camera (WASD/QE, right-drag look, scroll speed)
- 5-mode toolbar: Sculpt | Paint | Objects | Water | NPCs
- Asset browser indexes full manifest on startup
- Editor water/marker shaders (pos+color vertex format)
- forceNoCull added to M2Renderer for editor use
- AssetManifest::getEntries() and AssetManager::getManifest() exposed
Known issues:
- M2/WMO rendering may not display on first placement (frame index
sync between update/render was misaligned — now fixed but untested
end-to-end)
- Validation layer errors on shutdown (resource cleanup ordering)
- Object placement on steep terrain can miss raycast
- No undo for texture painting or object placement yet
2026-05-05 03:47:03 -07:00
|
|
|
// Water editing
|
|
|
|
|
void setWaterLevel(const glm::vec3& center, float radius, float waterHeight, uint16_t liquidType = 0);
|
|
|
|
|
void removeWater(const glm::vec3& center, float radius);
|
|
|
|
|
|
2026-05-05 04:34:03 -07:00
|
|
|
// Hole editing (4x4 bitmask per chunk — cave entrances, mine shafts)
|
|
|
|
|
void punchHole(const glm::vec3& center, float radius);
|
|
|
|
|
void fillHole(const glm::vec3& center, float radius);
|
|
|
|
|
|
feat(editor): add standalone world editor (rough/WIP)
Standalone wowee_editor tool for creating custom WoW zones.
This is a rough initial implementation — many features work but
M2/WMO rendering still has issues (frame sync, texture layout
transitions) and needs further polish.
Terrain:
- Create new blank terrain with 10 biome types (Grassland, Forest,
Jungle, Desert, Barrens, Snow, Swamp, Rocky, Beach, Volcanic)
- Load existing ADT tiles from extracted game data
- Sculpt brushes: Raise, Lower, Smooth, Flatten, Level
- Chunk edge stitching prevents seams between tiles
- Undo/redo (100-deep stack, Ctrl+Z/Ctrl+Shift+Z)
- Save to WoW ADT/WDT format
Texture Painting:
- Paint/Erase/Replace Base modes
- Full tileset texture browser (1285 textures from manifest)
- Per-zone directory filtering and search
- Alpha map editing with 4-layer limit (auto-replaces weakest)
Object Placement:
- M2 and WMO model placement with full manifest browser (11k M2s, 2k WMOs)
- M2Renderer + WMORenderer integrated (loads .skin files for WotLK)
- Ghost preview follows cursor before placing
- Ctrl+click selection, right-click context menu
- Transform gizmo (Move/Rotate/Scale with axis constraints)
- Position/rotation/scale editing in properties panel
NPC/Monster System:
- 631 creature presets scanned from manifest, categorized
(Critters, Beasts, Humanoids, Undead, Demons, etc.)
- Stats editor: level, health, mana, damage, armor, faction
- Behavior: Stationary, Patrol, Wander, Scripted
- Aggro/leash radius, respawn time, flags (hostile/vendor/etc.)
- Save creature spawns to JSON
Water:
- Place water at configurable height per chunk
- Liquid types: Water, Ocean, Magma, Slime
- Rendered as translucent colored quads
- Saved in ADT MH2O format
Infrastructure:
- Free-fly camera (WASD/QE, right-drag look, scroll speed)
- 5-mode toolbar: Sculpt | Paint | Objects | Water | NPCs
- Asset browser indexes full manifest on startup
- Editor water/marker shaders (pos+color vertex format)
- forceNoCull added to M2Renderer for editor use
- AssetManifest::getEntries() and AssetManager::getManifest() exposed
Known issues:
- M2/WMO rendering may not display on first placement (frame index
sync between update/render was misaligned — now fixed but untested
end-to-end)
- Validation layer errors on shutdown (resource cleanup ordering)
- Object placement on steep terrain can miss raycast
- No undo for texture painting or object placement yet
2026-05-05 03:47:03 -07:00
|
|
|
bool hasUnsavedChanges() const { return dirty_; }
|
|
|
|
|
void markSaved() { dirty_ = false; }
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
void applyRaise(float dt);
|
|
|
|
|
void applySmooth(float dt);
|
|
|
|
|
void applyFlatten(float dt);
|
2026-05-05 04:44:54 -07:00
|
|
|
void applyErode(float dt);
|
feat(editor): add standalone world editor (rough/WIP)
Standalone wowee_editor tool for creating custom WoW zones.
This is a rough initial implementation — many features work but
M2/WMO rendering still has issues (frame sync, texture layout
transitions) and needs further polish.
Terrain:
- Create new blank terrain with 10 biome types (Grassland, Forest,
Jungle, Desert, Barrens, Snow, Swamp, Rocky, Beach, Volcanic)
- Load existing ADT tiles from extracted game data
- Sculpt brushes: Raise, Lower, Smooth, Flatten, Level
- Chunk edge stitching prevents seams between tiles
- Undo/redo (100-deep stack, Ctrl+Z/Ctrl+Shift+Z)
- Save to WoW ADT/WDT format
Texture Painting:
- Paint/Erase/Replace Base modes
- Full tileset texture browser (1285 textures from manifest)
- Per-zone directory filtering and search
- Alpha map editing with 4-layer limit (auto-replaces weakest)
Object Placement:
- M2 and WMO model placement with full manifest browser (11k M2s, 2k WMOs)
- M2Renderer + WMORenderer integrated (loads .skin files for WotLK)
- Ghost preview follows cursor before placing
- Ctrl+click selection, right-click context menu
- Transform gizmo (Move/Rotate/Scale with axis constraints)
- Position/rotation/scale editing in properties panel
NPC/Monster System:
- 631 creature presets scanned from manifest, categorized
(Critters, Beasts, Humanoids, Undead, Demons, etc.)
- Stats editor: level, health, mana, damage, armor, faction
- Behavior: Stationary, Patrol, Wander, Scripted
- Aggro/leash radius, respawn time, flags (hostile/vendor/etc.)
- Save creature spawns to JSON
Water:
- Place water at configurable height per chunk
- Liquid types: Water, Ocean, Magma, Slime
- Rendered as translucent colored quads
- Saved in ADT MH2O format
Infrastructure:
- Free-fly camera (WASD/QE, right-drag look, scroll speed)
- 5-mode toolbar: Sculpt | Paint | Objects | Water | NPCs
- Asset browser indexes full manifest on startup
- Editor water/marker shaders (pos+color vertex format)
- forceNoCull added to M2Renderer for editor use
- AssetManifest::getEntries() and AssetManager::getManifest() exposed
Known issues:
- M2/WMO rendering may not display on first placement (frame index
sync between update/render was misaligned — now fixed but untested
end-to-end)
- Validation layer errors on shutdown (resource cleanup ordering)
- Object placement on steep terrain can miss raycast
- No undo for texture painting or object placement yet
2026-05-05 03:47:03 -07:00
|
|
|
void stitchEdges(int chunkIdx);
|
|
|
|
|
|
|
|
|
|
std::vector<int> getAffectedChunks(const glm::vec3& center, float radius) const;
|
|
|
|
|
glm::vec3 chunkVertexWorldPos(int chunkIdx, int vertIdx) const;
|
|
|
|
|
float getVertexHeight(int chunkIdx, int vertIdx) const;
|
|
|
|
|
void setVertexHeight(int chunkIdx, int vertIdx, float height);
|
|
|
|
|
|
2026-05-05 06:15:33 -07:00
|
|
|
struct StampVertex { float dx, dy, height; };
|
|
|
|
|
std::vector<StampVertex> stampData_;
|
|
|
|
|
glm::vec3 stampCenter_{0};
|
|
|
|
|
|
feat(editor): generator undo, quit confirmation, state cleanup
- All terrain generators now undoable: crater, mesa, hill, voronoi,
dunes, detail noise, thermal erosion, canyon, island, ridge, road,
river, perlin noise — all wrapped with recordGeneratorUndo/commit
- Unsaved changes warning on quit: Save & Quit / Quit / Cancel dialog
- createNewTerrain clears quest editor and path capture state
- recordGeneratorUndo/commitGeneratorUndo helper methods snapshot all
256 chunks before/after any generator operation
2026-05-05 13:26:38 -07:00
|
|
|
void recordGeneratorUndo();
|
|
|
|
|
void commitGeneratorUndo();
|
|
|
|
|
|
feat(editor): add standalone world editor (rough/WIP)
Standalone wowee_editor tool for creating custom WoW zones.
This is a rough initial implementation — many features work but
M2/WMO rendering still has issues (frame sync, texture layout
transitions) and needs further polish.
Terrain:
- Create new blank terrain with 10 biome types (Grassland, Forest,
Jungle, Desert, Barrens, Snow, Swamp, Rocky, Beach, Volcanic)
- Load existing ADT tiles from extracted game data
- Sculpt brushes: Raise, Lower, Smooth, Flatten, Level
- Chunk edge stitching prevents seams between tiles
- Undo/redo (100-deep stack, Ctrl+Z/Ctrl+Shift+Z)
- Save to WoW ADT/WDT format
Texture Painting:
- Paint/Erase/Replace Base modes
- Full tileset texture browser (1285 textures from manifest)
- Per-zone directory filtering and search
- Alpha map editing with 4-layer limit (auto-replaces weakest)
Object Placement:
- M2 and WMO model placement with full manifest browser (11k M2s, 2k WMOs)
- M2Renderer + WMORenderer integrated (loads .skin files for WotLK)
- Ghost preview follows cursor before placing
- Ctrl+click selection, right-click context menu
- Transform gizmo (Move/Rotate/Scale with axis constraints)
- Position/rotation/scale editing in properties panel
NPC/Monster System:
- 631 creature presets scanned from manifest, categorized
(Critters, Beasts, Humanoids, Undead, Demons, etc.)
- Stats editor: level, health, mana, damage, armor, faction
- Behavior: Stationary, Patrol, Wander, Scripted
- Aggro/leash radius, respawn time, flags (hostile/vendor/etc.)
- Save creature spawns to JSON
Water:
- Place water at configurable height per chunk
- Liquid types: Water, Ocean, Magma, Slime
- Rendered as translucent colored quads
- Saved in ADT MH2O format
Infrastructure:
- Free-fly camera (WASD/QE, right-drag look, scroll speed)
- 5-mode toolbar: Sculpt | Paint | Objects | Water | NPCs
- Asset browser indexes full manifest on startup
- Editor water/marker shaders (pos+color vertex format)
- forceNoCull added to M2Renderer for editor use
- AssetManifest::getEntries() and AssetManager::getManifest() exposed
Known issues:
- M2/WMO rendering may not display on first placement (frame index
sync between update/render was misaligned — now fixed but untested
end-to-end)
- Validation layer errors on shutdown (resource cleanup ordering)
- Object placement on steep terrain can miss raycast
- No undo for texture painting or object placement yet
2026-05-05 03:47:03 -07:00
|
|
|
pipeline::ADTTerrain* terrain_ = nullptr;
|
|
|
|
|
EditorBrush brush_;
|
|
|
|
|
EditorHistory history_;
|
|
|
|
|
|
|
|
|
|
bool strokeActive_ = false;
|
|
|
|
|
bool dirty_ = false;
|
|
|
|
|
std::vector<int> dirtyChunks_;
|
|
|
|
|
|
|
|
|
|
static constexpr float TILE_SIZE = 533.33333f;
|
|
|
|
|
static constexpr float CHUNK_SIZE = TILE_SIZE / 16.0f;
|
|
|
|
|
static constexpr float GRID_STEP = CHUNK_SIZE / 8.0f;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace editor
|
|
|
|
|
} // namespace wowee
|