High-performance hex terrain engine for Unity DOTS. Create large, interactive worlds with scalable surfaces, jobified systems, and full ECS integration.Note: The optional Terrain Brush implementation uses DecalProjector and therefore depends on the active Render Pipeline. Everything else is Render Pipeline agnostic.Package uses new Unity Input System (UnityEngine.InputSystem)Hex Terrains Framework 2 is a high-performance hex-based terrain and world simulation system built on Unity DOTS (Entities 1.0, Jobs, Burst).Designed for large-scale strategy, 4X, simulation, and sandbox games, it enables the creation of massive, interactive hex worlds with modular architecture, runtime editing, and efficient parallel processing.This is not just a terrain renderer — it is a scalable, layered world system built for long-term production use.As a thank you to early supporters, all Version 1.0 owners receive Version 2.0 as a free upgrade.DiscordDocumentationClass ReferenceEach Terrain is represented as a single ECS Entity composed of modular Terrain Layers.A Terrain Layer encapsulates its own structured Data Layers (per-cell maps) along with the logic responsible for rendering them.A Data Layer stores a value for every terrain cell (such as float, int, Vector3, etc.), and these values can be visualized in different ways.For example, values from the Height Map and Biome Map are rendered as a chunk mesh, where the cell height corresponds to the Height Map value and the cell texture corresponds to the Biome Map value.Another example is the Cell Object Index Map, which stores an integer value for each cell. Each value corresponds to a 3D object from an object palette, which is then rendered on the respective terrain cell.This separation allows clean simulation design, high performance, and full extensibility.Terrain Layer SystemsChunk Mesh Layers(Ground, Water, Snow, Roads, Clouds, Rain, etc.)Procedurally generated mesh per chunkFully independent surface layersCustom or built-in mesh generatorsDesigned for layered environmental renderingCell Region Layers(Countries, Provinces, Territories, etc.)Assigns a Region index per cellCaches cell indices per Region for fast queriesTracks total cell count per RegionAutomatically renders terrain using Region-based colorsCell Minerals Layer(Underground minerals, Dissolved in Air/Water, etc.)Assigns a Mineral Index and Minerals Amount per cellCalculates a color map based on Minerals Color Palette, Mineral Index and Minerals AmountAutomatically renders terrain using Mineral-based colorsCell Entity Layers(Trees, Buildings, Units, Props, etc.)One ECS Entity per cellFully compatible with ECS workflowsSuitable for simulation-heavy gameplay systemsCell Object Layers(Trees, Buildings, Props, etc.)Lightweight static visual objects per cellOptimized alternative to ECS EntitiesDesigned to support millions of objects per terrainGeoPlast Layers(Ground, Ocean, Snow, Atmosphere, Clouds, etc.)Volumetric environmental simulation per cell, supporting:AmountDensityVolumeHeatTemperatureFeatures:Layer stacking (Water above Ground, Air above Water, Clouds above Air, etc.)Horizontal material flow (Ocean currents, cloud movement, lava, pollution, etc.)Vertical flow between layersClouds condense into RainWater freezes into SnowSnow melts intoWater evaporates into CloudsThis enables emergent environmental behavior driven by simulation rather than scripted effects.Sun LayerA dynamic heat source that moves across the terrain.Configurable as a circular zone or directional lineHeats nearby cells and cools distant onesActs as the primary energy driver for climate simulationThe Sun Layer interacts with GeoPlast systems to produce natural weather cycles, freezing, melting, evaporation, precipitation, and heat-based material flow.Core FeaturesRuntime Terrain EditingModular extendable in-game terrain editor. Allows to edit all the data on the terrainBrush-based editing (size, opacity, stamping, sampling, auto-paint)Real-time feedbackIn-game UI Toolkit editorDynamic Terrain CreationCreate terrains at runtimeCustom dimensions, terrain settings, and resolutionRegenerate or resize without restartingModular Terrain Layer ArchitectureCreate custom Terrain Layers composed of Data Maps such as height, biomes, regions, resources, entities, or custom gameplay values.Each Data Layer:Is self-containedUses per-chunk dirty flag trackingSupports job-safe dependency managementIs architecturally separated from renderingHighly Optimized Mesh GenerationBurst-compiled jobsChunk-based rebuild systemMinimal allocationsExtendable with custom generatorsMinimap with Viewport SyncReal-time rendering of any data layerClick-to-center navigationCamera position indicatorSave / Load SupportModular binary serializationSaves full terrain stateIncludes all layers and runtime modificationsWraparound Map SupportHorizontal and vertical edge wrappingSeamless camera traversalSuitable for globe-style or Civilization-like mapsPerformance by DefaultDesigned with scalability as a core principle — you only pay performance cost for the features you actually use.Feature-driven architecture ensures no unnecessary systems run in the backgroundMesh regeneration is limited to modified and visible chunks onlyParallelized calculations powered by Burst-compiled jobsOptimized for large-scale terrainsPerformance tested in standalone builds on terrains up to 300+ FPS on 4096×2048 (8,388,608 cells) static terrain (without simulation) with 5 layers (hardware-dependent).Ideal For4X and Strategy GamesSimulation and Economy GamesCity BuildersCustom World EditorsECS Learning ProjectsGames that require fully interactive hex terrain with high performanceIncludedFull source code (C# + DOTS)Demo project with HDRP and URP samplesIn-game terrain editor with sample toolsProcedural brushes and auto-painting systemsModular, extendable UI frameworkUnity RequirementsUnity 6000.0.50f1 or newerRequires Entities (ECS 1.0) packageUses Burst and Jobs packagesCompatible with URP and HDRP (core system is render pipeline agnostic)Note: The optional Terrain Brush implementation uses DecalProjector and therefore depends on the active Render Pipeline. Everything else is Render Pipeline agnostic.ArchitectureTerrain is implemented as a single ECS EntityChunk-based spatial partitioningTerrain composed of modular Terrain LayersEach Terrain Layer encapsulates structured Data Layers (per-cell maps)Per-chunk dirty flag tracking for selective rebuildsJob-safe read/write dependency managementRenderingHybrid rendering approachUses Graphics.RenderMeshInstanced for mesh layersOptional ECS-based Cell Entity renderingCustom mesh generator interface for extensibilityLayered surface rendering (ground, water, snow, etc.)Simulation SystemsVolumetric GeoPlast material systemHorizontal and vertical material flowHeat-based interaction modelSun-driven environmental simulationPerformance CharacteristicsBurst-accelerated hex math (axial and offset coordinates, flat-top and point-top hex rotation, custom hex radius, custom border size, border on/off, custom bridge size)Parallel chunk mesh generationSelective regeneration of modified visible chunksDesigned for large-scale terrains (tested up to 4096 × 2048 cells in standalone builds)ExtensibilityCustom Terrain Layers supportedCustom Data Layers supportedCustom mesh generators supportedSuitable for integration with gameplay ECS systemsDesigned for multi-terrain projectsSerializationModular binary serializationFull terrain state save/loadSupports runtime modificationsWelcome to our discord: https://discord.com/channels/1384825660710846495/1384825661172224141If you've encountered a bug, please report it here: Report a bug




