Docs/ Introduction
UE 5.5 5.6 5.7 5.8

Introduction

Instant Organic Caves key art: a moss-lit cavern with the arch logo mark at its centre
Math · not · meshes v0.4.0 — GregOrigin
New here? This manual is a reference — it documents every property but does not teach the workflow. Start with the tutorial, which walks from a fresh install to your first cave in about five minutes, then come back here for detail.

Instant Organic Caves (IOC) is a high-performance C++ plugin for Unreal Engine that replaces static cave asset packs with a fully deterministic, parametric procedural pipeline. It generates tunnels and density-field caverns asynchronously on background threads, with explicit production budgets, seam-safe open-world chunk streaming, runtime mesh carving, Biome Volume spatial overrides, Blueprint gameplay APIs, and full multiplayer replication.

⚡ Async Core

All voxel evaluation and meshing run on background threads. Main thread only commits the final mesh.

🌊 Perlin Tunnels

Distance-field plus noise radius guarantees a connected organic tube between any two 3D points, or follow a spline for art-directed paths.

🌍 Open World

StreamingManager auto-loads/unloads voxel-grid-aligned chunks around players with throttled spawning and carve history persistence.

🎯 Biome Volumes

Place AIOCBiomeVolume brushes to locally override noise frequency, radius, wall thickness, or terrace steps within any sub-region.

💥 Runtime Carving

Blow holes at runtime from Blueprint. Carve history is replicated and persists across streaming chunk unload/reload.

🎨 Zero-Texture Material

Procedural math rock uses World Position noise. Zero texture bytes, no UV stretching, infinite scale.

Quickstart & Demo

🚶 Walk it — the interactive tour

  1. Tools → Instant Organic Caves → Open Interactive Demo
  2. Press Play, then walk with WASD and look with the mouse.

A 264 m stone path through six feature zones — The Mouth (a preset cave actor), The Winding Run (a spline tunnel flared by a biome volume), Crystal Gallery (a carved hall dressed by scatter layers), Alien Hive (domain warp), Strata Canyon (terraces from a second biome volume) and The Forge (sphere, box and capsule carves, and runtime carving: aim at the rock and left-click, or pull the right trigger). A blue crystal by the Forge's far wall leads into Infinite Depths, a tunnel a streaming manager builds around you as you walk. Each zone captions itself as you enter. Four caves, built live in about a second.

The map is /InstantOrganicCaves/Maps/IOC_InteractiveDemo: one AIOCShowcaseLauncher in Interactive Demo mode and a PlayerStart. In any level, IOC.SpawnInteractiveTour (best in Play-In-Editor) or, from C++, FInstantOrganicCavesModule::SpawnInteractiveTour(World, Origin). The demo guide walks the tour zone by zone, with pictures.

🗺️ Watch it — the demo map

  1. Tools → Instant Organic Caves → Open Demo Map
  2. Press Play.

The guided eight-section showcase starts on its own and builds every cave live — nothing is pre-baked. Nothing needs setting up first.

The map lives at /InstantOrganicCaves/Maps/IOC_DemoMap. The Content Browser hides plugin content unless Settings → Show Plugin Content is ticked, which is why the menu entry is the reliable way to reach it.

🚀 Instant Demo — one command

  1. Open the console (~) or Output Log.
  2. Type: IOC.SpawnTunnelDemo
  3. Press Enter. Walk around immediately.
Creates a Perlin Tunnel from (0,0,0) to (3000,1500,800), a full lighting rig (Directional, SkyLight, ExponentialFog, PostProcess), and a 3rd-Person Character with an attached flashlight SpotLight you immediately possess.

🌌 Spectacular Demo

Run IOC.SpawnSpectacular to generate an Alien Hive preset cave with Domain Warping and Terracing at VoxelSize=50 for maximum geometric detail.

🎬 Showcase Flythrough — the full tour

Run IOC.SpawnShowcase for an automated, captioned flythrough of eight sections: Drop-In Cave Actor, Path-Driven Tunnel, Alien Hive, Canyon Strata, Scatter Props, Directed Carving, Streaming Manager, and Performance & Bake. It builds eight caves, a camera rig and its own lighting, and is safe to re-run — a second call reuses what is already there rather than duplicating it.

Prefer menus? Everything here is also under Tools → Instant Organic Caves, and the guided wizard is at Window → IOC Setup Wizard…

🧹 Cleaning up

The demos spawn actors into whatever level is open, so there are two ways to remove them:

  • IOC.ClearShowcase — removes the showcase flythrough and restores the camera. Leaves the tunnel and spectacular demos alone.
  • IOC.ClearAllDemos — removes everything the demo commands created, including the interactive tour, the tunnel demo, the spectacular demo and the demo character. Use this one to put your level back as you found it.
