comfyui_pcg docs

Image: Height Fields & Terrain#

Height field generation, erosion, masks and terrain tools.

22 nodes.

Back to the reference index

Contents#

Nodes#

COP Curvature (PCG)#

PCG_COPCurvature · category PCG/cop · Houdini: Curvature (COP)

Computes surface curvature of a height field, positive on convex areas.

COP Curvature (PCG): input and result

The height layer (multiplied by Strength) is treated as a surface over a world width of World Size. Curvature is in 1/world units and convex is positive (peaks and ridges above 0, pits and gullies below 0).

  • mean: mean curvature.
  • gaussian: Gaussian curvature (saddles are negative, independent of convexity).
  • profile: curvature along the slope direction; negative where the slope steepens, positive where it flattens.
  • tangential: curvature across the slope; positive on ridges, negative in gullies.
  • plan: curvature of the contour lines; positive where flow diverges, negative where it converges.

To separate ridges from gullies use tangential or plan rather than elevation, which gives wrong results for gullies on high ground and ridges in low ground. Scale is a final multiplier: curvature scales with 1/R, so multiplying by a characteristic length gives a dimensionless value that is convenient as a mask. (profile + tangential) / 2 equals mean.

Inputs

InputTypeDescription
copCOPIMAGEImage containing the height layer.

Outputs

OutputTypeDescription
copCOPIMAGEImage with the curvature layer added.

Parameters

ParameterTypeDefaultDescription
Height Layer layerstringCHeight layer.
Height Scale strengthfloat [-10000.0..10000.0]1Height multiplier: layer value x Strength is the world height.
World Size world_sizefloat [1e-06..]1World width of the whole image. Pixel spacing is World Size divided by the image width.
Curvature Type kindmenuMeanType of curvature; see the description. Options: Mean (mean), Gaussian (gaussian), Profile (profile), Tangential (tangential), Plan (plan).
Output Scale scalefloat1Multiplier applied to the result.
Tileable (Wrap Edges) tiletoggleoffTreat the image as tileable so derivatives wrap around the edges instead of being extrapolated.
Output Layer out_layerstringcurvatureName of the output layer.
Keep Input Layers keep_layerstoggleonKeep the other layers of the input in the output.

Tips

  • Multiply with Scale by a characteristic length (for example World Size / 20) to get a dimensionless mask.

COP Erosion Filter (PCG)#

PCG_COPErosion · category PCG/cop

Adds erosion-like gullies and ridges to a height layer in a single, per-pixel pass; it is a filter, not a simulation.

COP Erosion Filter (PCG): input and result

Produces a result that looks water-carved: channels running down slope and ridges, with fine rills branching off the walls of coarser ones. Each pixel is evaluated independently in one pass, and it runs on the GPU when one is available.

The idea follows Rune Skovbo Johansen's Advanced Terrain Erosion Filter (March 2026), re-implemented from its description.

Compared with a real simulation it lacks a continuous river network (a gully can end mid-slope), sediment deposition, and any dependence on upstream flow: gully depth depends only on local slope. For those you need flow accumulation, which is a different and much slower node.

The output overwrites the input height layer (so Height to Normal can follow without changes), and an extra erosion layer in [-1, 1] is written (ridges above 0, gullies below 0) for texture layering.

With tile on the result is seamless. With it off, origin_x/origin_y give the world position of the image's lower-left corner so tiles generated separately line up without seams.

Inputs

InputTypeDescription
copCOPIMAGEImage containing the height layer.

Outputs

OutputTypeDescription
copCOPIMAGEImage with the eroded height layer and the erosion mask layer.

Parameters

ParameterTypeDefaultDescription
Height Layer layerstringCHeight layer to erode.
Height Scale strengthfloat [-10000.0..10000.0]1Height scale: the height layer value times Strength gives the world height. Shared by all height-field nodes.
World Size world_sizefloat [1e-06..]1World-space width of the whole image; pixel spacing is World Size divided by the image width. Shared by all height-field nodes.

Erosion

ParameterTypeDefaultDescription
Amplitude amplitudefloat [0.0..10000.0]0.01Depth of the coarsest gullies in world units. Each finer octave is multiplied by Gain.
Wavelength wavelengthfloat [1.0..4096.0]48Spacing of the coarsest gullies in pixels. Each finer octave divides it by Lacunarity.
Octaves octavesint [0..12]5Number of gully levels, from coarse to fine.
Lacunarity lacunarityfloat [1.05..8.0]2Wavelength divider between successive octaves.
Gain gainfloat [0.0..2.0]0.35Depth multiplier between successive octaves. The usual fractal value 0.5 with lacunarity 2 makes every level equally steep and fills the image with fine clutter, so the default is lower.
Steepness steepnessfloat [0.0..10000.0]2Slope mask sharpness: the slope is passed through an ease-out and used as a mask. Higher values let gentler slopes carve gullies.
Flow Blur flow_blurfloat [0.0..4.0]0.25Before choosing the flow direction at each octave, the input slope is blurred by Flow Blur times that octave's wavelength. Fine noise in the input (typical for AI-generated height maps) otherwise makes large gullies zigzag within their own width and curl into worm shapes. It has almost no effect on smooth input. 0 matches the original method.
Seed rand_seedint [0..]0Random seed for the gully pattern.

Fade

ParameterTypeDefaultDescription
Fade fademenuBy AltitudeHow flat areas are treated: altitude fades flat areas into ridges (high) or gullies (low) depending on height; none leaves flat areas untouched. Options: By Altitude (altitude), None (none).
Height Range height_min height_maxfloat0, 0Height range (min, max) used by the altitude fade. If both are equal, the image's own min and max are used. Give explicit values when generating tiles, otherwise each tile uses its own range. Hidden when fade ≠ altitude.

Tiling

ParameterTypeDefaultDescription
Tileable (Wrap Edges) tiletoggleoffMake the result tile seamlessly.
Origin origin_x origin_yfloat0, 0World position (x, y) of this image's lower-left corner, used when generating tiles.
ParameterTypeDefaultDescription
Output Layer out_layerstringCName of the eroded height output layer.
Erosion Mask Layer mask_layerstringerosionName of the output layer in [-1, 1] (ridges above 0, gullies below 0). Empty skips it.
Keep Input Layers keep_layerstoggleonKeep the other input layers in the output.

COP Flow Accumulation (PCG)#

PCG_COPFlowAccumulation · category PCG/cop

Computes how much upstream area drains through each pixel of a height field, and derives river, lake and flow direction layers from it.

COP Flow Accumulation (PCG): input and result

First the height field is pit-filled with Priority-Flood plus an epsilon: depressions become lakes and every pixel is guaranteed a lower neighbour, so water always reaches an outlet (by default the four image edges; with tile the single lowest point; a base layer restricts outlets to its marked pixels). Then water is passed downstream by one of three methods: D8 (steepest neighbour; rivers are one pixel wide lines at 0 and 45 degrees), Rho8 (randomized D8, unbiased in average direction, seeded by rand_seed) or MFD (split among all lower neighbours by slope to the power of exponent, giving sheet flow on slopes). Inside a filled lake the water follows the drowned valley: the flat lake surface only carries the tiny epsilon slope toward the spill point, which would draw ruler-straight lines and hatching, so lake pixels drain along the lowest original terrain under the water to the lake's exit.

Output layers: flow is the drainage area (in world units squared; resolution independent in channels), river is a river-network mask with a logarithmic soft transition around river_area, lake is the fill depth and flow_dir is the downstream direction (u, v). An empty layer name disables that output. A rain layer, if given, scales rainfall per pixel (e.g. more on windward slopes).

Water is conserved: the total leaving through the outlets equals the total rainfall, and the report states it. The pit filling is a sequential priority queue and runs on the CPU only (about 3 s for 1024x1024).

Inputs

InputTypeDescription
copCOPIMAGEImage containing the height layer.

Outputs

OutputTypeDescription
copCOPIMAGEImage with the flow, river, lake and direction layers added.
reportSTRINGText report including the water balance (rain in versus flow out).

Parameters

ParameterTypeDefaultDescription
Height Layer layerstringCHeight layer to route water over.
Height Scale strengthfloat [-10000.0..10000.0]1Height scale: height value times Strength gives world height. Shared by all height-field nodes.
World Size world_sizefloat [1e-06..]1World-space width of the whole image; pixel spacing is World Size divided by image width. Shared by all height-field nodes.

Flow

