Combine adjacent terrain tiles and overlapping sections into one editable Unity TerrainData, including heights, textures, details, trees, and holes, with Burst-powered Editor and runtime support.Combine Existing Unity Terrains into One Editable LandscapeUnity provides tools for editing individual terrains, but it does not include a built-in workflow for combining several existing TerrainData assets into one new terrain.Terrain Merger fills that gap. It combines adjacent terrain tiles, overlapping terrain sections, or smaller terrain features placed over a larger base terrain into one new Terrain and TerrainData asset. Source TerrainData assets are read during the operation and are not overwritten.This is useful when a divided landscape needs to be sculpted, painted, or edited as one continuous surface.What Is Merged?Terrain Merger combines:HeightmapsTerrainLayers and alphamapsDetail prototypes and detail mapsTree prototypes and tree instancesTerrain holesSelected material and rendering settingsWhen several sources reference the same TerrainLayer, detail asset, or tree prefab, the output reuses that shared reference.Common UsesTerrain Merger can be used to:Combine imported or procedurally generated terrain grids.Consolidate tiles from another asset or world-building tool.Sculpt mountain ranges across former tile boundaries.Paint textures or biomes across a divided landscape.Place a sculpted mountain, crater, island, or other terrain section over a larger base.Create one temporary master terrain for broad edits before dividing it again.Build custom Editor or runtime workflows through the public API.The result can be edited with Unity’s normal terrain tools.Adjacent and Overlapping TerrainsTerrain Merger supports both arrangements, but they behave differently.Adjacent TilesAdjacent terrains are resampled into one output TerrainData. The tool does not automatically bridge empty gaps or repair unrelated edge heights between terrains that were sculpted separately.If neighboring terrains do not already meet correctly, the mismatch may remain visible. After merging, the former boundary is part of one TerrainData asset and can be corrected with Unity’s terrain tools.Overlapping TerrainsWhen terrains overlap, the Blend Radius controls how their height and texture data are feathered near the overlapping boundaries.This supports terrain-stamping workflows, such as placing a smaller mountain terrain over a larger base landscape.Blend Radius affects overlapping areas only. It does not create terrain between separate tiles or fix a physical gap.Editor WorkflowThe included Editor window provides the normal workflow:Add selected Terrain objects or gather active terrains from the scene.Calculate the output bounds automatically or enter custom X/Z bounds.Set the output name, basemap resolution, Blend Radius, and copied settings.Choose Smart Auto-Pathing or a custom project folder.Execute the merge and inspect the result.Revert the latest Editor merge if the settings need adjustment.Smart Auto-Pathing creates a Merged_Terrains folder beside the first source TerrainData asset it can locate. Each operation is saved in a separate timestamped subfolder.The Editor can optionally deactivate the original Terrain GameObjects after success. Their TerrainData assets remain unchanged.Revert Last Merge removes the latest recorded output and reactivates the source GameObjects disabled by that operation.Large and High-Resolution Terrain DataTerrain merging can involve very large height, texture, and detail arrays. Terrain Merger uses Unity’s Burst Compiler and C# Job System for the expensive calculations.Large detail maps and alphamaps are processed in bounded internal sections instead of retaining every complete source and target map at once. Heights, trees, holes, details, and alphamaps are also processed in separate stages. Pixel calculations remain parallel and Burst compiled.The pipeline has been tested with multiple source terrains using Unity’s maximum heightmap and alphamap resolutions and fully populated multilayer alphamaps.Practical merge size still depends on available memory, map resolutions, output bounds, TerrainLayer count, prototype counts, and foliage density. The processing design reduces avoidable memory use, but large operations still require adequate RAM.Runtime Component and Core APIThe included RuntimeTerrainMerger component provides access to the same core engine during Play Mode or in a built player.It supports:Assigned source terrainsGathering active terrains inside a world-space BoundsAutomatic output-bound calculationProgress and completion eventsCooperative cancellationOptional source deactivationRemoval of the generated result and restoration of disabled sourcesA public core API is also available for custom procedural systems and Editor tools.Runtime merging is best suited to loading screens, procedural world setup, user-generated content preparation, or other controlled stages. The heavy calculations use Burst jobs, but creating and assigning Unity TerrainData still uses main-thread Unity APIs. Large runtime merges can therefore cause visible stalls.Output ResolutionEach operation creates one Terrain and one TerrainData object.Unity limits a single TerrainData asset to:Maximum heightmap resolution: 4097Maximum alphamap resolution: 4096Maximum detail resolution: 4048, subject to Unity’s detail patch requirementsTerrain Merger calculates output resolution from source sampling density and the selected world-space bounds, then limits it to Unity’s supported values.If several high-resolution tiles cover a larger footprint, the complete area must fit within one terrain. This can reduce samples per world-space metre.TerrainLayers and Prototype AccumulationThe output contains the combined set of unique TerrainLayers, detail prototypes, and tree prototypes used by the sources.For example, six terrains sharing four TerrainLayer assets normally produce four output layers. Six terrains using four separate layer assets each may produce up to twenty-four output layers.Additional TerrainLayers increase alphamap memory and terrain control textures. Large prototype counts can also increase draw calls and reduce instancing efficiency.For better results, source terrains should share a common library of TerrainLayers, detail assets, and tree prefabs whenever practical.Important LimitationsTerrain Merger is a terrain-production and editing tool, not an automatic repair or runtime-optimization system.Blend Radius affects overlapping terrains only.Empty gaps are not filled automatically.Adjacent edge mismatches are not automatically sculpted into alignment.One operation creates one output TerrainData.Unity’s terrain-resolution limits still apply.Large combined footprints may be resampled at a lower world-space density.Unique layers and prototypes accumulate in the output.High TerrainLayer counts can require substantial alphamap memory.A maximum of 64 valid source terrains can be included.A single merged terrain is not automatically faster to render.A monolithic terrain may reduce streaming, selective loading, and culling flexibility. Profile the result separately if it will remain merged in the final build.Demo EnvironmentThe package includes a procedural Demo Scene Generator instead of a large prebuilt scene. It can create adjacent and stacked scenarios with TerrainLayers, trees, details, and optional water. Generated demo assets can be removed after evaluating the workflow.RequirementsTerrain Merger requires Unity 6 or newer and uses the Unity Burst Compiler for its main calculations.The complete dependency list and limits are provided in Technical Details.Expand Your ToolkitTerrain Merger is part of a group of Veridian tools for terrain and environment workflows.Terrain Slicer — FreeTerrain Slicer performs the inverse operation by dividing one large TerrainData asset into smaller terrain tiles.A common workflow is to merge a divided landscape, make broad edits, and then use Terrain Slicer to divide the result for streaming or scene organization.BurstLODBurstLOD generates LODs for mesh-based environment assets such as trees, rocks, buildings, and other props.Terrain Slicer helps organize the ground, while BurstLOD addresses the mesh objects placed across the environment.View the complete Veridian catalog:https://assetstore.unity.com/publishers/120204If Terrain Merger is useful in your project, ratings and reviews are appreciated.Requirements and CompatibilityMinimum Unity version: Unity 6Required packages: Unity Burst, Unity Collections, and Unity MathematicsBurst should remain enabled for expected large-merge performance.The engine operates on standard Unity TerrainData rather than a specific shader.When settings are copied, the output uses the material from the first valid source terrain. That material must support the active render pipeline.The procedural demo uses URP materials.Burst, Collections, and Mathematics are referenced by the Core assembly, not directly by the Editor assembly.Input and Output LimitsValid source terrains per operation: 1 to 64Output terrains per operation: 1Maximum output heightmap resolution: 4097 × 4097Maximum output alphamap resolution: 4096 × 4096Maximum requested detail resolution: 4048, subject to Unity’s detail-patch rulesBasemap resolution is configured separately.X/Z bounds can be calculated from the sources or entered manually.Manual bounds can crop the sources or include extra space.Source TerrainData assets are read but not overwritten.Dense source tiles may be resampled when the combined footprint reaches Unity’s output limits.Merged DataThe output can contain:HeightsTerrainLayers and alphamap weightsDetail prototypes and mapsTree prototypes and instancesTerrain holesTerrain size and placementSelected rendering and material settings from the first sourceTerrainLayers are reused when sources reference the same asset. Detail prototypes are matched by their referenced prefab or texture, and tree prototypes by their prefab.Overlap ProcessingThe engine evaluates sources in world space. For each output sample, it can determine which terrains cover the location, sample their heights, calculate edge weights, order overlapping sources by world height, blend their contributions, and record the dominant source.Blend Radius uses world-space metres. A single covering terrain contributes directly; overlapping terrains are weighted near their boundaries.Processing ArchitectureThe computational stages use Burst-compiled Unity jobs.Processing is divided into metadata, source heights, output heights, trees, holes, details, alphamaps, and final Terrain creation.Large detail maps and alphamaps use adaptive horizontal bands. Each band loads only the required source rows, runs its calculations across Unity worker threads, transfers the result, and releases temporary data before continuing.Band size is selected internally from output width, layer or prototype count, and required source data. There is no public band-size or memory-budget setting.Height, Tree, and Hole HandlingSource heights are loaded in bounded row groups and retained because later stages use them.A Burst-parallel job creates the output heightmap and dominant-source map.Output heights are assigned to TerrainData in partial row groups.Tree instances are loaded during the tree stage, remapped, filtered, assigned, and released.Hole maps are loaded only for the holes stage and merged from dominant-source data.Temporary tree and hole buffers are released after assignment.Detail-Map HandlingDetail maps are processed in horizontal bands.Only required rows from intersecting sources are loaded.Weighted values are normalized and rounded before assignment.Completed prototype bands are applied through Unity’s partial detail-map API.Temporary detail buffers are released after each band.Alphamap HandlingTerrainLayer mappings are prepared before processing.Alphamaps are processed after the other major data categories.Only required source rows are loaded, including extra rows needed for bilinear sampling.Output layer weights are normalized per sample.Completed bands are copied into one final managed payload.Job and Memory HandlingPer-sample overlap data uses fixed inline storage rather than allocating a NativeArray for every sample.No temporary NativeArray is allocated inside the height, detail, or alphamap sample loops.Jobs are completed before their NativeArray output is read.Large data categories are loaded and released in separate stages.Detail and alphamap source data is limited to the active band.Array lengths, offsets, and copy sizes use checked calculations.Temporary native buffers are disposed before the completion callback applies or saves the alphamap.Cancellation is cooperative and checked between stages and bands.Only one Core merge can run at a time.Final Alphamap MemoryThe public result contains one complete floating-point alphamap.At 4096 × 4096, each output TerrainLayer requires approximately 64 MiB.Approximate payload sizes:4 layers: 256 MiB8 layers: 512 MiB16 layers: 1 GiB24 layers: 1.5 GiBThese figures cover only the final managed payload. Additional memory is used for source heights, the dominant-source map, active bands, TerrainData operations, control textures, and Editor serialization.Sharing TerrainLayer assets helps keep the output layer count lower.Editor FeaturesAdd selected Terrain objects or gather active scene terrains.Calculate bounds automatically or edit them manually.Display source and output bounds in the Scene view.Configure output name, basemap resolution, Blend Radius, copied settings, and source deactivation.Warn when Burst is disabled.Use Smart Auto-Pathing or a custom folder inside Assets.Create a timestamped folder for each merge.Save the generated TerrainData and terrain control textures.Display progress and support cooperative cancellation.Revert the most recent recorded Editor merge during the current Editor session.Revert removes the generated output folder and restores the recorded source GameObjects. The current lookup uses object names, so those objects should not be renamed before Revert is used.Runtime ComponentRuntimeTerrainMerger provides:Assigned sources or GatherTerrainsInBounds(Bounds bounds)Optional automatic bounds calculationOptional Merge On Start and source deactivationStartMerging(), CancelMerging(), and DestroyMergedTerrain()Progress and completion eventsCurrent progress and merged-terrain propertiesThe component applies the returned alphamap, marks the basemap dirty, and flushes the generated Terrain before invoking completion.Runtime TerrainData is transient and is not saved as a project asset. Destroying the result also restores source GameObjects deactivated by the component.Practical LimitationsBlend Radius affects overlapping terrains only.Empty gaps are not filled.Adjacent edge mismatches are not automatically aligned.One operation produces one TerrainData.Unity’s resolution limits still apply.Dense tiles may be downsampled into one output.Unique layers and prototypes accumulate.High layer and prototype counts increase memory and rendering cost.Cancellation is cooperative rather than immediate.Runtime merging can include visible main-thread work.A merged terrain is not automatically faster to render than smaller tiles.