Tip: IOC.ValidateInstallation writes a diagnostic report to the Output Log if anything looks wrong with the install.

📐 Manual Placement

  1. Place Actors panel → search IOC → drag AIOCProceduralActor into the level.
  2. Choose a CavePreset from the dropdown, click Apply Preset.
  3. Click Generate Cave and wait for async generation to complete.
Dev-only: IOC.SpawnTunnelDemo and IOC.SpawnSpectacular use ECVF_Cheat and are excluded from Shipping builds.

Compatibility

ItemDetails
Engine VersionsUnreal Engine 5.5, 5.6, 5.7, 5.8 (source-included Fab package; content authored on 5.5)
PlatformsWin64, Mac, Linux, Android, iOS
Module TypeRuntime — works in packaged Shipping builds
Required PluginsPCG, GeometryScripting, EnhancedInput (bundled with UE)
NetworkFull actor replication (server-authority generation, client receive via OnRep)
NaniteOptional on baked Static Mesh. API guarded for 5.5/5.6 compatibility.
NavMeshOptional auto-rebuild per actor or per streaming chunk.

Dedicated Tools Menu

Everything lives under Tools > Instant Organic Caves. The wizard also has a shortcut on Window > IOC Setup Wizard…, for parity with the other editor tools that open a window.

Quick start

Open Setup Wizard

The guided five-step pass: preset, environment, readiness checks, generate.

Validate Installation

Health check for PCG, GeometryScripting and shipped content. Writes detail to the Output Log.

Open Documentation

Opens this manual in your default browser.

Demos

Open Interactive Demo

Opens the shipped IOC_InteractiveDemo. Press Play and walk the six-zone tour.

Open Demo Map

Opens the shipped IOC_DemoMap. Press Play and the flythrough runs itself — nothing to set up.

Spawn Interactive Tour

The tour in the level you have open. Start Play-In-Editor first to walk it.

Spawn Tunnel Demo

A playable tunnel with lighting and a character, in the level you already have open.

Spawn Spectacular Demo

The crystal cave, with mood lighting and scatter layers.

Spawn Showcase Flythrough

Eight captioned sections with the diagnostic HUD and generation metrics.

Spawn Capture Showcase

The same flythrough, captions only and no debug text. Record from this one.

Clear Showcase

Removes the flythrough and restores the camera. Leaves the tunnel and spectacular demos in place.

Clear All Demos

Removes everything any demo added, including the playtest character. Use this before saving a level you care about.

The Setup Wizard

Open it from Tools > Instant Organic Caves, from Window, or with IOC.OpenSetupWizard. It is native C++ Slate and depends on no Python, Blueprint, or Editor Utility Widget.

The wizard is a five-step pass. Each step both configures the cave and checks the project can actually build it:

StepWhat it does
1 · WelcomeProject snapshot — validation state, cave actors already in the level, estimated voxel workload, and whether you are spawning a new actor or reconfiguring an existing one. Validate Now and Prepare Starter Assets live here.
2 · Choose CavePreset or Custom, with a live preview. Convert Preset to Custom copies the current preset's values in as a starting point rather than dropping you on defaults.
3 · EnvironmentLighting, fog and an optional playtest character, so the cave is walkable the moment it finishes.
4 · ReviewReadiness checks and the voxel budget with a risk band. Generation is blocked while a check is failing — each one exists because it produces a cave that looks broken rather than an error you could diagnose.
5 · FinishGenerate, then post-generation actions: open the interactive demo or the demo map, create a starter level, add a carving volume or streaming manager.

Undo Added Actors in the footer removes everything the run placed, in one click, so the wizard is safe to experiment with. Settings persist between sessions, and Save / Load Profile carries a configuration between projects.

Automated Showcase & Flythrough

The Cinematic Showcase is controlled by the AIOCShowcaseLauncher actor. It handles async readiness guards, streaming, PCG scattering, and baked mesh transitions automatically.

ShowcaseLauncher CallInEditor Buttons

  • Start Showcase — run with diagnostic HUD and generation metrics.
  • Start Capture Showcase — immersive captions only, no debug text (ideal for video).
  • Start Interactive Demo — builds the walkable interactive tour instead of the flythrough (the same as ticking Interactive Demo, bInteractiveMode). The tour spawns at the launcher's location.
  • Clear Showcase — destroys all generated actors, restores viewport camera.
Continuous looping: Enable bLoopShowcase on the Launcher Actor for trade show kiosks. The showcase waits on an async Readiness Guard before the camera moves.

AIOCProceduralActor

The core placement unit. Drop one into a level, configure its categories in the Details panel, and click Generate Cave. Every property tagged ReplicatedUsing=OnRep_GenerationSettings synchronises across network sessions.