ParameterTypeDefaultDescription
Flow Method methodmenuD8Flow routing: d8 single steepest neighbour, rho8 randomized D8, mfd multiple flow direction split by slope. Options: D8 (d8), Rho8 (Randomized D8) (rho8), MFD (Multiple Flow Directions) (mfd).
Slope Exponent exponentfloat [0.1..20.0]1.1Slope exponent for MFD: higher values concentrate flow toward the steepest neighbour. Hidden when method ≠ mfd.
Seed rand_seedint [0..]0Random seed for Rho8. Hidden when method ≠ rho8.
Fill Pits fill_pitstoggleonFill depressions so they become lakes. If off, water that falls into a pit does not reach an outlet.
Tileable (Wrap Edges) tiletoggleoffUse the lowest point of the whole image as the outlet instead of the four edges.
Outlet Layer base_layerstring(empty)Optional layer whose pixels above 0.5 are the outlets. Empty uses the four edges.
Rain Layer rain_layerstring(empty)Optional per-pixel rainfall amount. Empty means uniform rain.

River

ParameterTypeDefaultDescription
River Layer river_layerstringriverName of the river mask layer. Empty disables it.
River Area river_areafloat [1e-09..]0.002Drainage area (world units squared) around which the river mask transitions. Disabled when river_layer = "".
River Softness river_softnessfloat [0.01..5.0]0.5Width of the logarithmic soft transition of the river mask around River Area. Disabled when river_layer = "".

Output

ParameterTypeDefaultDescription
Flow Layer flow_layerstringflowName of the drainage area layer. Empty disables it.
Lake Depth Layer lake_layerstringlakeName of the lake depth layer (how deep each pit was filled). Empty disables it.
Flow Direction Layer dir_layerstringflow_dirName of the downstream direction layer (u, v). Empty disables it.
Keep Input Layers keep_layerstoggleonKeep the other input layers in the output.

COP Height to AO (PCG)#

PCG_COPHeightToAO · category PCG/cop · Houdini: Height to Ambient Occlusion (COP)

Computes ambient occlusion from a height field, where 1 is unoccluded and 0 is fully dark.

COP Height to AO (PCG): input and result

Horizon-based AO: from each pixel, directions rays are marched with steps samples out to radius pixels and the largest elevation angle above the pixel's tangent plane is found, converted to an occlusion and averaged over directions.

Elevation is measured against the tangent plane, not the horizontal. Measured against the horizontal, a whole slope would be occluded looking uphill, although an infinite slope has no occlusion physically. So any plane, however steep, gives exactly 1; convex shapes (peaks) give exactly 1; concave places (pits, gullies) are below 1 and darker with stronger curvature. Scaling height and world size together does not change the result, since only angles matter.

Cost is directions x steps full-image operations (64 by default). With tile off, samples outside the image do not contribute, so no dark rim appears along downhill edges.

Inputs

InputTypeDescription
copCOPIMAGEImage containing the height layer.

Outputs

OutputTypeDescription
copCOPIMAGEImage with the AO layer added.

Parameters

ParameterTypeDefaultDescription
Height Layer layerstringCHeight layer.

Height

ParameterTypeDefaultDescription
Height Scale strengthfloat [-10000.0..10000.0]1Height scale: layer value times Strength gives world height. Shared by all height-field nodes.
World Size world_sizefloat [1e-06..]1World-space width of the whole image. Shared by all height-field nodes.

Quality

ParameterTypeDefaultDescription
View Radius radiusfloat [0.5..4096.0]16Maximum search distance in pixels (must be above 0).
Sample Count directionsint [1..64]8Number of directions sampled around each pixel (up to 64). Cost grows with Directions times Steps.
Steps stepsint [1..64]8Number of samples along each direction (up to 64).
Intensity intensityfloat [0.0..16.0]1Strength of the occlusion; higher values darken more.
Tileable (Wrap Edges) tiletoggleoffTreat the image as periodic, for seamless textures.
ParameterTypeDefaultDescription
Output Layer out_layerstringaoName of the AO output layer.
Keep Input Layers keep_layerstoggleonKeep the other input layers in the output.

COP Height to Caustics (PCG)#

PCG_COPHeightToCaustics · category PCG/cop · Houdini: Height to Caustics (COP)

Simulates the light patterns a water surface focuses onto the bottom, from a height field used as the water surface.

COP Height to Caustics (PCG): input and result

The output is 1 under a calm surface and above 1 where light is focused. It uses photon tracing: every pixel emits supersample squared photons, which are refracted by the surface normal (with the given index of refraction), travel to a floor at depth, and are splatted bilinearly into the four pixels around the landing point. This is more robust than inverting a Jacobian, because focal lines are exactly where the Jacobian is zero and an analytic approach would divide by zero there.

Properties: a calm surface gives exactly 1; with tile on, energy is conserved (the sum of all pixels equals the pixel count); a bump in the surface acts as a converging lens (above 1 directly below) and a dent as a diverging lens (below 1). With an IOR of 1 the image is about 1 everywhere. For oblique light, the shift caused by a calm surface is subtracted, so the pattern stays aligned with the surface above it. There is no Fresnel term, no absorption, and light is refracted once only.

The node runs on the CPU only, so results are deterministic (accumulation order matters for the last digits).

Inputs

InputTypeDescription
copCOPIMAGEImage containing the water surface height layer.

Outputs

OutputTypeDescription
copCOPIMAGEImage with the caustics layer added.

Parameters

ParameterTypeDefaultDescription
Height Layer layerstringCHeight layer used as the water surface.

Height

ParameterTypeDefaultDescription
Height Scale strengthfloat [-10000.0..10000.0]1Height scale: layer value times Strength gives world height. Shared by all height-field nodes.
World Size world_sizefloat [1e-06..]1World-space width of the whole image. Shared by all height-field nodes.

Water

ParameterTypeDefaultDescription
Water Depth depthfloat [0.0..10000.0]0.1Depth of the floor below the surface, in world units. Deeper floors let the light focus further and spread more.
IOR iorfloat [1.0..4.0]1.33Index of refraction of the water (about 1.33 for water). 1 means no refraction and therefore no caustics.

Light

ParameterTypeDefaultDescription
Azimuth azimuthfloat [-360.0..360.0]0Horizontal direction of the incoming light in degrees. Only matters for oblique light (elevation below 90). Disabled when elevation >= 90.
Elevation elevationfloat [0.1..90.0]90Sun elevation in degrees; 90 is straight down.

Quality

ParameterTypeDefaultDescription
Supersample supersampleint [1..8]2Photons per pixel along each axis; the total is Supersample squared. Higher is smoother and slower.
Tileable (Wrap Edges) tiletoggleonTreat the image as periodic. Recommended for seamless textures. With it off, photons landing outside the image are lost, and the output is normalized so a calm surface still gives 1 at the borders.
ParameterTypeDefaultDescription
Output Layer out_layerstringcausticsName of the caustics output layer.
Keep Input Layers keep_layerstoggleonKeep the other input layers in the output.

COP Height to Normal (PCG)#

PCG_COPHeightToNormal · category PCG/cop · Houdini: Height to Normal (COP)

Converts a height layer into a tangent-space normal layer (signed, +Y up, OpenGL convention).

COP Height to Normal (PCG): input and result

Computes N = normalize(-dh/dx, -dh/dy, 1) with derivatives in world units, written as a signed layer in [-1, 1] with +Y equal to +v. Use it to get a normal map from a grayscale height from a diffusion model or an albedo conversion. Follow it with COP Convert Normal (signed to packed) to export, or feed Control Image in normal mode for ControlNet.

Scale: height value times Strength is the world height and World Size is the world width of the whole image. The eight height-field nodes share this pair with the same defaults, so tuning it once keeps AO, shadow and caustics in the same world.

On a linear slope h = a*x + b*y every pixel, including the border ring, gets exactly normalize(-a, -b, 1). One-sided differences are used at the border, because a clamp-padded central difference gives only half the slope in the outermost ring and would leave seams along the edges of a sloped tile.

Only channel 0 of a multi-channel layer is used; run COP Luminance first for color images.

Inputs

InputTypeDescription
copCOPIMAGEImage containing the height layer.

Outputs

OutputTypeDescription
copCOPIMAGEImage with the normal layer added.

Parameters

ParameterTypeDefaultDescription
Height Layer layerstringCHeight layer. Only its first channel is used.
Height Scale strengthfloat [-10000.0..10000.0]1Height scale: layer value times Strength gives world height.
World Size world_sizefloat [1e-06..]1World-space width of the whole image.

Derivatives

