Starfield Backdrop Only
To help everyone better understand and experiment with noise layering, I also implemented NoiseVisualizer2D, a custom Unity EditorWindow that enables interactive 2D visualization of the noise layers defined in a ProceduralSurface.

Imain purpose is to provide real-time previews of how each noise layer—or their combinations—appears in 2D space, making it easier to debug, fine-tune, and design procedural terrains.
Loading may take some time...

Step 1: Basic Window Setup
Click Window -> Noise Visualizer 2D to open the tool

Step 2: Layer Management UI
Draw ProceduralSurface to the window

Step 3: Single Layer Preview
Click each layer to preview, or click Show All Layers to preview the combined effect

Step 4: Interactive Navigation
Zoom and pan controls for detailed inspection of noise patterns.

Step 5: Color Customization
Customizable color gradients for better noise pattern visualization.

Step 6: Layer Editing & Combined Preview
Layer editing capabilities and combined m
ulti-layer preview functionality.


NoiseVisualizer 2D Key Features  

  • Integration with ProceduralSurface — Targets a specific ProceduralSurface instance and inspects its private noiseLayers field via reflection. Supports all noise types under ProceduralSurface.NoiseType.
  • 2D Texture Preview — Samples noise values into a Texture2D grid; each pixel represents an (x,z) position in noise space. Values are normalized to [0, 1] and mapped via Color.Lerp(lowColor, highColor).
  • Layer Control — Lists every noise layer with toggle and preview buttons to visualize single or combined layers.
  • Combined Preview with Noise-Modulated Weights — Each layer’s contribution is scaled by its weight (possibly modulated via NoiseLayer.GetWeight), reproducing the same weighted blending logic used at runtime in CombinedSurfaceJob.
  • Interactive Navigation — Zoom (scroll wheel / slider 0.2×–2×), pan (right-click drag), and reset view controls.
  • Customization — User-defined low/high colors (default black→white) and adjustable resolution (previewSize = 256).

Implementation Details
Generating a Layer Preview — For each pixel (x,y): map into noise space, call GenerateNoiseValue(layer, position), normalize via Mathf.InverseLerp(-0.5, 0.5, value), and map to Color.Lerp(lowColor, highColor).
▼ Click to see the detailed Code (GenerateLayerPreview)
private void GenerateLayerPreview(NoiseLayer layer)
{
    for (int y = 0; y < previewSize; y++)
    {
        for (int x = 0; x < previewSize; x++)
        {
            float nx = (x / (float)previewSize) * 10;
            float ny = (y / (float)previewSize) * 10;

            nx = (nx * zoom) + panOffset.x;
            ny = (ny * zoom) + panOffset.y;

            float noiseValue = GenerateNoiseValue(layer, new Vector3(nx, 0, ny));
            Color color = Color.Lerp(lowColor, highColor, noiseValue);
            pixels[y * previewSize + x] = color;
        }
    }
    previewTexture.SetPixels(pixels);
    previewTexture.Apply();
}

Generating a Combined Preview — For each pixel: compute weights via layer.GetWeight(position), normalize by totalWeight, sample noise from each enabled layer, multiply by weight, accumulate, clamp with minHeight, and map to color.
▼ Click to see the detailed Code (GenerateCombinedPreview)
private void GenerateCombinedPreview(List layers)
{
    for (int y = 0; y < previewSize; y++)
    {
        for (int x = 0; x < previewSize; x++)
        {
            float nx = (x / (float)previewSize) * 10f;
            float ny = (y / (float)previewSize) * 10f;
            nx = (nx * zoom) + panOffset.x;
            ny = (ny * zoom) + panOffset.y;

            float combinedNoise = 0f;
            float totalWeight   = 0f;

            foreach (var layer in layers)
                if (layer.enabled)
                    totalWeight += layer.GetWeight(new Vector3(nx, 0f, ny));

            foreach (var layer in layers)
                if (layer.enabled)
                    combinedNoise += GenerateNoiseValue(layer, new Vector3(nx, 0f, ny))
                                   * (layer.GetWeight(new Vector3(nx, 0f, ny)) / totalWeight);
            combinedNoise = Mathf.Max(combinedNoise, targetSurface.minHeight);
            Color color   = Color.Lerp(lowColor, highColor, combinedNoise);
            pixels[y * previewSize + x] = color;
        }
    }
    previewTexture.SetPixels(pixels);
    previewTexture.Apply();
}
Benefits
  • Aid — See each noise layer before applying it to the 3D mesh.
  • Authoring Tool — Easily tune frequency, octaves, and persistence.
  • Consistency — Uses the same noise generators as CombinedSurfaceJob for matching runtime results.
  • Interactivity & UX — Zoom, pan, toggle and color customization ensure fluid workflow. 
  • Iterative Design — Evolved from single-layer to multi-layer previews with real-time feedback and GIF demos.