← Technical Notes F26

A procedural ice cave in Houdini, shaded with a triplanar parallax ice material

Technical notes · Ice Cave · GAME 710, Fall 2026

The ice cave is generated by one script that rebuilds the whole Houdini scene from nothing and exports it for Unreal. This note covers the distance-field model, the scallop noise, how material boundaries stay smooth, and the triplanar ice shader that lets the walls skip UVs entirely.

One script, four build modes

build_icecave.py builds the network, cooks it, saves the hip and exports FBX. The same seed always gives the same cave. Different modes trade quality for speed:

ModeWhat it doesTime
previewLow resolution, quick check of the layout~10 s
finalDefault. Walls without UVs, floor, channel and outside unwrapped~1 min
final --no-uvNo UVs anywhere~50 s
final --wall-uvWalls unwrapped too, then relaxed with ARAP~3 min

The saved hip is self-contained: the terrain samples from Unreal (on a 5 m grid) and all the Python live inside it, so the folder can move and the file still opens.

The cave as a distance field

The glacier is a raised tongue of ice, cut off by a cliff at the front. The cave is everything subtracted from it: an elliptical arch swept along a centreline, a flat floor, a meltwater channel, side pockets and skylights. In a signed distance field that subtraction is one line, max(ice, -cave), and it never produces broken geometry however the centreline moves. A VDB reshape then removes any ice thinner than 1 m, which would otherwise leave paper-thin flaps.

The tunnel is edited with a curve and five arrays, one value per control point: arch half-width, arch height, whether the point is inside the glacier, and the channel's width and on/off.

Houdini preview of the glacier block with skylight holes
The glacier and its skylights
Houdini preview of the scalloped tunnel and channel
Inside: scallops and the channel

Scallops from stretched Worley noise

Real ice cave walls are covered in scallops: shallow bowls shaped by moving air and water, steep on the upstream side and stretched along the flow. They are built from anisotropic Worley noise: each cell is stretched along the tunnel, the bowl's centre is pushed upstream, and the edges between neighbouring bowls stay sharp.

LayerCell sizeDepth
Large1.8 m0.6 m
Medium (alternates with large)1.25 m0.45 m
Fine0.6 m0.1 m
Micro0.28 m0.025 m

The shape controls that mattered most were the elongation (1.35, where 1 is round), the asymmetry (0.45 steep upstream, 0.3 gentle downstream) and a bowl exponent of 1.25 that sets how sharp the ridges are. Two safety controls keep it believable: the scallops fade out in a 2.2 m band at the foot of the wall, and no displacement may carve deeper than 40% of the local ice thickness, so thin roofs never get punched through.

Smooth boundaries between materials

Wall, floor, channel and outside ice each have their own material slot. Cutting slots by triangle gives a stair-stepped edge. Instead, each boundary is the zero line of a continuous field (inside vs outside, floor vs wall), and a snap step slides the nearby vertices along their edges onto that line. The boundary becomes a smooth curve. Every displacement is also multiplied by a smooth weight from the same fields, so the surface never tears at a seam.

A triplanar ice shader with fake depth

The walls ship without UVs because the ice material doesn't need them. It is one Custom node in M_IceWall_Triplanar that works entirely from world position and world normal:

float3 p1 = (WorldPos - ViewDir * Depth1 / max(NdotV, 0.25)) / (Tile * 0.63);   // inner layer 1
float3 p2 = (WorldPos - ViewDir * Depth2 / max(NdotV, 0.25)) / (DetailTile * 1.9); // inner layer 2
base = lerp(surfaceColour, innerColour, Inner * (1 - pow(1 - NdotV, FresnelPower)));
Material graph: parameter nodes in four columns feeding one Custom node, IceWallTriplanarParallax
The instance parameters feed one Custom node (nodes rearranged for the screenshot)

The generator bakes what the shader needs into vertex colour:

ChannelDrives
RThin-ice glow: light transmitted near skylights and thin roofs, modulated by the parallaxed interior so it reads as depth
GWetness: blends roughness from dry to wet
BSediment at the wall foot, broken up by the detail texture
AScallop bowl depth: tints bowls and ridges differently

Everything is exposed on the instance (tile size, both parallax depths, inner strength, Fresnel power, tints, glow, dirt, dry and wet roughness), and a UseVertexColor switch gives neutral values for meshes without vertex colour. The FBX is imported with Vertex Color set to Replace, so the colour arrives in Unreal as baked.

Checker texture on the cave floor while the walls stay plain
Checker on the floor UVs; the walls have none and use the triplanar shader
Panning up to a skylight. The rim glows from the R channel.

Into Unreal

What I'd keep