Cave Presets — IOC category

PresetKey Parameters & Use
CustomAll parameters controlled manually.
Large TunnelWide majestic passages. TunnelRadius ~450, SmoothIterations=3.
Tight CrawlspaceClaustrophobic crawl. TunnelRadius ~150, higher NoiseFrequency.
Open CavernMassive halls. TunnelRadius ~1200, blob mode, large bounds.
Alien Hive (Warped)Domain Warping enabled, high DomainWarpIntensity, biomorphic silhouette.
Canyon Strata (Terraced)TerraceSteps active, layered horizontal ledges, geological look.
Enable bForcePreset (IOC|Advanced) to automatically re-apply the preset every BeginPlay, overriding any in-editor manual customisations.

Shape Properties — IOC|Shape

PropertyDescription & Notes
GenerationBoundsFVector size (X,Y,Z) in centimetres. Non-cubic volumes allow flat tunnels or tall shafts.
VoxelSizeEdge length of each voxel cube. Default 50.0 cm. Halving octuples voxel count.
CaveSeedInteger seed for deterministic noise. Same seed + same params = identical mesh. Default 1337.
NoiseThresholdDensity iso-surface. Voxels below this value are carved. Default 0.5.
SmoothIterationsLaplacian smoothing passes. 0 = voxel look, 3 = organic, 5+ = rounded. Default 3.
MacroChamberWeightBlends low-frequency macro noise to create large open chambers. Range 0–1.
RidgedDetailWeightAdds high-frequency ridged noise for sharp rock detail. Range 0–1.
InteriorDensityBiasShifts interior density. Positive opens the cave; negative closes it. Range −1 to 1.

Noise & Octave Controls — IOC|Shape

PropertyDescription
NoiseFrequencyBase scale of the noise field. Lower → bigger features. Typical range 0.001–0.05. Default 0.005.
NoiseOctavesFractal noise layers summed. Higher = more surface detail. Range 1–8. Default 4.
NoiseLacunarityFrequency multiplier between octaves. Default 2.0.
NoisePersistenceAmplitude scale-down per octave. Default 0.5.
DomainWarpIntensityWarps the sampling position before noise evaluation. Creates folded, twisted shapes. 0 = disabled.
TerraceStepsQuantises density into discrete bands. 0 = disabled. Creates horizontal ledges.
bUseWorldSpaceNoiseSamples noise in world space. Required for seamless chunk boundaries in streaming.

Perlin Tunnels — IOC|Tunnel

Enable bGenerateTunnel to switch from blob/cavern mode to tunnel mode. The algorithm computes the distance field to a line segment between two points, then adds 3D Perlin Noise to the radius, producing a guaranteed connected organic tube.

PropertyDescription
bGenerateTunnelMaster toggle for tunnel mode.
TunnelStartStart point in actor-local space. Viewport widget editable. Disabled when bUseSpline is on.
TunnelEndEnd point in actor-local space. Viewport widget editable.
TunnelRadiusBase radius of the carved tube in centimetres. Noise adds organic variation.
WallThicknessShell thickness around the hollow tube.
bUseFixedBoundsForTunnelUses GenerationBounds exactly rather than auto-expanding to fit TunnelEnd.

Spline-Driven Tunnels — IOC|Tunnel

Enable bUseSpline (requires bGenerateTunnel) to drive the tunnel axis using the built-in USplineComponent (CaveSpline). Edit spline points directly in the viewport for full art-direction.

The CaveSpline component is auto-created by the actor and is visible in the Components panel. Noise radius still applies to each spline tangent position.

Appearance — IOC|Appearance

PropertyDescription
CaveMaterialMaterial for the primary mesh. Defaults to MI_IOC_CaveWalls. Accepts any UMaterialInterface.
TextureTilingUV tiling multiplier passed to the material. Default 0.01.
bGenerateSmartColorsPaints vertex colors based on surface orientation (floor/wall/ceiling). Used by the Smart Cave material.

LOD System — IOC|Advanced

A dedicated second UDynamicMeshComponent (LODMeshComponent) is generated at a coarser voxel resolution. The system switches to this mesh when the camera exceeds LODDistance.

PropertyDescription
bEnableLODMaster toggle. Default true.
LODDistanceSwitch distance in centimetres. Default 5000.
LODVoxelSizeMultiplierLOD mesh uses VoxelSize × this. Default 3.0 (1/27th the voxel count). Range 1–16.

Production Budgets — IOC|Production

These caps protect runtime memory and frame time. Generation is aborted and an error logged if any limit is exceeded.