ParameterTypeDefaultDescription
Method methodmenuCentral DifferenceDerivative operator: central is sharper and exactly inverts Normal to Height (exact mode); sobel adds smoothing and is steadier on noisy (AI-generated) heights. Options: Central Difference (central), Sobel (sobel).
Tileable (Wrap Edges) tiletoggleoffTreat the image as periodic. Use for seamless textures.
ParameterTypeDefaultDescription
Output Layer out_layerstringNName of the normal output layer.
Keep Input Layers keep_layerstoggleonKeep the other input layers in the output.

COP Height to Shadow (PCG)#

PCG_COPHeightToShadow · category PCG/cop · Houdini: Height to Shadow (COP)

Casts sun shadows over a height field, optionally with soft edges.

COP Height to Shadow (PCG): input and result

The output is a mask where 1 means in shadow. Turn on invert to get 1 for lit areas, which can be multiplied straight onto a color.

For each pixel, samples are taken toward the light up to max_distance pixels; if any sample's elevation angle exceeds the sun elevation, the pixel is in shadow. For a wall of height H the shadow length is exactly H / tan(elevation) in world scale, and at 90 degrees elevation there is no shadow.

Softness models the sun as a disc by its angular radius (a first-order approximation, not an area-light integral).

Inputs

InputTypeDescription
copCOPIMAGEImage containing the height layer.

Outputs

OutputTypeDescription
copCOPIMAGEImage with the shadow layer added.

Parameters

ParameterTypeDefaultDescription
Height Layer layerstringCHeight layer.

Height

ParameterTypeDefaultDescription
Height Scale strengthfloat [-10000.0..10000.0]1Height scale: layer value times Strength gives world height. Shared by all height-field nodes.
World Size world_sizefloat [1e-06..]1World-space width of the whole image. Shared by all height-field nodes.

Light

ParameterTypeDefaultDescription
Azimuth azimuthfloat [-360.0..360.0]45Direction the light comes from, in degrees: 0 = from +u, 90 = from +v.
Elevation elevationfloat [0.1..90.0]30Sun elevation angle above the horizon in degrees.
Softness softnessfloat [0.0..30.0]0Angular radius of the sun in degrees. 0 gives hard shadows.

Quality

ParameterTypeDefaultDescription
Max Distance max_distancefloat [1.0..4096.0]64How far toward the light each pixel searches, in pixels.
Step Size stepfloat [0.1..64.0]1Distance between samples along the search, in pixels. Each step is one full-image sampling.
Tileable (Wrap Edges) tiletoggleoffTreat the image as periodic, for seamless textures.
ParameterTypeDefaultDescription
Invert (1 = Lit) inverttoggleoffOutput 1 for lit and 0 for shadowed.
Output Layer out_layerstringshadowName of the shadow output layer.
Keep Input Layers keep_layerstoggleonKeep the other input layers in the output.

COP HeightField Clip (PCG)#

PCG_COPHFClip · category PCG/cop · Houdini: HeightField Clip (COP)

Clamps a height layer into a minimum/maximum range, optionally with a soft knee.

Equivalent of HeightField Clip. Heights are limited to [Min, Max] in the chosen mode, with softness giving a C1 continuous knee instead of a hard edge. A second layer <out>_clipped holds the amount that was changed. The height layer defaults to C, like the rest of the terrain nodes. An optional mask blends the clipped result back into the original height.

Inputs

InputTypeDescription
copCOPIMAGEImage containing the height layer.

Outputs

OutputTypeDescription
copCOPIMAGEImage with the clipped height layer and the _clipped difference layer.

Parameters

ParameterTypeDefaultDescription
Layer layerstringCHeight layer to clip.
Mask Layer mask_layerstring(empty)Optional mask layer (0 to 1) that blends the clipped result over the original height. Empty clips everywhere.
Clip modemenuClip Below and AboveWhich side is clipped: both limits to the range, above only lowers values over Max, below only raises values under Min. Options: Clip Below and Above (both), Clip Above (above), Clip Below (below).
Minimum Height minfloat0Lower height limit. Hidden when mode = above.
Maximum Height maxfloat1Upper height limit. Hidden when mode = below.
Softness softnessfloat [0..]0Width of the smooth knee in height units. 0 gives a hard clamp.
Output Layer out_layerstring(empty)Name of the output layer. Empty overwrites the input layer; the change layer is written as <name>_clipped.

COP HeightField Cutout by Object (PCG)#

PCG_COPHFCutoutByObject · category PCG/cop

Carves the terrain down to the bottom of a geometry, fills it up to its top, or both.

The height field lies in the xz plane, centered, with width world_size; world height is the layer value times strength. For every texel two vertical rays are shot (down and up) to find the top and bottom of the geometry in that column (the outermost two if several layers exist).

carve lowers the ground to the geometry's bottom where the geometry passes through the ground (geometry fully buried does not cut a hole). fill raises the ground to the geometry's top where the geometry rests on the ground (floating geometry does not pull the ground up). both carves then fills, so the geometry's solid part becomes the terrain. A layer <out>_cut marks the modified texels with 1, useful for texturing or scatter avoidance.

Inputs

InputTypeDescription
copCOPIMAGEImage containing the height layer.
geoGEOMETRYGeometry (needs polygons) used as the cutting object.

Outputs

OutputTypeDescription
copCOPIMAGEImage with the modified height layer and the _cut layer.
reportSTRINGText report of the operation.

Parameters

ParameterTypeDefaultDescription
Height Layer layerstringCHeight layer to modify.
Height Scale strengthfloat1Height scale: layer value times Strength gives world height.
World Size world_sizefloat [1e-06..]1Width of the height field in world units along x and z (centered on the origin).
Operation modemenuCarve (Cut Down)carve digs terrain down to the object's bottom, fill builds terrain up to the object's top, both does both. Options: Carve (Cut Down) (carve), Fill (Raise Up) (fill), Carve and Fill (both).
Output Layer out_layerstring(empty)Name of the output layer. Empty overwrites the height layer; the change marker is written as <name>_cut.

COP HeightField from Depth (PCG)#

PCG_COPHeightfieldFromDepth · category PCG/cop

Turns a single image's depth into a top-down height field, so a picture of a landscape can feed the terrain chain.

Intended workflow: an AI image of a valley, depth estimated by MoGe or Depth Anything, flattened here into a height field, then used with erosion, river networks, splat maps and mesh conversion.

perspective (landscape photos, AI perspective images): either connect moge_geometry (the core MoGeInference output, recommended; it supplies camera-space points, metric scale and a sky mask, so nothing is guessed), or connect depth (relative inverse depth from Depth Anything and similar, which is only known up to scale and offset: z = 1/(d + shift) is a guess and the FOV must be entered by hand; wrong guesses bend the terrain rather than scaling it). The ground plane is fitted with weights proportional to area (z squared) and the camera pitch is solved automatically. Points are rasterized top-down, a cell takes the mean height of the points that land in it, and unseen cells (behind mountains, sparse distant areas) are filled by push-pull. The mask layer marks the cells that were really measured; the filled values are guesses.

top_down (satellite images, AI orthographic maps): the depth is used directly as height, normalized to Relief times World Size.

Connect the original image to image to also get an albedo layer (the color projected top-down; MoGe supplies its own). The world_size output can be wired to the world size of the height-field family so scales match. The height layer is C.

Inputs

InputTypeDescription
depth (optional)IMAGEDepth or disparity image (Depth Anything and similar). Required for top_down; optional in perspective when moge_geometry is connected.
moge_geometry (optional)MOGE_GEOMETRYMoGe geometry output (camera-space points, with scale and sky mask). Takes priority over depth in perspective mode.
image (optional)IMAGEOriginal color image; produces the albedo layer. Optional.

Outputs

OutputTypeDescription
copCOPIMAGEHeight field image: height in layer C, plus mask (measured cells, perspective only) and albedo when color is available.
world_sizeFLOATWorld-space width of the generated height field, to wire into the world size parameters of other height-field nodes.
reportSTRINGText summary: source, number of points, coverage, world width, height range, up mode and camera pitch.

Parameters

