The Map Generator Framework uses an innovative Palette System - like a painter's palette that offers various colors to create art. See technical details section.This project was originally created for a horror video game when I realized I was too lazy to manually create maps... so I built an entire framework instead!The Map Generator Framework uses an innovative Palette System - like a painter's palette that offers various colors to create art, our system provides you with different "palettes" of generation tools. Each palette contains a specific set of parameters and options that work together to create one aspect of your map: terrain height, surface textures, vegetation details, and object placement.Whether you're creating horror landscapes, fantasy worlds, or any other type of environment, this framework provides the tools you need to generate diverse and compelling maps procedurally.==========================================TECHNICAL DETAILS==========================================KEY FEATURES------------- Palette System: Four distinct palette types for complete environment control- Biome System: Define multiple biomes with independent noise configurations- Custom Editors: Dedicated editors for each palette type with intuitive interfaces- Noise Visualizer: Real-time preview of your noise samplers- Modular Design: Use any combination of palettes - enable or disable as needed- Ready-to-Use Demo: Get started immediately with pre-configured examples- Unity Integration: Seamlessly works with Unity's terrain system- World-Space Coordinates: Terrain size properly affects noise samplingKNOWN ISSUES & LIMITATIONS---------------------------- Mesh Terrain: Temporarily disabled in v1.3.0. The generation pipeline now relies exclusively on Unity Terrain. Full mesh support will return in a future version.- Under Development: Some features are still being optimized and may require manual tweaking.PALETTE SYSTEM--------------TerrainPalette - Base Terrain Height GenerationContains a list of SamplerEntry with properties: - BaseNoiseSampler - The noise generator - name - Identifier for the sampler - weight - Influence strength of this sampler - enabled - Toggle sampler on/offTexturePalette - Terrain TexturingManages terrain texturing based on height and slope conditions.Contains a list of TextureEntry with properties: - name - Texture identifier - TerrainLayer - Unity terrain layer reference - minHeight / maxHeight - Height range for texture application - enabled - Toggle texture on/off - useSlope - Enable slope-based placement - minSlope / maxSlope - Slope range when useSlope is enabledDetailPalette - Vegetation & Small DetailsHandles grass, vegetation, and small detail placement.Contains a list of DetailEntry with properties: - name - Detail identifier - renderMode - Rendering method - GameObject prefab - Detail prefab reference - healthyColor / dryColor - Color variation - minWidth / maxWidth - Size variation range - minHeightScale / maxHeightScale - Height scaling range - density - Placement density - minHeightWorld / maxHeightWorld - World height constraints - useSlope - Enable slope-based placement - minSlope / maxSlope - Slope range when useSlope is enabledObjectPalette - Larger Objects & StructuresControls placement of larger objects like rocks, trees, and structures.Each biome can reference multiple ObjectPalettes with independent object counts.Contains a list of ObjectEntry with properties: - name - Object identifier - minHeight / maxHeight - Height placement range - useSlope - Enable slope-based placement - minSlope / maxSlope - Slope range when useSlope is enabled - density - Object placement density - computedRadius - Object influence radiusBiomePalette - Multi-Biome SupportCombines multiple biomes with their own terrain, texture, detail, and object configurations.Each biome can have: - Independent TerrainPalette for unique terrain shapes - Custom TexturePalette for biome-specific texturing - Multiple ObjectPalettes with individual object counts - DetailPalette for biome-specific vegetationGETTING STARTED---------------Prerequisites:- Unity Terrain Tools (recommended)Quick Start:1. Import the Map Generator Framework into your Unity project2. Navigate to the Demo folder3. Add the Terrain to your scene - Pre-configured BiomePalette with sample noise setups - Ready-to-use terrain GameObject4. Hit Play or use the "Generate Map" button from the "Map Generator Script" on TerrainCreating Your First Map:1. Create a new BiomePalette asset (or TerrainPalette for single-biome setups)2. Configure your noise samplers using the custom editor3. Adjust terrainNoiseScale to control feature density: - Lower values (50-100) = larger, more spread-out features - Higher values (200-500) = smaller, more compressed features4. (Optional) Set up TexturePalette for surface texturing5. (Optional) Add DetailPalette for vegetation6. (Optional) Configure ObjectPalette for props and structures7. Generate your map!WORKFLOW--------The Map Generator Framework is designed for maximum flexibility:1. Configure Palettes: Set up any combination of the four palette types2. Configure Biomes: Define multiple biomes with BiomePalette or use single TerrainPalette3. Adjust Terrain Parameters: - heightmapResolution: Controls geometric quality (higher = smoother) - terrainSize: Physical dimensions in world units - terrainNoiseScale: Controls feature density (lower = larger features)4. Preview in Editor: Use the built-in visualizer to preview noise patterns5. Iterate Quickly: Enable/disable palettes and entries for rapid prototyping6. Generate: Create your procedural maps with the click of a buttonNote: Palettes can be configured in any order and combination. You have complete freedom to use only the features you need for your specific project.COORDINATE SYSTEM (v1.3.0+)---------------------------The framework uses a world-space coordinate system where:- Terrain size affects the amount of terrain features you see- terrainNoiseScale controls the "zoom level" of noise sampling- Larger terrains show more features instead of stretching the same pattern- heightmapResolution controls geometric quality independently of sizeExample: A 512x512 terrain with noiseScale=100 will show different content than a 1024x1024 terrain with the same scale, providing natural variety as you scale up.USE CASES---------- Horror Games: Create eerie, unpredictable landscapes with dynamic terrain- Open World Games: Generate vast, diverse environments efficiently- Biome-Based Worlds: Mix deserts, forests, mountains with smooth transitions- Prototyping: Quickly create test environments for gameplay mechanics- Procedural Content: Add infinite variety to your game worlds- Level Design: Use as a base for further manual refinementThe AI/ML helped me as a " duck " for the debugging part and refactoring. Some comments from the refactoring part wasn't removed, i used them for an indicator as " this code come from ia refacto ". Translation and update note are generated by IA.