PropertyDefaultNotes
MaxVoxelCount15,000,000Exceeding this aborts generation immediately.
MaxGeneratedTriangles2,000,000Primary mesh triangle cap.
MaxScatterInstances100,000Total HISM instances across all decoration layers.
Tip: A 5000x5000x2000 volume at VoxelSize=50 evaluates ~8 M voxels. Profile on target hardware before exceeding defaults.

Advanced Options — IOC|Advanced

PropertyDescription
bAutoRebuildNavMeshTriggers a NavMesh rebuild after mesh commit.
bForcePresetApplies selected preset on BeginPlay, overriding in-editor values.
bShowDebugVizDraws cyan bounds box and green tunnel line in editor. Default true.
bLogPresetDebugPrints preset parameter values to Output Log on ApplyPreset.
bUseWorldSpaceNoiseWorld-space noise sampling for seam-free streaming.

Real-Time Performance Stats — IOC|Performance

PropertyDescription
LastGenerationTimeSecondsWall-clock seconds the async task took.
LastEstimatedVoxelCountTotal voxels evaluated.
LastPrimaryTriangleCountTriangles in the full-detail primary mesh.
LastLODTriangleCountTriangles in the LOD mesh.
LastScatterInstanceCountHISM instances placed across all decoration layers.
bLastGenerationSucceededFalse if any budget was exceeded or an error occurred.
LastGenerationErrorHuman-readable error string if generation failed.

Open World AIOCStreamingManager

Place one AIOCStreamingManager in your level. The server-authority tracks all player pawns, spawns replicated AIOCProceduralActor chunks within StreamRadius, and destroys chunks beyond the unload radius. Chunk creation is throttled per update tick.

Network: The StreamingManager runs on the authority. Spawned chunks are replicated actors — clients receive geometry through actor replication after the server commits the mesh.

All spawned chunks use world-space noise (forced) and are positioned on a voxel-aligned integer grid so neighboring chunks share identical density samples at their boundaries — eliminating seams.

The chunk grid is centred on the manager's location, and CaveStartOffset is relative to it, so place the manager where the streamed cave should be. (Before this release the manager had no root component and sat at the world origin wherever it was put.)

Streaming Parameters

PropertyCategoryDescription
ChunkSizeIOC StreamingWorld-space size of each chunk. Rounded to whole voxels. Default 2000x2000x1500 cm.
StreamRadiusIOC StreamingManhattan radius of loaded chunks around the player chunk. Range 1–8. Default 2.
UnloadDistanceBiasIOC StreamingChunks beyond StreamRadius × this are destroyed. Default 1.2.
MaxLoadedChunksIOC Streaming|ProductionHard cap across all tracked players. Default 64.
MaxChunkLoadsPerUpdateIOC Streaming|ProductionMax new actors spawned per update tick. Default 2.
StreamingUpdateIntervalIOC Streaming|ProductionUpdate cadence in seconds. Default 0.25.
NoPlayerUnloadDelayIOC Streaming|ProductionSeconds without a pawn before chunks release. Default 10.
BaseSeedIOC GenerationSeed offset. Each chunk seed = BaseSeed + hash(chunk coord).
VoxelSizeIOC GenerationVoxel resolution for every chunk. Default 80.0 cm.
CavePresetIOC GenerationApplied uniformly to every spawned chunk.
SharedMaterialIOC AppearanceMaterial for every chunk. Null uses the default plugin material.
SharedDecorationLayersIOC DecorationScatter layers shared by every spawned chunk.
DomainWarpIntensityIOC SpectacularDomain warp applied to every chunk.
TerraceStepsIOC SpectacularTerrace stepping applied to every chunk.

Player Coupling — IOC Streaming|Coupling

When bAutoCouplePlayerAtStart is enabled, the manager teleports the first possessed pawn to its world position + CaveStartOffset, holds it at PlayerStartHoldHeight until the initial chunk finishes generating, then uses a downward trace of GroundProbeDistance to land the player on the first solid surface.

In tunnel mode, keep the probe's start inside the bore: the trace begins at the hold point, and one that starts above the tunnel's roof lands the player on top of the tunnel. A CaveStartOffset.Z of about 0.6 × TunnelRadius with PlayerStartHoldHeight 0 works; the interactive tour's portal uses exactly that.
Disabled in network games unless bAllowCouplingInNetworkGames is explicitly true.

Blueprint API — Streaming Manager

void  RebuildAroundLocation(FVector WorldLocation);  // Force-recentre chunk grid
FVector GetEffectiveChunkSize() const;               // Voxel-aligned actual chunk size
int32 GetLoadedChunkCount()  const;
int32 GetPendingChunkCount() const;
// Runtime carving (authority only)
void CarveStreamedCavesAtLocation(FVector WorldLocation, float Radius);
void ClearStreamedRuntimeCarves();