ParameterTypeDefaultDescription
Projection modemenuPerspective (Photo)perspective lifts a perspective image into a ground-plane height field; top_down treats the depth as a top-down height map. Options: Perspective (Photo) (perspective), Top Down (Orthographic) (top_down).
Depth Type depth_kindmenuDisparity (Inverse Depth)Meaning of the depth image: disparity (inverse depth, near = bright) or depth (near = dark). Not used with moge_geometry in perspective mode. Options: Disparity (Inverse Depth) (disparity), Depth (depth).
Batch Index batch_indexint [0..4096]0Which image of the batch to use.
Resolution resolutionint [8..8192]512Resolution (width and height) of the generated height field. If the report shows low coverage, lower this or raise the depth map resolution. Hidden when mode = top_down.
Horizontal FOV fov_xfloat [1.0..170.0]60Horizontal field of view in degrees. Only used when depth is connected without moge_geometry. Hidden when mode = top_down.
Up Vector upmenuFit Ground PlaneHow the ground is determined: fit_plane fits a plane to the points and solves camera pitch; camera_level assumes the camera is level (more robust when a large depression in the foreground would tilt the fit). Options: Fit Ground Plane (fit_plane), Camera Level (camera_level). Hidden when mode = top_down.
Far Quantile far_quantilefloat [0.05..1.0]0.95Discards the farthest fraction of points: only points up to this depth quantile are kept. Points near the horizon are sparse and inaccurate and would only stretch the grid into holes. Hidden when mode = top_down.
Fill Holes fill_holestoggleonFill cells with no measurement by push-pull interpolation. The filled values are guesses. Hidden when mode = top_down.

Disparity

