Bypass Unity's rigid rules for terrain subdivision. Slice into arbitrary NxM grids, extract hero areas, or shave unused edges. A multithreaded utility that aligns heights and splatmaps at seams.The Terrain Slicer is an editor and runtime utility designed to divide, crop, and extract Unity landscapes using custom, non-standard boundaries.Unity’s native Terrain Toolkit is perfectly fine if you only need to split a map into a standard power-of-two grid (like 2x2 or 4x4). However, level design rarely fits into perfect mathematical boxes. If you need to divide a 3km map into a streamable 3x3 grid, shave off an unused edge of a landscape to save memory, or isolate a specific 800m "hero" valley from a massive open world, default systems hit a wall. Attempting arbitrary cuts typically results in mismatched seams, broken splatmaps, and misaligned geometry.This tool addresses that gap. It handles the heavy interpolation math required to execute non-standard divisions, allowing you to slice, crop, and organize your terrain data exactly how your project requires, all while ensuring that heights, textures, and vertex spacing remain perfectly aligned.Editor Workflow & CapabilitiesInstead of forcing you into strict division rules, the Slicer provides specific controls for how your landscape is cut and extracted.Precision Non-Standard Grids: Accurately handle real-world divisions. You can slice a master terrain into a 3x3, 5x2, or any other NxM grid layout to prepare a massive map for occlusion culling and data streaming, and the engine will interpolate the data boundaries perfectly.Hero Extraction & Edge Shaving: If you only need a specific portion of your master terrain, or just want to delete an unused side, you can use percentage sliders or exact world-space coordinates to extract a localized "hero" region. The tool can discard the unused surrounding landscape, or it can generate a perfectly aligned boundary frame (North, South, East, West chunks) around your extracted area to eliminate visual mesh tears at the borders.Smart Auto-Scaling: To make arbitrary cuts work without destroying your memory budget, the engine features a dynamic resolution calculator. It scales the resolution of your new chunks proportionally to their physical extraction footprint. It strictly snaps to Unity's native backend constraints (like Power of Two + 1 for heightmaps) to guarantee 1:1 vertex density without generating bloated files.The Revert Safety Net: Terrain slicing is a destructive process that generates new asset files. To support faster iteration, the Editor window includes a "Delete Last Operation" function. This instantly wipes the generated terrain assets from your project folder and re-activates your original source terrain so you can quickly adjust your custom extraction bounds.The Core Engine & Burst OptimizationSlicing multidimensional data points—heightmaps, alphamaps, detail layers, terrain holes, and tree instances—across arbitrary custom bounds is a massive mathematical operation. Standard C# loops handling this volume of data will quickly lock up the main thread and freeze the Editor.Multithreaded Processing: The tool leverages Unity's Burst Compiler and the C# Job System to crunch coordinate mapping and array extraction concurrently across CPU threads, moving the workload off the main thread for asynchronous execution.Decoupled Payload (Atomic Sync): Modern rendering pipelines in Unity can struggle and trigger Out-Of-Memory (OOM) crashes when forced to serialize massive splatmap texture arrays mid-generation. To maintain Editor stability, the engine uses an asset-first serialization strategy. It generates the raw .asset files on your disk first, and safely injects the heavy multidimensional arrays post-serialization to bypass Unity's native memory wipes.System Constraints & LimitationsBefore integrating this tool into your workflow, it is important to clearly define what it does and what its technical limits are.Not a Magic Optimization Button: The Slicer is fundamentally a layout and data-management engine. It perfectly divides your multidimensional arrays into seamless tiles. However, cutting a terrain into pieces does not instantly improve performance on its own. To actually see framerate and memory gains in your game, you must pair these newly sliced chunks with your own occlusion culling, distance-loading logic, or a streaming system like Unity's Addressables.Invalidates Baked Data: Slicing a terrain is a destructive operation that dynamically alters original meshes and physical bounds. This means any previously generated baked data—such as NavMeshes, Lightmaps, or Occlusion Culling—will become invalid for the newly generated chunks. You must regenerate your baked lighting and pathfinding after the slicing operation is complete.RAM-Intensive Operations: Extracting and splitting massive arrays from a 4K resolution master terrain requires significant Editor RAM. While the core engine specifically "chunks" the data in localized rows rather than loading the entire monolithic terrain into memory at once, heavy slices on lower-spec machines may still cause Editor slowdowns.Strict Engine Limits: The slicer outputs standard Unity TerrainData assets, meaning it is rigidly bound by Unity's native engine limits. Target heightmaps must adhere to the Power of Two + 1 rule, and splatmaps must be pure Powers of Two. The tool handles these mathematical constraints automatically, but you cannot force arbitrary resolutions that the Unity engine itself does not support.Runtime Generation & Dynamic ExecutionWhile slicing is typically handled in the Editor during the static level design phase, projects like procedural world generators, infinite runners, or UGC sandboxes may require dynamic terrain manipulation during gameplay.Dynamic Execution: The included RuntimeTerrainSlicer MonoBehaviour hooks directly into the same Burst-compiled core engine used by the Editor. This allows you to execute complex, arbitrary slices asynchronously alongside your main game loop without locking up the main thread.Thread-Safe API: If you are building your own custom procedural generation pipelines, the core math engine is exposed via a thread-safe, cancellation-token-supported API (TerrainSlicerCore.SplitTerrainAsync).Recommended Ecosystem & Workflow ToolsThe Slicer is designed as a one-way operation. It excels at breaking massive landscapes apart or extracting specific pieces, but it cannot reconnect them. It integrates directly with two other tools available on my publisher page:Terrain Merger (FREE): Designed as the exact inverse of this tool. Once your terrain is sliced, making sweeping global edits—like painting a massive new biome across a seam or smoothing a mountain that spans four different chunks—becomes incredibly tedious. The Terrain Merger perfectly stitches your tiles back together with edge feathering so you can make your global edits, and then use the Slicer to cut it back apart.BurstLOD: The Slicer optimizes your ground by breaking it into streamable chunks. But if you populate those chunks with high-poly trees, rocks, and buildings, your performance will still tank. BurstLOD generates highly optimized runtime or Editor-based LODs, ensuring the custom prefabs you place on your terrain stay just as performant as the terrain itself.Compatibility & Getting StartedRequirements: Requires Unity 6 or newer. Fully compatible with the Built-in Render Pipeline, URP, and HDRP.Native Dependencies: Relies entirely on standard Unity packages (Unity.Burst, Unity.Collections, Unity.Mathematics) which are included natively in modern engine versions. No external setup is required.Clean Footprint: This asset is built to be a lightweight utility. It does not include bloated, pre-packaged demo scenes. Simply import the package, open the tool, and test it on your own blank terrains in just a few minutes.Support the DevelopmentAs a solo developer, creating and maintaining free tools requires a significant time investment. If this asset speeds up your workflow or saves you from manual terrain headaches, please consider leaving a rating or review on the Asset Store. It is the single best way to help the tool gain visibility in the algorithm and supports continued updates. Good luck with your project.Requirements & CompatibilityMinimum Unity Version: Unity 6 or newer.Render Pipelines: Fully compatible with the Universal Render Pipeline (URP) and High Definition Render Pipeline (HDRP). It is currently compatible with the Built-in Render Pipeline, but please note that as Unity phases the Standard pipeline into legacy status, future updates to this asset will prioritize modern SRP architecture.Dependencies: Relies on native Unity.Burst, Unity.Collections, and Unity.Mathematics packages (included by default in modern Unity projects).Asset Architecture & FootprintUltra-Lightweight Size: This asset is incredibly small (only a few kilobytes) and carries absolutely zero passive overhead. It will not impact your Editor performance, compile times, or project load times unless you are actively running a slicing operation.No Demo Bloat: To maintain a clean project footprint, no heavy pre-packaged demo scenes or dummy textures are included. The included documentation provides a Quick Start guide explaining how to test the tool safely on your own terrains in just a few minutes.Strict Assembly Organization: The codebase is cleanly partitioned into three dedicated Assembly Definitions: Editor, Runtime, and Core. The Editor and Runtime assemblies rely on the Burst-compiled Core math. This guarantees that Editor UI scripts are safely stripped from your final build.Zero MonoBehaviour Contamination: The slicing engine generates standard, vanilla Unity Terrain and TerrainData objects. There are no proprietary scripts or custom MonoBehaviours permanently attached to the generated chunks. If you only use this tool for static level design, you can safely exclude or delete the entire asset from your project after slicing, and your resulting terrains will continue to function perfectly.Core Systems & MathematicsArbitrary Interpolation Engine: Uses Burst-compiled Jobs to calculate non-standard coordinate mapping. It smoothly interpolates heights, alphamaps, detail layers, and holes to ensure mathematically seamless transitions when performing custom, non-power-of-two extractions.Multithreaded Processing: Fully utilizes the C# Job System to asynchronously crunch massive multidimensional arrays without locking the main Unity thread.Decoupled Payload (Atomic Sync): Employs an asset-first serialization strategy for heavy splatmaps. It establishes the raw .asset files on disk first, safely injecting the multidimensional float arrays post-serialization to bypass Unity's native memory wipes and prevent Editor Out-Of-Memory (OOM) crashes.Data Chunking: Extracts and processes heavy TerrainData in localized rows rather than loading monolithic arrays into active Job memory all at once, further mitigating RAM spikes during massive 4K+ slicing operations.Generated OutputsValidated Target Resolutions: The engine strictly enforces Unity’s mathematical backend constraints natively (e.g., forcing heightmaps to be a Power of Two + 1, and basemaps to pure Powers of Two).Sub-Asset Binding: Automatically packs and explicitly binds generated alphamap textures as nested sub-assets to prevent data loss or decoupling within your project window.Inherited Configurations: Re-instantiates clean Terrain prefabs that seamlessly inherit rendering settings from the original source terrain, including shadow casting modes, basemap distances, material templates, tree draw distances, and detail scatter modes.Optional Centered Pivots: Can automatically wrap extracted terrain chunks within an empty parent GameObject positioned exactly at their physical center offset to make scene view manipulation easier.Runtime API & FeaturesThread-Safe Runtime API: Includes a fully asynchronous, cancellation-token-supported API (TerrainSlicerCore.SplitTerrainAsync) designed to safely execute non-standard spatial slices dynamically from your native game loops.Live Extraction Configuration: The RuntimeTerrainSlicer MonoBehaviour exposes public methods allowing you to dynamically feed specific percentage ranges or world-space coordinates via code right before triggering a slice.