Spatial Override AIOCBiomeVolume

Place AIOCBiomeVolume brush actors overlapping your generation bounds. When the actor runs generation, each voxel position is tested against all Biome Volumes and the highest-Priority override is applied, allowing local characteristic changes without separate actors.

PropertyDescription
PriorityWhen volumes overlap, highest Priority wins. Default 0.
bUseBoxExtent / BoxExtentUse a box of half-size BoxExtent instead of the brush. Required for a volume spawned from code: it has no brush geometry, so without this its bounds are empty and it overrides nothing.
BlendDistanceDistance in cm inside the volume over which its overrides ease in. Default 0: they switch at the face, which leaves a ledge in a tunnel's floor where the radius changes (186 cm in the test case; 45 cm with a 10 m blend). Give any radius or wall override a few metres.
bOverride_NoiseFrequencyToggle + value to locally change cave detail density.
bOverride_TunnelRadiusWiden or narrow the tunnel radius inside this volume.
bOverride_WallThicknessChange wall thickness for this region.
bOverride_TerraceStepsEnable or change terrace step height locally.
Biome Volumes are sampled in actor-local space. Scale and rotate the brush freely — Box, Sphere, and Cylinder brush shapes all work. A tunnel's generation bounds grow to fit the widest overlapping biome, so a widened section is not clipped open.

Carving System

IOC provides two carving mechanisms: static editor-time carving via component, and dynamic runtime carving via Blueprint.

Static Editor Carving — UIOCCarvingComponent

Add a UIOCCarvingComponent as a child of any AIOCProceduralActor. The actor automatically discovers all attached carving components at generation time and guarantees the carved volume is hollow regardless of the noise field. Use for guaranteed doors, corridors, or entry points.

PropertyDescription
ShapeTypeSphere, Box, or Capsule.
SphereRadiusRadius in cm when ShapeType = Sphere.
BoxExtentHalf-extents (X,Y,Z) in cm when ShapeType = Box.
CapsuleRadius / CapsuleHalfHeightCapsule dimensions when ShapeType = Capsule.
FalloffRadiusSoft-blend distance in cm at the edge of the carved shape. Prevents hard seams. Where falloff bands overlap, the strongest carve decides, so adding a carve never brings rock back.

Runtime Carving — IOC Gameplay

Blow holes at runtime from Blueprint or C++ (server-authority only). Carve operations are stored in RuntimeCarves (a SaveGame TArray), replicated via OnRep_RuntimeCarves, and re-applied when the mesh regenerates.

Property / FunctionDescription
MaxRuntimeCarvesMaximum carve history entries per actor. Default 256.
MinRuntimeCarveRadiusMinimum carve radius in cm. Default 25.0.
MaxRuntimeCarveRadiusMaximum carve radius in cm. Default 5000.0.
CarveAtLocation()BlueprintCallable, BlueprintAuthorityOnly. Sphere carve at world location + regeneration.
ClearRuntimeCarves()Removes all carve history and regenerates. Authority only.
// Server-side carving example
void AMyGameMode::OnExplosion(FVector WorldPos, float Radius)
{
    if (AIOCProceduralActor* Cave = FindNearestCave(WorldPos))
        Cave->CarveAtLocation(WorldPos, Radius);
}
Late join: New clients receive the full RuntimeCarves array through initial replication, triggering a local OnRep_RuntimeCarves to regenerate and match the server state.

Player Carving — AIOCCharacter, IOC|Carving

The demo character can carve where it aims. It is off by default: its carve keys live in their own mapping context, installed only while carving is on, so a project's own use of the left mouse button is untouched.

Property / FunctionDescription
bEnableCaveCarvingLeft mouse / gamepad right trigger carves. Default false. Change it at runtime with SetCaveCarvingEnabled.
CarveRadiusRadius of one carve in cm. Default 160.
CarveReachHow far from the camera a carve reaches, in cm. Default 3000.
SetCaveCarvingEnabled(bool)Turns carving on or off and maps or unmaps its keys.
CarveAtAim()Traces from the camera along its view; if it hits a cave tagged IOC_PlayerCarvable (AIOCCharacter::PlayerCarvableTag), calls CarveAtLocation there. Authority only. Returns the cave carved, or null.
Only caves carrying the IOC_PlayerCarvable actor tag accept the player's carves — tag the ones that should be diggable.

Decoration Scatter System

Add FIOCScatterLayer entries to DecorationLayers on the actor (or SharedDecorationLayers on the StreamingManager). After meshing, IOC scatters HISM instances on matching faces.