ParameterTypeDefaultDescription
Disparity Shift shiftfloat [0.0..10.0]0.05Offset in z = 1 / (d + shift) for converting disparity to depth. Only used when depth is connected. Hidden when mode = top_down } { depth_kind = depth.
Sky Threshold skyfloat [0.0..1.0]0.02Pixels with disparity at or below this value are treated as sky and dropped. Hidden when mode = top_down } { depth_kind = depth.

Top Down

ParameterTypeDefaultDescription
Relief relieffloat [0.0..100.0]0.25Top Down mode: the height range as a fraction of World Size. Hidden when mode = perspective.
World Size world_sizefloat [1e-06..]1Top Down mode: world width of the output; perspective mode derives it from the points. Hidden when mode = perspective.
ParameterTypeDefaultDescription
Dequantize 8-bit Depth dequantizetoggleonSmooth an 8-bit depth map back to continuous values before lifting. Depth Anything through comfyui_controlnet_aux delivers 256 levels; each level would lift to one arc on the ground, which shows as horizontal streaks and terraces in the far field. Every value stays within its own quantization bin, so silhouettes stay sharp. Has no effect on float depth or MoGe, and also applies in top_down mode.

Tips

  • Prefer moge_geometry over a plain depth map for perspective images; a guessed depth bends the terrain.
  • Perspective mode needs ground running into the distance under a horizon. A figure, a portrait or a flat-coloured drawing has no ground to fit: the sky lifts as a wall at the back and the subject as a spike.

COP HeightField Hydraulic Erosion (PCG)#

PCG_COPHydraulicErosion · category PCG/cop · Houdini: HeightField Erode (COP)

Erodes a height layer with simulated water droplets that carry and deposit sediment.

COP HeightField Hydraulic Erosion (PCG): input and result

Droplets run downhill, pick up material where it is steep and fast, and drop it where the slope flattens, the water evaporates and the speed falls. Gullies, alluvial fans and flat basin floors grow this way. In the terrain chain this is the only node that actually transports sediment: the erosion filters only carve, thermal erosion only collapses to the angle of repose, and stream power only cuts.

The model is the droplet model of Beyer 2015, with parameter names following Sebastian Lague's implementation. A batch of droplets runs at the same time and their changes are scatter-added back. Because hundreds of droplets can join one channel in the same step, each cell is dug at most down to its lowest neighbour and built up at most slightly above its highest neighbour, so no pits or spikes form. Material beyond that limit stays on the droplet, and the books balance per droplet: the change in total terrain volume equals minus the material that left over the map edge (and any discarded sediment), as stated in report.

Output layers: the eroded height (Output Layer), net deposition (Deposit Layer, default debris, accumulated onto an existing layer of the same name, so thermal-erosion talus and alluvial deposit end up in one layer), optional net erosion, and wetness (water traffic above the background level, normalized to 0-1, useful as a river or gully mask). Leave a layer name empty to skip that output.

Height Scale and World Size give the world scale: height value times Height Scale is world height, and World Size is the world width of the whole image. Droplets per Pixel of 1 is roughly Lague's default amount.

Inputs

InputTypeDescription
copCOPIMAGEImage containing the height layer.

Outputs

OutputTypeDescription
copCOPIMAGEImage with the eroded height and the requested deposit, erosion and wetness layers.
reportSTRINGText summary: droplet count, eroded and deposited volume, sediment lost or dropped at end of life, outflow over the map edge, mass-balance residual and the device used.

Parameters

ParameterTypeDefaultDescription
Height Layer layerstringCLayer holding the terrain height.
Height Scale strengthfloat [-10000.0..10000.0]1Height Scale: multiplies the height values to get world heights. Must not be 0. Output is divided back to height units.
World Size world_sizefloat [1e-06..]1World width of the whole image, used to convert pixels into world distances for slopes.
Tileable (Wrap Edges) tiletoggleoffTreat the image as tileable: droplets wrap around the edges instead of leaving the map.
Hardness Layer hardness_layerstring(empty)Optional layer in 0-1 where 1 is bedrock that cannot be eroded.
Seed rand_seedint [0..]0Seed for the random droplet start positions.

Erosion

ParameterTypeDefaultDescription
Droplets per Pixel droplets_per_pixelfloat [0.0..100.0]1Total number of droplets relative to the pixel count. More droplets give stronger, more developed erosion and a longer run time.
Max Lifetime lifetimeint [1..10000]30Maximum number of steps each droplet takes.
Erosion Rate erode_ratefloat [0.0..1.0]0.3Fraction of the available capacity deficit that is eroded per step.
Deposition Rate deposit_ratefloat [0.0..1.0]0.3Fraction of excess sediment that is deposited per step when the droplet carries more than it can.

Erosion › Droplet

ParameterTypeDefaultDescription
Sediment Capacity capacityfloat [0.0..1000.0]4Sediment capacity multiplier. Higher values let droplets carry more material before depositing.
Inertia inertiafloat [0.0..0.99]0.05How much a droplet keeps its previous direction rather than following the slope. Higher values give smoother, straighter paths.
Min Slope min_slopefloat [0.0..10.0]0.01Lower bound on the slope used in the capacity calculation, so droplets on flat ground still carry some material.
Evaporation Rate evaporatefloat [0.0..0.99]0.01Fraction of its water a droplet loses per step. Higher values make droplets deposit sooner.
Gravity gravityfloat [0.0..1000.0]4Acceleration of droplets on slopes. Higher values speed them up faster.

Erosion › Brush

ParameterTypeDefaultDescription
Erosion Radius radiusfloat [1.0..32.0]3Erosion brush radius in pixels; material is removed over this area around the droplet.
Deposition Radius deposit_radiusfloat [0.0..32.0]0Deposition brush radius in pixels. 1 or less deposits bilinearly onto the four surrounding cells.
At End of Lifetime end_modemenuSpread SedimentWhat happens to sediment still carried when a droplet's lifetime ends. Spread Sediment piles it up locally with a brush (limited like normal deposition); Discard Sediment throws it away as in the original algorithm. Options: Spread Sediment (spread), Discard Sediment (lose).

Output

ParameterTypeDefaultDescription
Output Layer out_layerstringCLayer that receives the eroded height. Using the input layer's name overwrites it.
Deposit Layer deposit_layerstringdebrisLayer for net deposition (height units, 0 or more). Empty disables it.
Accumulate onto Existing accumulate_deposittoggleonAdd the new deposition to an existing layer of the same name instead of replacing it. Disabled when deposit_layer = "".
Erosion Layer erosion_layerstring(empty)Layer for net erosion (height units, 0 or more). Empty disables it.
Wetness Layer wet_layerstringwetnessLayer for the wetness mask. Empty disables it.
Keep Input Layers keep_layerstoggleonKeep the other input layers in the output.

Advanced

ParameterTypeDefaultDescription
Batch Size batchint [1..]16384Number of droplets simulated at the same time. Larger is faster but deviates more from a strictly one-droplet-at-a-time algorithm.
Compute computemenuAutoBackend. Auto uses the GPU when one is available and the image is at least 256x256, otherwise CPU. GPU runs in float32, so results differ from CPU at rounding level and, because droplet paths are sensitive to rounding, may differ visibly in detail. The result is returned on the original backend. Options: Auto (auto), CPU (cpu), CUDA (cuda).

Compared with Houdini

Corresponds to HeightField Erode but implemented as a droplet (particle) model that transports sediment, not Houdini's solver. Parameter names follow the Lague implementation.

Tips

  • Put it after thermal erosion: the debris layer then holds both talus and alluvial deposit, which the Splat Map node reads for sediment by default.
  • Droplet paths are sensitive to rounding, so expect the same seed to look different on CPU and GPU.

COP HeightField Mask by Feature (PCG)#

PCG_COPMaskByFeature · category PCG/cop · Houdini: HeightField Mask by Feature (COP)

Builds a mask from terrain features: slope, direction, height, curvature and occlusion.

COP HeightField Mask by Feature (PCG): input and result

Each enabled criterion gives a 0-1 mask, and the enabled criteria are combined with Blend Mode (multiply by default, so all must hold). If no criterion is enabled the mask is all 1. Soft edges use smoothstep; a falloff of 0 gives a hard edge. Smooth Radius blurs the height first (world units) and all features are measured on the blurred height. Scale parameters (Height Scale, World Size) follow the same convention as the other height-layer nodes.

Typical uses: rock on slopes of 35 degrees or more, gravel in gullies, snow on north-facing slopes (a Goal Angle of 90 degrees means downhill points toward +v).

  • Slope: angle in degrees between the surface and the horizontal.
  • Direction: downhill direction within Angle Spread of the Goal Angle (0 degrees is +u, 90 degrees is +v). Flat ground has no direction and scores 0.
  • Height: range in raw height values (Height Scale is not applied).
  • Curvature: tangential curvature separates ridges from gullies without using elevation, which flips on high gullies and low ridges. The height is blurred by Blur Radius pixels first (pixel-level curvature is noise), then divided by a reference value: Reference Curvature if greater than 0 (per world unit; required for tiled generation), otherwise the 90th percentile of |curvature| of this image. Threshold 0 then splits ridges from gullies; higher values select only sharper features.
  • Occlusion: 1 minus the height-to-AO result, so 0 is open and 1 is fully blocked.

Inputs

InputTypeDescription
copCOPIMAGEImage containing the height layer.

Outputs

OutputTypeDescription
copCOPIMAGEImage with the mask in the output layer.

Parameters

ParameterTypeDefaultDescription
Height Layer layerstringCLayer holding the terrain height.
Height Scale strengthfloat [-10000.0..10000.0]1Height Scale: multiplies height values to get world heights, used for slope, curvature and occlusion.
World Size world_sizefloat [1e-06..]1World width of the whole image.
Tileable (Wrap Edges) tiletoggleoffTreat the image as tileable (wrap at the edges).
Smooth Radius smooth_radiusfloat [0.0..]0Radius in world units used to blur the height before any feature is measured. 0 disables.
Blend Mode blend_modemenuMultiplyHow multiple enabled criteria are combined. Add is not clamped, so the mask can exceed 1. Options: Multiply (multiply), Add (add), Average (average), Minimum (minimum), Maximum (maximum).

Slope

ParameterTypeDefaultDescription
Mask by Slope use_slopetoggleonEnable the slope criterion.
Slope Range slope_min slope_maxfloat [0.0..90.0]20, 90Slope range in degrees: the mask is 1 between the two values.
Slope Falloff slope_fallofffloat [0.0..90.0]5Width of the soft edge of the slope range, in degrees.

Direction

ParameterTypeDefaultDescription
Mask by Direction use_aspecttoggleoffEnable the direction criterion.
Goal Angle aspect_dirfloat [-360.0..360.0]90Goal downhill direction in degrees (0 is +u, 90 is +v).
Angle Spread aspect_spreadfloat [0.0..180.0]45Allowed angular deviation from the goal direction, in degrees.
Direction Falloff aspect_fallofffloat [0.0..180.0]15Width of the soft edge of the direction range, in degrees.

Height

ParameterTypeDefaultDescription
Mask by Height use_heighttoggleoffEnable the height criterion.
Height Range height_min height_maxfloat0, 1Height range in raw height values: the mask is 1 between the two values.
Height Falloff height_fallofffloat [0.0..]0Width of the soft edge of the height range, in height units.

Curvature

ParameterTypeDefaultDescription
Mask by Curvature curvaturemenuOffSelect ridges (convex) or gullies (concave), or turn the curvature criterion off. Options: Off (off), Ridges (ridges), Gullies (gullies).
Threshold curv_thresholdfloat [-100.0..100.0]0Threshold on the normalized curvature. 0 splits ridges from gullies; positive values keep only sharper features. Hidden when curvature = off.
Falloff curv_fallofffloat [0.0..100.0]0.3Width of the soft edge around the threshold, in normalized curvature. Hidden when curvature = off.
Blur Radius curv_blurfloat [0.0..256.0]2Blur radius in pixels applied to the height before curvature is computed. Hidden when curvature = off.
Reference Curvature curv_referencefloat [0.0..]0Curvature used for normalization, per world unit. 0 uses the 90th percentile of this image; set it explicitly when generating in tiles. Hidden when curvature = off.

Occlusion

ParameterTypeDefaultDescription
Mask by Occlusion use_occlusiontoggleoffEnable the occlusion criterion.
Occlusion Range occ_min occ_maxfloat [0.0..1.0]0.2, 1Occlusion range (0 open, 1 fully blocked): the mask is 1 between the two values.
Occlusion Falloff occ_fallofffloat [0.0..1.0]0Width of the soft edge of the occlusion range.
Height Scale occ_height_scalefloat [0.0..]1Extra multiplier on height for the occlusion calculation, to exaggerate occlusion.
View Radius occ_radiusfloat [1e-06..]0.1How far to look for occluders, in world units.
Step Scale occ_step_scalefloat [0.01..]1Number of pixels per marching step (at most 64 steps are taken).
Sample Count occ_samplesint [1..64]8Number of directions sampled for occlusion.
ParameterTypeDefaultDescription
Invert Mask inverttoggleoffInvert the final mask.
Output Layer out_layerstringmaskName of the mask layer.
Keep Input Layers keep_layerstoggleonKeep the other layers of the input in the output.

COP HeightField Mask by Object (PCG)#

PCG_COPHFMaskByObject · category PCG/cop

Projects a geometry vertically onto a height field and outputs a mask of where it covers, crosses, floats above or is buried below the ground.

Uses the same grid convention as HeightField Project: xz plane, centered, width world_size, world height equal to layer value times strength. Each texel's column is tested with rays from above and below to find the top and bottom of the geometry.

Modes: footprint is 1 wherever the geometry covers the column; intersect where the geometry passes through the ground (bottom at or below the ground and top at or above it); above where the geometry is entirely above the ground; below where it is entirely buried.

feather softens the mask outward by a world-space distance (exact distance with a smoothstep). invert flips the mask.

Inputs

InputTypeDescription
copCOPIMAGEImage containing the height layer.
geoGEOMETRYGeometry (needs polygons) to project.

Outputs

OutputTypeDescription
copCOPIMAGEImage with the mask layer added.
reportSTRINGText report of the operation.

Parameters

ParameterTypeDefaultDescription
Mask Type modemenuFootprintWhich relation between object and ground is marked: footprint, intersect, above (floating) or below (buried). Options: Footprint (footprint), Intersecting Ground (intersect), Above Ground (above), Below Ground (below).
Height Layer layerstringCHeight layer defining the ground. Hidden when mode = footprint.
Height Scale strengthfloat1Height scale: layer value times Strength gives world height. Hidden when mode = footprint.
World Size world_sizefloat [1e-06..]1Width of the height field in world units (centered on the origin).
Feather featherfloat [0.0..]0Width of the outward soft edge in world units. 0 gives a hard mask.
Invert Mask inverttoggleoffInvert the mask.
Output Layer out_layerstringmaskName of the output mask layer.

COP HeightField Project (PCG)#

PCG_COPHFProject · category PCG/cop · Houdini: HeightField Project (COP), HeightField Transform 3D (COP)

Projects geometry down onto a height field, or, with no geometry connected, transforms the height field in 3D and projects it back.

Covers HeightField Project and HeightField Transform 3D. With geo connected, a ray is cast straight down from above each texel; the height of the hit, divided by strength, is combined into the layer according to mode. With no geometry, the height field itself is turned into a mesh, transformed with translate, rotate (Euler XYZ, degrees) and scale about its center, and projected back onto the same grid. The mode is then always Replace, so tilting, lifting or rotating a terrain is a true 3D transform and not an image-space warp.

project chooses which surface a ray takes: the highest hit, or the lowest (Minimum Height). If max_height is above 0, only geometry whose height value lies within plus/minus that value is projected. mask and mask_layer blend the result with the original height. projection_only outputs just the projected heights without compositing, and hitmask_layer writes a mask of the texels that were hit. The second output is a report with the number of hit texels.

The grid convention is the one of HeightField to Mesh: xz plane, centered, width world_size.

Inputs

InputTypeDescription
copCOPIMAGEImage containing the height layer.
geo (optional)GEOMETRYGeometry to project from above. When disconnected, the node performs the 3D transform of the height field.

Outputs

OutputTypeDescription
copCOPIMAGEImage with the projected height layer (and optional hit mask).
reportSTRINGText report with the number of hit texels.

Parameters

ParameterTypeDefaultDescription
Height Layer layerstringCHeight layer to project onto.
Project projectmenuMaximum HeightWhich surface a ray picks: maximum the topmost, minimum the lowest. Options: Maximum Height (maximum), Minimum Height (minimum).
Max Projection Height max_heightfloat [0.0..]0If above 0, only geometry within this height range (as a height value, plus/minus) is projected. 0 means unlimited.
Mask maskfloat [0.0..1.0]1Blend amount between original and result. When a mask layer is given, it is multiplied by it. Disabled when projection_only is on.
Mask Layer mask_layerstring(empty)Optional layer controlling the blend per pixel. Disabled when projection_only is on.
Blend Mode modemenuMaximumHow the projected height combines with the existing height (only with geometry connected): max, min, add, replace, multiply, or blend. Blend replaces the height where hit and leaves the rest; Replace fills misses with Fill Value. Without geometry the mode is fixed to Replace. Options: Maximum (max), Minimum (min), Add (add), Replace (replace), Blend (blend), Multiply (multiply). Disabled when projection_only is on.
Output Projection Only projection_onlytoggleoffOutput only the projected heights, with misses set to Fill Value, without combining with the original height or the mask.
Fill Value fill_valuefloat0Value for texels that were not hit (with geometry, only used by Replace and Output Projection Only).
Height Scale strengthfloat1Height scale: layer value times Strength gives world height.
World Size world_sizefloat [1e-06..]1Width of the height field in world units (centered on the origin).

Transform 3D

ParameterTypeDefaultDescription
Translate translatestring0 0 0Translation (x y z) applied in the 3D transform. Only used when no geometry is connected.
Rotate rotatestring0 0 0Rotation (x y z, Euler angles in degrees). Only used when no geometry is connected.
Scale scalestring1 1 1Scale (x y z) about the height field's center. Only used when no geometry is connected.
ParameterTypeDefaultDescription
Output Layer out_layerstring(empty)Name of the output layer. Empty overwrites the height layer.
Hitmask Layer hitmask_layerstring(empty)Name of a layer that receives 1 where a ray hit and 0 elsewhere. Empty disables it.

COP HeightField Splat Map (PCG)#

PCG_COPSplatMap · category PCG/cop

Derives a set of grass, sediment, rock, snow and water material masks that sum to one from a terrain.

Produces masks that always add up to exactly 1 per pixel, for engine terrain layers, regional prompts or a segmentation ControlNet (use the id layer).

The layers are composited in order, later ones covering earlier ones: water over snow over rock over sediment over grass. Rock is steep slope. Snow is above the snow line and not too steep (steep faces cannot hold snow). Sediment comes from the debris layer (a thermal erosion output) or, without one, from low flat areas. Water comes from lake / river layers (flow accumulation outputs).

Height is normalized per image by default (a snow line of 0.75 is the top quarter); use Absolute when tiled generation must line up. Besides the masks, <prefix>_id holds the index of the dominant material and <prefix>_rgba packs rock, snow, sediment and water (grass is implied). The second output is a text report.

Inputs

InputTypeDescription
copCOPIMAGEImage containing the height layer and optional debris and water layers.

Outputs

OutputTypeDescription
copCOPIMAGEImage with the material masks.
reportSTRINGText report of the result.

Parameters

ParameterTypeDefaultDescription
Height Layer layerstringCLayer holding the height.
Height Scale strengthfloat [-10000.0..10000.0]1Multiplier applied to the height values.
World Size world_sizefloat [1e-06..]1World-space width of the image, which relates height units to pixels.
Tileable (Wrap Edges) tiletoggleoffWraps the edges when computing slopes.
Height Mode height_modemenuNormalized (Per Image)Normalized rescales height per image. Use Absolute so separately generated tiles match. Options: Normalized (Per Image) (normalized), Absolute (absolute).

Rock

ParameterTypeDefaultDescription
Rock Angle rock_anglefloat [0.0..90.0]38Slope in degrees above which rock appears.
Rock Falloff rock_fallofffloat [0.0..45.0]6Width in degrees of the transition into rock. Also used for the slope transition of snow.

Snow

ParameterTypeDefaultDescription
Snow Line snow_linefloat0.75Height above which snow appears.
Snow Falloff snow_fallofffloat [0.0..]0.08Height range of the snow transition. Also used for the height transition of sediment on low flats.
Snow Max Slope snow_max_slopefloat [0.0..90.0]50Slope in degrees above which snow no longer sticks.

Sediment

ParameterTypeDefaultDescription
Sediment Layer sediment_layerstringdebrisLayer used for sediment if present in the image. If missing or empty, sediment appears on low flat areas.
Sediment Reference sediment_reffloat [0.0..]0Value of the sediment layer that counts as full sediment. 0 picks it automatically (90th percentile of the positive values). Disabled when sediment_layer = "".
Flat Angle flat_anglefloat [0.0..90.0]8Slope in degrees below which ground counts as flat. Used only without a sediment layer.
Sediment Max Height sediment_heightfloat0.3Maximum height at which flat ground becomes sediment. Used only without a sediment layer.

Water

ParameterTypeDefaultDescription
Water Layers water_layersstringlake riverSpace-separated layer names. Names starting with lake are thresholded; others are clamped to 0..1.
Lake Threshold lake_minfloat [0.0..]0.0001Value of a lake layer above which water appears.
Lake Falloff lake_fallofffloat [0.0..]0Softness of the lake threshold; 0 is a hard threshold.
ParameterTypeDefaultDescription
Output Prefix prefixstringsplatPrefix of the output layers, for example <prefix>_grass, _id, _rgba.
Keep Input Layers keep_layerstoggleonKeeps the input layers in the output.

COP HeightField Stream Power Erosion (PCG)#

PCG_COPStreamPower · category PCG/cop

Erodes a height layer by simulating the stream power law with an implicit solver.

COP HeightField Stream Power Erosion (PCG): input and result

Solves dh/dt = U - K * A^m * S (uplift minus erodibility times drainage area to the m times slope) in the FastScape manner. Unlike an erosion filter, this is a simulation that recomputes flow routing every step, so large rivers cut deep while hillslopes barely change, and a continuous, hierarchical river network that reaches the outlets develops.

Two uses: with Uplift 0, carve valleys into existing terrain (tens of iterations); with Uplift above 0, build mountains from noise as uplift and erosion balance (hundreds of iterations). The Uplift Layer multiplies uplift (raise only the middle for a mountain range). Slope Diffusion rounds hillslopes and dulls ridges.

The implicit scheme is stable for any step size and creates no new pits (depressions are filled once at the start and lakes are filled as sediment). Outlets are fixed base level. D8 routing pulls rivers into straight lines at 0 and 45 degrees; Rho8 randomly picks diagonals each step, which is unbiased on average (reproducible with a fixed seed). Large flat areas after lake filling can still show straight lines, caused by the epsilon slope toward the nearest outlet, regardless of routing. CPU only, around 0.2 s per step at 512x512.

The second output is a text report. The Flow Layer receives the drainage area of the last step.

Inputs

InputTypeDescription
copCOPIMAGEImage containing the height layer.

Outputs

OutputTypeDescription
copCOPIMAGEImage with the eroded height and flow layer.
reportSTRINGText report of the run.

Parameters

ParameterTypeDefaultDescription
Height Layer layerstringCLayer holding the height.
Height Scale strengthfloat [-10000.0..10000.0]1Multiplier applied to the height values.
World Size world_sizefloat [1e-06..]1World-space width of the image, which relates height units to pixels.
Iterations iterationsint [0..]100Number of simulation steps.

Erosion

ParameterTypeDefaultDescription
Erodibility (K) erodibilityfloat [0.0..10.0]0.02K in the equation: how fast the terrain erodes.
Area Exponent (m) area_exponentfloat [0.0..2.0]0.5m in the equation: how strongly drainage area deepens channels.
Slope Diffusion diffusionfloat [0.0..0.25]0Slope diffusion that rounds hillslopes and blunts divides.
Flow Routing routingmenuRho8 (Randomized)Flow routing: D8 or Rho8, which randomizes the diagonal choice to avoid straight 0/45 degree rivers. Options: D8 (d8), Rho8 (Randomized) (rho8).
Seed rand_seedint [0..]0Seed for Rho8 routing. Hidden when routing = d8.

Uplift

ParameterTypeDefaultDescription
Uplift upliftfloat [0.0..10.0]0Constant uplift rate. 0 only erodes.
Uplift Layer uplift_layerstring(empty)Optional layer (0 to 1) multiplied onto Uplift. Disabled when uplift = 0.

Boundary

ParameterTypeDefaultDescription
Tileable (Wrap Edges) tiletoggleoffWraps the edges so the terrain tiles.
Outlet Layer base_layerstring(empty)Layer where values above 0.5 are outlets (fixed base level). Empty uses the image edges.
ParameterTypeDefaultDescription
Output Layer out_layerstringCLayer receiving the eroded height.
Flow Layer flow_layerstringflowLayer receiving the drainage area of the last step. Empty skips it.

COP HeightField Terrace (PCG)#

PCG_COPTerrace · category PCG/cop · Houdini: HeightField Terrace (COP)

Turns a height layer into terraces with flat treads and steep risers.

COP HeightField Terrace (PCG): input and result

Works directly on the height values. Heights are divided into steps; the relative position f inside each step (0-1) is passed through the power function f^p with p = 1 / (1 - Sharpness). At Sharpness 0 the function is the identity and the height is unchanged; towards 1 the treads become flat and the risers steep, and at 1 the result is a pure staircase.

The result is monotonic (high ground never ends up lower than low ground), the step boundaries at Offset + k * Step do not move, and the node only cuts, never fills (output is not higher than the input).

In Number of Terraces mode the step size is (Max Height - Min Height) / Terraces and terracing is limited to that range; in Step Size mode it applies to all heights unless Limit Range is on. Heights outside the range are left untouched. A mask layer (and/or the Mask value) blends between the original and the terraced height, for example to terrace only the steep slopes.

Inputs

InputTypeDescription
copCOPIMAGEImage with the height layer.

Outputs

OutputTypeDescription
copCOPIMAGEThe image with the terraced height written as a single-channel layer.

Parameters

ParameterTypeDefaultDescription
Height Layer layerstringCHeight layer to terrace. Only its first channel is used.
Mask maskfloat [0.0..1.0]1Blend amount from 0 (original) to 1 (fully terraced). If a mask layer is given, this multiplies it.
Mask Layer mask_layerstring(empty)Optional layer whose first channel (clamped to 0-1) controls the blend per pixel. Empty uses only the constant Mask value.
Method methodmenuStep SizeStep Size uses the height of each step directly; Number of Terraces divides the Min/Max range into the given number of equal steps. Options: Step Size (step_size), Number of Terraces (num_terraces).
Step Size stepfloat [1e-06..]0.1Height of one terrace step. Used by the Step Size method. Hidden when method = num_terraces.
Terraces terracesint [1..]10Number of terraces between Min Height and Max Height. Used by the Number of Terraces method. Hidden when method = step_size.
Limit to Height Range limit_rangetoggleoffIn Step Size mode, restrict terracing to the Min/Max height range. Number of Terraces always does this. Hidden when method = num_terraces.
Min Height min_heightfloat0Lower end of the terraced range. Steps start here (plus Offset). Disabled when method = step_size limit_range is off.
Max Height max_heightfloat1Upper end of the terraced range. Must be greater than Min Height when the range is used. Disabled when method = step_size limit_range is off.
Offset offsetfloat0Shifts all step boundaries up by this height.
Sharpness sharpnessfloat [0.0..1.0]0.70 leaves the height unchanged, values near 1 give flat treads with steep risers, 1 gives a hard staircase.
Random Step random_stepfloat [0.0..1.0]0Randomly shifts every step boundary by up to half of this fraction of the step height (0-1). Keeps the terraces monotonic.
Step Seed rand_seedint [0..]0Seed for the random boundary shifts. Disabled when random_step = 0.
Output Layer out_layerstringCLayer that receives the terraced height.
Keep Input Layers keep_layerstoggleonKeep the other layers of the input image in the output. When off, the output contains only the terraced layer.

Compared with Houdini

Follows HeightField Terrace's Step Size / Number of Terraces methods, Limit Range, Random Step and Mask. Sharpness is an addition of this plugin; Houdini does not document the riser profile. At the ends of the limited range there can be a step-like jump when the step size does not divide the range or Offset is non-zero; no extra transition is applied.

Tips

  • Put a slope mask (for example Mask by Feature) in front and connect it as the mask layer to terrace only steep areas.

COP HeightField Thermal Erosion (PCG)#

PCG_COPThermalErosion · category PCG/cop · Houdini: HeightField Slump (COP)

Collapses slopes steeper than the angle of repose, moving material downhill and piling it up at the foot.

COP HeightField Thermal Erosion (PCG): input and result

Thermal erosion (slumping): wherever the terrain is steeper than the talus angle, loose material slides downhill until the slope relaxes to that angle. It is different from the Erosion Filter node, which carves channels; this one flattens over-steep slopes and builds talus fans at their base. A common order is Erosion Filter followed by Thermal Erosion, to collapse the too-steep gully walls the filter produced.

Mass is conserved (the total height does not change). Terrain that is everywhere gentler than the talus angle is returned bit-identical, and a tall column collapses into a cone whose slope converges to the angle of repose. The cost is Iterations times the number of neighbours in full-image passes. With Compute on Auto, large images run on the GPU in float32 when one is available; the result is returned on the original backend.

The Debris Source menu selects between two models. With Whole Height the entire height value can slide (the classic thermal behaviour) and the debris layer receives the net deposit. With Debris Layer or Constant Depth (Houdini HeightField Slump semantics) the height is fixed bedrock and only the debris layer slides on top of it; when debris is slid away the bedrock is exposed, and the debris layer then holds the remaining debris thickness. In Granular mode the amount moved per step and cell is randomised.

A hardness layer marks bedrock that never moves.

Inputs

InputTypeDescription
copCOPIMAGEImage containing the height layer (and optionally hardness and debris layers).

Outputs

OutputTypeDescription
copCOPIMAGEThe image with the eroded height layer and, if named, the debris layer.

Parameters

ParameterTypeDefaultDescription
Height Layer layerstringCHeight layer to erode. Only its first channel is used.
Height Scale strengthfloat [-10000.0..10000.0]1Height scale: height values times Strength give world height. Together with World Size this defines the slope.
World Size world_sizefloat [1e-06..]1World width of the image. Together with Strength it determines the real slope between pixels, which is compared with the talus angle.
Slump Mode slump_modemenuSmoothSmooth moves material deterministically; Granular adds a random factor to the amount moved per step and cell (seeded by Rand Seed). Options: Smooth (smooth), Granular (granular).
Random Seed rand_seedint [0..]0Seed for Granular mode. Disabled when slump_mode = smooth.
Debris Source debris_sourcemenuWhole Height (Thermal)Whole Height: the entire height can slide (thermal erosion). Debris Layer: only the thickness stored in the debris input layer slides over fixed bedrock. Constant Depth: a uniform debris thickness covers the terrain and slides over fixed bedrock. Options: Whole Height (Thermal) (height), Debris Layer (layer), Constant Depth (constant).
Debris Input Layer debris_inputstringdebrisLayer holding the initial debris thickness. Used with the Debris Layer source. Hidden when debris_source ≠ layer.
Debris Scale debris_scalefloat [0.0..]1Multiplier on the debris layer (Debris Layer source), or the debris thickness itself in height units (Constant Depth source). Hidden when debris_source = height.
Remove Debris from Input Height remove_debristoggleoffSubtract the debris from the height before the simulation, so the height becomes the bedrock without debris. Hidden when debris_source = height.
Add Debris to Output Height add_debristoggleonAdd the slid debris back into the output height. Turn off to output the bedrock only. Hidden when debris_source = height.
Repose Angle talus_anglefloat [0.0..89.9]35Angle of repose in degrees. Slopes steeper than this collapse; lower values flatten more.
Spread Iterations iterationsint [0..]50Number of relaxation passes. More passes get closer to the angle of repose everywhere. 0 leaves the terrain unchanged.
Spread Rate ratefloat [0.0..1.0]0.5Fraction (0-1) of the excess material moved per pass. Lower values are smoother and need more iterations.
Neighbours neighboursmenu8 (Include Diagonals)Whether material may also flow along the diagonals (8) or only along the four edges (4). Edges-only produces more axis-aligned artefacts. Options: 8 (Include Diagonals) (8), 4 (Edges Only) (4).
Tileable (Wrap Edges) tiletoggleoffTreat the image as periodic so material flows across opposite edges.
Hardness Layer hardness_layerstring(empty)Optional layer (0-1) marking bedrock. 1 means the terrain does not move at all there.
Output Layer out_layerstringCLayer that receives the eroded height.
Debris Layer debris_layerstringdebrisLayer that receives the debris: the net deposit in Whole Height mode, the remaining debris thickness in the other modes. Empty writes nothing.
Keep Input Layers keep_layerstoggleonKeep the other layers of the input image in the output. When off, only the written layers remain.
Compute computemenuAutoAuto uses the GPU for large images when available; CPU forces NumPy; CUDA forces the GPU. Options: Auto (auto), CPU (NumPy) (cpu), CUDA (cuda).

Compared with Houdini

Corresponds to HeightField Slump. The Debris Layer and Constant Depth sources follow its semantics (fixed bedrock, sliding debris). Whole Height is the plugin's original thermal behaviour.

Tips

  • Run it after the Erosion Filter to relax steep gully walls.
  • Use the debris layer as a mask to paint scree textures.

COP Mono to HeightField (PCG)#

PCG_COPMonoToHeightField · category PCG/cop · Houdini: Mono to HeightField (COP)

Converts a single-channel layer into a height layer by scaling and offsetting its values.

The height is value * Height Scale + Height Offset (scale first, then offset, so Offset is in final height units). Only the first channel of the layer is used. Layers have no type metadata in this plugin, so the result is recognised as a height field by its layer name; the default output name is height.

Inputs

InputTypeDescription
copCOPIMAGEImage containing the mono layer.

Outputs

OutputTypeDescription
copCOPIMAGEImage with the height layer added.

Parameters

ParameterTypeDefaultDescription
Layer layerstringCLayer to convert. For multichannel layers the first channel is used.
Height Scale height_scalefloat1Multiplier applied to the values.
Height Offset height_offsetfloat0Value added after scaling.
Output Layer out_layerstringheightName of the height layer.

Compared with Houdini

Houdini also flags the layer's Type Info as height. Layers here carry no such flag; height layers are identified by naming convention.


COP Normal to Height (PCG)#

PCG_COPNormalToHeight · category PCG/cop · Houdini: Normal to Height (COP)

Reconstructs a height layer from a normal map; the inverse of Height to Normal.

COP Normal to Height (PCG): input and result

The output has zero mean. With the same Height Scale and World Size used for the forward conversion, the recovered height differs from the original only by a constant. Typical use: you only have a normal map (scan, bake, AI-generated) and need a height for displacement, parallax or terrain.

Two integrators, with a real trade-off:

  • Spectral (Frankot-Chellappa): robust for inconsistent normal maps (AI or hand-painted maps that do not correspond to any real surface), but it attenuates fine detail: undulations with a 16-pixel period come back at 97.5%, a 4-pixel period at 64%.
  • Exact: a pixel-exact inverse of Height to Normal (central differences, tiled), but inconsistent input produces checkerboard patterns at high frequency. Use it when you convert back and forth inside your own chain.

With Tileable off, the edges are extended by mirroring (zero slope at the border), so the few pixels near the edge are approximate, and Exact is then worse than Spectral (the mirror seams are inconsistent and the exact method amplifies them). Use Exact with tiling and Spectral without.

Normals with z at or below 0.01 are clamped to avoid exploding slopes; report states how many were clamped.

Inputs

InputTypeDescription
copCOPIMAGEImage containing the normal layer.

Outputs

OutputTypeDescription
copCOPIMAGEImage with the height layer added.
reportSTRINGText summary, including how many pixels had their normal clamped.

Parameters

ParameterTypeDefaultDescription
Normal Layer layerstringNLayer holding the tangent-space normals.
Height Scale strengthfloat [-10000.0..10000.0]1Height Scale: the scale used when the normals were created from a height (height times this is world height). The output is in height units.
World Size world_sizefloat [1e-06..]1World width of the whole image, used to convert normals to slopes.

Integration

ParameterTypeDefaultDescription
Method methodmenuSpectral (Frankot-Chellappa)Integration method; see the description. Use Exact with Tileable on and Spectral with it off. Options: Spectral (Frankot-Chellappa) (spectral), Exact (Inverse of Height to Normal) (exact).
Tileable (Wrap Edges) tiletoggleoffTreat the image as tileable (wrap) instead of mirroring at the edges.
ParameterTypeDefaultDescription
Output Layer out_layerstringheightName of the height layer.
Keep Input Layers keep_layerstoggleonKeep the other input layers in the output.

COP Slope & Aspect (PCG)#

PCG_COPSlope · category PCG/cop · Houdini: Slope Direction (COP)

Computes slope, aspect and downhill direction from a height layer.

COP Slope &amp; Aspect (PCG): input and result

Writes up to three layers; leaving a layer name empty skips that layer. Slope is available in degrees (0 to 90), as a tangent (the gradient magnitude) or normalized to 0 to 1. Aspect is the downhill direction in degrees, with 0 pointing along +U and 90 along +V, and is 0 on flat areas. The downhill direction layer holds the unit vector (u, v) pointing downhill; wiring it into COP Distort drags pixels along the slope.

Slope and aspect are exact per pixel on inclined planes, and the derivatives use quadratic extrapolation at the borders, so even the boundary is exact on quadratic surfaces. The scale parameters match the other height-field nodes.

Inputs

InputTypeDescription
copCOPIMAGEImage containing the height layer.

Outputs

OutputTypeDescription
copCOPIMAGEImage with the slope, aspect and direction layers.

Parameters

ParameterTypeDefaultDescription
Height Layer layerstringCLayer holding the height.
Height Scale strengthfloat [-10000.0..10000.0]1Multiplier applied to the height values.
World Size world_sizefloat [1e-06..]1World-space width of the image, which relates height units to pixels.
Tileable (Wrap Edges) tiletoggleoffWraps the edges when computing derivatives.
Slope Layer slope_layerstringslopeName of the slope layer. Empty skips it.
Slope Units unitsmenuDegreesUnit of the slope output. Options: Degrees (degrees), Tangent (Rise / Run) (tangent), Normalized (0-1) (normalized). Disabled when slope_layer = "".
Aspect Layer aspect_layerstringaspectName of the downhill direction angle layer, in degrees. Empty skips it.
Downhill Direction Layer dir_layerstringslope_dirName of the downhill unit vector layer. Empty skips it.
Keep Input Layers keep_layerstoggleonKeeps the input layers in the output.

COP Strata (PCG)#

PCG_COPStrata · category PCG/cop · Houdini: HeightField Strata (COP)

Adds tilted rock strata to a height layer as terraced layers with random hardness.

The layer plane is height + Tilt * (u, v) + noise. Each stratum gets a random hardness: hard layers have flat tops and steep steps. The result is mixed back by Strength. With Tilt, noise and randomness all 0 this is a plain terrace. A layer index is also written as <Output Layer>_id. Strata Offset shifts the layer boundaries, a Mask Layer multiplies Strength, and Output Strata Only outputs just the strata displacement (adding it to the height equals Strength 1).

Inputs

InputTypeDescription
copCOPIMAGEImage containing the height layer.

Outputs

OutputTypeDescription
copCOPIMAGEImage with the stratified height and the stratum id layer.

Parameters

ParameterTypeDefaultDescription
Height Layer layerstringCLayer holding the height.
Mask strengthfloat [0..1]0.8Amount mixed back into the height (Houdini's Mask parameter). Disabled when strata_only is on.
Mask Layer mask_layerstring(empty)Optional layer multiplied onto Strength. Disabled when strata_only is on.
Output Strata Only strata_onlytoggleoffOutputs only the strata displacement.
Strata Size spacingfloat [1e-06..]0.1Height of one stratum.
Strata Offset strata_offsetfloat0Shifts the layer boundaries.
Sharpness sharpnessfloat [0..0.999]0.7How steep the steps between layers are.
Hardness Randomness hardness_randomfloat [0..1]0.5Amount of random variation of hardness between strata.
Tilt (U V) tiltstring0 0Tilt of the layer planes along U and V as u v.
Noise Amount noise_amountfloat0Amount of noise added to the layer plane.
Noise Frequency noise_frequencyfloat [0..10000.0]4Frequency of that noise. Disabled when noise_amount = 0.
Seed rand_seedint [0..]0Seed shared by the noise and the per-stratum hardness.
Output Layer out_layerstring(empty)Layer receiving the result. Empty overwrites the input layer; the id goes to <Output Layer>_id.

Compared with Houdini

Houdini's Strata lays 1D noise along tilted planes and combines it with the height by a Blend Mode. This node implements a different model, tilted terraces.