Turn isolated photos and AI-generated images into seamlessly tiling PBR materials. A fast Editor tool that algorithmically heals edge seams across your Albedo, Normal, Height, and Mask textures.The Seamless Sandbox is a free, Editor-only utility designed to convert raw, non-tiling images—such as AI-generated textures, downloaded reference photos, or photogrammetry scans—into seamless, tileable PBR materials directly within Unity.Instead of exporting your textures to external image editors to manually offset the canvas and clone-stamp the boundaries, this tool uses GPU compute shaders to procedurally heal edge seams and output ready-to-use terrain and environment textures.Core Features at a Glance:Procedural Seam Healing: Choose between Offset (cross-masking) or Mirror (symmetry reflection) algorithms to mathematically force edge alignment.Synchronous PBR Processing: Heals Albedo, Normal, Height, and Mask maps simultaneously using the exact same noise parameters, ensuring physical depth data aligns perfectly with color data.Aspect Fill: Automatically center-crops mismatched or irregular input resolutions to fit your target square bounds, preventing destructive pixel stretching.Normal Map Preservation: Bypasses standard linear interpolation for normal maps, utilizing a Reoriented Normal Mapping (RNM) kernel to preserve Z-axis depth and curvature across the healed seams.Interactive 3D Preview: Evaluate your generating material in a dockable window by projecting it onto a 3D plane. Adjust the tiling scale (1x to 5x) to verify macro-patterns are eliminated before committing to a disk bake.Procedural Control & MechanicsThe tool allows you to force isolated images to tile using two different assembly methods:Offset Strategy: Shifts the UV coordinates by exactly 0.5 to expose the non-tiling outer seams directly in the center of the canvas. It then smoothly blends the original texture back over the exposed edges using a procedural cross-mask.Mirror Strategy: Reflects the image into a 2x2 grid to force exact mathematical edge alignment. To break up the unnatural, highly symmetrical "kaleidoscope" effect, it applies an organic noise mask along the axes of symmetry.To disguise the healed edges organically, the tool avoids straight linear blending. Instead, you control the transition masks using standard Fractal Brownian Motion (fBm) noise. By adjusting the scale, octaves, and persistence of the noise, or applying Domain Warping to physically distort the coordinates into swirling shapes, you can tailor the seam mask to match the specific grain and flow of your input material.Limitations & ScopeTo make sure this tool fits your workflow, please note its limitations:Input-Dependent Quality: This tool edits existing images; it does not synthesize textures from scratch or add detail to low-resolution inputs. The output quality depends entirely on the quality of your source files.Not a Delighter: It does not remove baked-in directional lighting, highlights, or heavy shadows that may be present in raw photography.Not a 3D Painter: It operates strictly in 2D texture space. You cannot paint directly onto meshes or models.Editor-Only: This is an offline asset preparation tool. It is not meant for generating or modifying materials dynamically at runtime during gameplay.A Note on Licensing & Commercial UseProcessing an existing downloaded or AI-generated image creates a derivative work. Blending or modifying a texture does not override its original copyright. You generally cannot legally resell textures generated by this tool on the Asset Store (or other marketplaces) unless the original licenses of your input textures explicitly allow for the commercial redistribution of derivative works. You are responsible for ensuring you have the proper rights to use your inputs.Expand Your ToolkitIf you are looking for a way to generate base materials that you fully own from scratch, or need tools to optimize your textures further, this free utility is part of a larger ecosystem of environment optimization tools:Noise Texture Generator: Procedural PBR BakerA procedural texture baker powered by the Burst Compiler. Blend Voronoi, FBM, and SDF math to algorithmically generate and bake seamlessly tiling PBR materials without leaving the Unity Editor. (Because these textures are synthesized directly from math, you retain full commercial ownership over the outputs).Texture Splatting & Bombing ToolkitA GPU-accelerated texture compositor. Procedurally fuse up to 4 PBR materials using noise-based splatting, or use Texture Bombing to scatter details. Create endless offline material variations.Texture Converter: Resizer, Packer & ReplacerOptimize your VRAM footprint. This toolkit batch-resizes heavy textures, mathematically packs PBR channels on the GPU, and automatically rewires project dependencies via raw YAML injection.Technical DetailsCore Specifications & FormatAsset Type: Editor-only utility. All scripts are safely isolated within a custom Assembly Definition (.asmdef) and contain absolutely no runtime code. The asset will not be included in your compiled game builds and carries zero impact on your game's runtime CPU/GPU performance.Pipeline Compatibility: The tool outputs standard 2D .png texture files. Because the final assets are standard texture data, they are universally compatible with the Built-In Render Pipeline, Universal Render Pipeline (URP), High Definition Render Pipeline (HDRP), or any custom shader environment.Dependencies: No third-party plugins, packages, or external dependencies are required. It operates natively using Unity's core libraries.Demo Assembly: The package includes a standalone CPU-based procedural texture generator for testing (using mathematical Voronoi and Perlin patterns). This exists in a separate, easily disposable folder so you can learn the tool's mechanics without importing heavy 4K sample images. It can be deleted instantly without breaking the core toolset.Data Integrity & PBR ProcessingSynchronous Multi-Channel Processing: The tool routes and processes up to four PBR channels (Albedo, Normal, Mask, Height) concurrently. The generated procedural noise seed, UV offsets, and Domain Warping coordinates are computed exactly once per pixel and injected identically into every channel. This strict synchronization guarantees that physical depth maps and surface reflection data perfectly align with the color data across the newly healed boundaries.Automated Aspect-Fill Resolution Interception: To handle irregular AI-generated textures or mismatched source photos (e.g., a 1024x1024 Albedo paired with a 1024x1536 Height map), the utility intercepts input dimensions before blending. It calculates the aspect ratio difference between the source image and your defined Target Resolution bounds, dynamically computing a scale-and-offset matrix to center-crop the data directly inside the shader. This prevents destructive pixel stretching or squashing entirely.Reoriented Normal Mapping (RNM): Normal maps bypass standard linear color interpolation, which mathematically flattens tangent space vectors and destroys lighting depth. Instead, the compute shader natively detects compressed normal map formats (such as modern BC5 or legacy DXT5nm encoding), unpacks them into standard tangent space, calculates complex RNM blending to preserve depth and Z-axis curvature across the seam, and correctly prepares it for output.Algorithmic Architecture (Compute Shaders)GPU Offloading: Core mathematical operations are handled entirely by HLSL Compute Shaders (.compute). By dispatching these calculations across thread groups on the GPU, the tool offloads the heavy, multi-channel processing from the CPU, preventing Editor lockups and UI freezing during 4K/8K generation.Mirror Strategy: Reflects the input across the X and Y axes into a 2x2 grid, mathematically forcing the outer edges to align perfectly. It then masks an organically shifted duplicate over the axes of symmetry to break the unnatural "kaleidoscope" effect.Offset & Mirror Algorithms: Offset Strategy: Mathematically wraps UV coordinates by exactly 0.5 to push non-tiling boundaries into the center of the canvas. The shader then calculates a procedural cross-mask to seamlessly cross-fade the original, un-offset texture data back over the exposed inner seams.Noise & Domain Warping: The organic blending masks are driven by fractional Brownian motion (fBm) mathematics. The compute shader supports deep detail calculation via adjustable octaves, lacunarity, and persistence. For highly organic materials, the noise is further processed through a custom Domain Warping kernel, which uses a secondary noise matrix to physically distort and push the primary coordinate grid, generating sweeping, non-linear seam blends.Editor Integration & Memory ManagementIsolated 3D GPU Previewer: The 3D Tiled Plane preview does not clutter your active scene hierarchy with temporary GameObjects or materials. It utilizes Unity’s internal PreviewRenderUtility to spawn a fully isolated rendering context, drawing a temporary mesh with a custom unlit shader. It streams volatile RenderTexture data directly from the GPU to this window, completely avoiding disk I/O bottlenecks until you are ready to commit to a save.Hardware UAV & Color Space Workarounds: When writing data back from compute buffers in a project using the Linear rendering color space, hardware Unordered Access Views (UAVs) can struggle with automatic sRGB conversions. The compute shader safely detects your project's active color space and explicitly applies the correct Gamma curve directly to the Albedo output in HLSL before encoding it to PNG, preventing washed-out textures.Texture Importer Automation: Upon saving, the utility automatically hooks into Unity's TextureImporter API to enforce standard PBR rules. It explicitly flags the Albedo map for sRGB, disables sRGB for Mask and Height maps (forcing Linear data interpretation), enables mipmaps, sets the wrap mode to Repeat, and flags the Normal map with the correct internal Unity texture type.Undo Stack Bypass: Writing high-resolution textures to disk repeatedly during testing can cause massive project bloat. The "Delete Last Batch" function executes a permanent file deletion directly from the disk using the AssetDatabase API that deliberately bypasses the Unity Undo stack. This design prevents Editor RAM saturation and project bloat when you are rapidly generating and discarding temporary procedural variations.Licensing & Derivative WorksDerivative Works: The algorithms in this tool create derivative works based entirely on your input textures. Modifying a downloaded photograph or an AI-generated image does not override its original copyright.Commercial Resale: You cannot legally package and resell textures generated by this tool on the Asset Store (or other 3D marketplaces) unless the licenses of your original input textures explicitly allow for the commercial redistribution of derivative works. You are solely responsible for ensuring you hold the proper rights to use and distribute your input files.