Eight props ship with the plugin in /InstantOrganicCaves/InstantOrganicCaves/Geometry/ — the segment repeats because the plugin mounts its Content folder as /InstantOrganicCaves and keeps the meshes in a folder of the same name inside it — so a furnished cave needs no sourced art: SM_IOC_Rock_A, _B and _C (boulder down to gravel), SM_IOC_Crystal_A and _B, SM_IOC_Geode, SM_IOC_Stalactite and SM_IOC_Stalagmite. Each has two LODs, simple collision, and its pivot at its base, growing along +Z. With bAlignToNormal on, scatter points that axis along the surface normal — into the cave, so down on a ceiling — which is what hangs a stalactite; instances neither float nor sink. With alignment off, props keep the world's up and a ceiling layer grows into the rock.

Poisson spacing packs. With PoissonMinSeparation set, the scatter throws thirty times the candidates and keeps every one far enough apart, so a surface fills to that spacing whatever Density says. Use a large spacing to thin props out evenly, or leave it at 0 and let Density decide.
PropertyDescription
MeshStatic Mesh asset to scatter (stalactites, crystals, debris).
DensityInstances per square metre of matching surface.
ScaleRangeMin/Max random uniform scale. Default 0.8–1.2.
bAlignToNormalRotates each instance to align with the surface normal.
MinSlopeZ / MaxSlopeZFilter by surface Z-normal. 1.0=floor, 0.0=wall, −1.0=ceiling. Use −1.0/−0.5 for ceiling stalactites.
RandomPitchRandom pitch jitter in degrees for organic variation.
PoissonMinSeparationWhen > 0, uses Poisson disk sampling with this minimum distance (cm). Prevents instance overlap.
Ceiling stalactites: Set MinSlopeZ=−1.0, MaxSlopeZ=−0.5, bAlignToNormal=true. This selects only ceiling faces and points meshes downward.

Material Pipeline

IOC ships a hybrid pipeline. The default MI_IOC_CaveWalls lets you toggle between a zero-texture procedural rock and high-fidelity PBR textures.

Using your own material? Two flags on the base material are not optional.

Two Sided must be on. A cave is a shell — TunnelRadius of air inside WallThickness of rock — and the player stands inside it, so the tunnel bore's surfaces face away from the camera. A one-sided material culls them and the wall renders transparent: you see through it, through the outer shell behind it, and out of the level. Unreal flips the vertex normal on backfaces for two-sided materials, so shading stays correct.

Used with Instanced Static Meshes must be on for anything used by a scatter layer. Props are placed on HISM components, and a material without that usage flag cannot be applied to one — the engine silently substitutes WorldGridMaterial and every instance renders untextured grey. This one only shows up in a packaged or -game build: in the editor the flag is set on the fly and thrown away again each session, so the editor looks correct while the shipped product does not.

Both flags live on the base UMaterial, never on a Material Instance. If Unreal warns you about an instance, the flag it wants is on that instance's parent.

Pure Math Material — M_IOC_MathRock

Uses Absolute World Position fed into multi-octave Simplex Noise to generate base color, moss patches, roughness variation, and subtle normal perturbation — algorithmically, with zero texture bytes.

  • Zero memory footprint — 0 bytes of texture data.
  • Infinite scale — identical on a 1 m crawlspace or a 500 m cavern.
  • Seam-free — world-space sampling makes chunks tile seamlessly.
  • Smart Vertex Color support — blends color tones automatically per surface zone.

PBR Texture Mode

Set UsePBRTexture = true on MI_IOC_CaveWalls and select a CaveStyleTexture:

  • T_RockObsidian — Glossy volcanic glass with organic ridges.
  • T_RockLimestone — Porous light-grey stalactite surface.
  • T_RockAlien — Dark bioporous stone with bioluminescent green veins.

Also included: M_IOC_SmartCave and MI_IOC_SmartCave_Inst — add slope-based height blending for additional biome variation.

Triplanar UV Generation

IOC generates UVs using Box Mapping (Triplanar) projection. Each face's dominant world normal (X, Y, or Z) selects the projection axis, eliminating stretching on steep walls and overhanging ceilings. The TextureTiling property scales UV frequency globally.

Smart Vertex Colors

When bGenerateSmartColors is enabled, the generation pass writes vertex colors based on each vertex's world-space Z normal:

  • Red — floor intensity (normal.Z > 0.7)
  • Green — ceiling intensity (normal.Z < −0.5)
  • Blue — wall intensity (intermediate normals)

PCG Integration

The IOCVoxelCore PCG node exposes the same density field as the Actor to the Procedural Content Generation graph. Use it to scatter PCG points on the generated surface for foliage, crystals, lighting, or AI spawn points.

Included PCG Content

  • IOC_Graph_Master — Master PCG graph with IOCVoxelCore pre-wired.
  • IOC_Fn_OrganicNoise — Noise-based density filtering sub-graph.
  • IOC_Fn_ScatterCrystals — Crystal decoration scatter layer preset.
  • NewPCGGraphInstance — Ready-to-use PCG Graph Instance.
The IOCVoxelCore PCG node (v1.1+) includes the same Perlin Tunnel support as the Actor, so tunnel paths can drive PCG scatter as well as mesh generation.

Multiplayer Networking & Replication

Property / GroupRep ConditionNotes
All Shape/Tunnel/Appearance paramsCOND_NoneOnRep_GenerationSettings triggers full async regeneration on clients.
RuntimeCarvesCOND_None (SaveGame)OnRep_RuntimeCarves re-applies carve history and regenerates clients.

Authority-only functions

All mutation functions are BlueprintAuthorityOnly: CarveAtLocation, ClearRuntimeCarves, CarveStreamedCavesAtLocation.

Delegates

// Broadcast when async task begins
FIOCGenerationStartedSignature OnGenerationStarted;  // (AIOCProceduralActor*)

// Broadcast when async task completes
// bCancelled=true if superseded; bWillRegenerate=true if another request is pending
FIOCGenerationFinishedSignature OnGenerationFinished; // (Actor*, bCancelled, bWillRegenerate)

Async Generation Architecture

All generation runs on an AnyBackgroundThreadNormalTask worker. The pipeline stages are:

  1. Bounds validation — abort if MaxVoxelCount exceeded.
  2. Parallel voxel evaluationParallelFor across the X axis (multi-core, since v1.1).
  3. Biome Volume sampling — POD copies of FIOCBiomeData read (no UObject access on worker thread).
  4. Marching Cubes meshing via GeometryScripting.
  5. Laplacian smoothing passes.
  6. UV generation — triplanar box mapping.
  7. Smart vertex colors (optional).
  8. LOD mesh — same pipeline at VoxelSize × LODVoxelSizeMultiplier.
  9. Decoration scatter — HISM placements computed on background thread.
  10. Game thread commit — applies mesh, collision, material, HISM data.

An std::atomic<bool> bCancelRequested inside FIOCGenerationState allows a new request to safely cancel an in-flight task without unsafe UObject access.

Static Mesh Baking — IOC|Production|Bake

Once satisfied with a procedural cave, bake it to a permanent UStaticMesh asset. Press the Bake to Static Mesh CallInEditor button (Editor-only).

PropertyDescription
BakedAssetBaseNameAsset name for the saved Static Mesh. Default SM_IOC_Cave.
BakeMaterialOverrideOptional material override for the baked mesh. Null uses the current cave material.
bBakeGeneratedLODIncludes the LOD mesh as LOD1 on the baked Static Mesh.
bBakeEnableNaniteEnables Nanite on the baked mesh (API guarded for UE 5.5/5.6 compatibility).
BakeCollisionModeProjectDefault or ComplexAsSimple.
BakedLODScreenSizeScreen-size threshold for LOD1 transition. Default 0.25. Range 0.01–1.0.
Baked Static Meshes have zero runtime generation cost and full Nanite/Lumen support. Use for hero set-pieces and story-critical areas where the cave shape is finalised.

Spectacular Features

Domain Warping

Set DomainWarpIntensity > 0 to displace the noise sampling position by a secondary noise field. This creates folded, twisted, biopunk cave silhouettes. The Alien Hive preset uses a high intensity (~300). Available on both the Actor and StreamingManager.

Terrace Steps

Set TerraceSteps > 0 to quantise the density field into discrete horizontal bands. The Canyon Strata preset demonstrates this with a geological layered appearance. Also available on the StreamingManager and Biome Volumes.

Domain Warping
DomainWarpIntensity: 0 → 300
Best with: Alien Hive preset
Visual: folded, twisted caverns
Terrace Steps
TerraceSteps: 0 → 8–16
Best with: Canyon Strata preset
Visual: geological horizontal ledges

Console Commands

The demo and showcase commands are ECVF_Cheat and are stripped from Shipping builds. IOC.ValidateInstallation and IOC.OpenSetupWizard are ECVF_Default, but they live in the editor module and so do not exist in a packaged game either.
CommandDescription
IOC.OpenSetupWizardOpens the Setup Wizard. Same window as the Tools menu entry — useful when the menu is unavailable, or for scripting an editor session.
IOC.ValidateInstallationWrites a dependency and content report to the Output Log. Run this first when anything looks wrong.
IOC.SpawnInteractiveTourSpawns the walkable six-zone tour at the world origin, with its lighting and the playable character. Best run in Play-In-Editor.
IOC.TourAutopilotWalks the interactive tour on its own: the whole route, three carves in the Forge, the portal and the streamed depths. For recording and kiosks. Command-line switches: -IOCTourAutopilot (start with the tour), -IOCTourAutopilotQuit (exit when done), -IOCTourNoCaptions (clean frames).
IOC.SpawnTunnelDemoSpawns a Perlin Tunnel (0,0,0) → (3000,1500,800) with full lighting and a playable third-person character with flashlight.
IOC.SpawnSpectacularSpawns an Alien Hive preset cave with Domain Warping at VoxelSize=50. Best single-command visual.
IOC.SpawnShowcaseCaptioned flythrough of eight cave sections, with the diagnostic HUD and generation metrics.
IOC.SpawnShowcaseCaptureThe same flythrough with captions only and no debug text — the one to record video from.
IOC.ClearShowcaseRemoves the showcase and restores the viewport camera.
IOC.ClearAllDemosRemoves everything any demo command added — caves, lights and the playtest character. The commands are designed to leave no residue.

Blueprint API Quick Reference

AIOCProceduralActor

FunctionNotes
GenerateCave()Triggers async generation. Blueprint and C++ callable.
RequestRegeneration()Cancels any in-flight task then triggers generation.
CarveAtLocation(FVector, float)Authority-only sphere carve + regeneration.
ClearRuntimeCarves()Clears carve history and regenerates. Authority only.
GetPerformanceSummary()Returns a human-readable string of last generation stats.
OnGenerationStartedMulticast delegate fired when generation begins.
OnGenerationFinishedMulticast delegate (Actor*, bCancelled, bWillRegenerate).

AIOCCharacter

FunctionNotes
SetCaveCarvingEnabled(bool)Turns the carve action on or off.
CarveAtAim()Carves the IOC_PlayerCarvable cave under the crosshair. Authority only.

FInstantOrganicCavesModule (C++)

FunctionNotes
SpawnInteractiveTour(UWorld*, const FVector& Origin)Builds the interactive tour at Origin. Both arguments optional.
SpawnShowcase / SpawnTunnelDemo / SpawnSpectacularDemoThe other demos.
ClearAllDemos(UWorld*)Removes everything any demo spawned; returns the count.

AIOCStreamingManager

FunctionNotes
RebuildAroundLocation(FVector)Force-recentre chunk grid on a world location.
GetEffectiveChunkSize()Returns voxel-aligned chunk dimensions used for grid spacing.
GetLoadedChunkCount()Current loaded chunk count.
GetPendingChunkCount()Chunks queued for loading.
CarveStreamedCavesAtLocation(FVector, float)Authority-only. Applies carve to loaded chunks and persists for future loads.
ClearStreamedRuntimeCarves()Clears global carve history and regenerates all chunks.

Troubleshooting

Cave generates nothing / empty mesh

Cause: NoiseFrequency too high — noise oscillates inside a single voxel. Fix: Lower to 0.01 or less.

Cause 2 (Tunnel mode): TunnelRadius < VoxelSize. The tube is sub-voxel sized. Fix: Ensure TunnelRadius > VoxelSize × 2.

Minecraft / blocky voxel look

Cause: SmoothIterations = 0. Fix: Increase to 3 (organic) or 5+ (rounded boulders).

Streaming chunk seams / boundary mismatch

Cause: bUseWorldSpaceNoise off on manually spawned chunks. Fix: StreamingManager forces this automatically. For manual chunks, set it true and use the same BaseSeed.

Cause 2: ChunkSize not divisible by VoxelSize. Use GetEffectiveChunkSize() to verify snapped dimensions.

Generation aborted — budget exceeded

Fix A: Increase VoxelSize — halving it octuples the voxel count.

Fix B: Reduce GenerationBounds and use the StreamingManager for large worlds.

Fix C: Raise MaxVoxelCount / MaxGeneratedTriangles caps after profiling on target hardware.

Player falls through cave floor

Cause A: Generation still running when player is placed. Fix: Bind to OnGenerationFinished before spawning/teleporting.

Cause B: Project Settings > Physics ignores Complex collision. IOC uses ComplexAsSimple. Ensure physics settings do not bypass complex collision traces.

Carves not appearing on all clients

Cause: CarveAtLocation called on a client. It is BlueprintAuthorityOnly. Fix: Route through a Server RPC in your GameMode or PlayerController.

Decoration instances overlapping or too dense

Fix A: Lower Density on the scatter layer.

Fix B: Set PoissonMinSeparation > 0 (e.g. 100 cm) to enforce minimum spacing with Poisson disk sampling.

IOC

GregOrigin

High-performance C++ plugins for Unreal Engine. Built for production, documented for clarity, supported actively.

Copyright (c) 2026 GregOrigin. All Rights Reserved.