comfyui_pcg docs

Image: Geometry and Images#

Rasterizing and baking geometry; turning images back into geometry.

16 nodes.

Back to the reference index

Contents#

  • COP Bake Textures (PCG) — Bakes geometry attributes and, optionally, high-poly detail into textures laid out by the low-poly mesh's UVs.
  • COP Configure Stamps (PCG) — Writes sprite attributes (scale, rotation, colour, alpha, stamp index) onto points for use by stamping nodes.
  • COP Geometry to Layer (PCG) — Converts volume primitives of a geometry into image layers by taking a slice, one voxel per pixel.
  • COP HeightField to Mesh (PCG) — Converts a height layer into a Y-up grid mesh with one point per pixel center.
  • COP Integrate Volume (PCG) — Casts one ray per pixel through a volume primitive and integrates, transmits, or takes the minimum or maximum of its samples.
  • COP Layer from Attribute (PCG) — Writes a geometry attribute into an image, one element per pixel.
  • COP Layer To Points (PCG) — Turns pixels of an image layer into points, sampling chosen layers as point attributes.
  • COP Planar Inflate (PCG) — Inflates a mask into a height layer, like a pillow or soap bubble.
  • COP Point Generate (PCG) — Adds new points to a point cloud, with the count taken from parameters or from a count attribute.
  • COP Points From Blobs (PCG) — Converts each connected blob of a mask layer into one point with area, radius and bounding-box attributes.
  • COP Rasterize Curves (PCG) — Draws the primitives of a geometry as anti-aliased lines into an image layer.
  • COP Rasterize Splats (PCG) — Renders 3D Gaussian splat points orthographically onto a plane with front-to-back alpha compositing.
  • COP Scatter Shapes (PCG) — Stamps copies of a shape into an image, either randomly scattered or placed from input geometry.
  • COP Triplanar (PCG) — Projects a texture along the three axes using per-pixel world position and normal, blending by normal direction.
  • COP UV Shape (PCG) — Generates interior UV coordinates, UV stretch and a mask for a disk or annulus shape.
  • Render Pass (PCG) — Rasterizes geometry through a camera into COP layers: depth, mask, normals and more.

Nodes#

COP Bake Textures (PCG)#

PCG_COPBakeTextures · category PCG/cop · Houdini: Bake Pre-Process (SOP), Bake Geometry Textures (COP), Bake Geometry Textures 2.0 (COP), Bake Pre-Process (COP)

Bakes geometry attributes and, optionally, high-poly detail into textures laid out by the low-poly mesh's UVs.

The low-poly geometry is rasterized in UV space. Each texel is traced back to its surface point, and the following layers are written: P and N (world position and normal; the point normal is interpolated, or computed if missing), mask (texel is covered by a triangle), primid (original primitive number), tangent (dP/du, orthogonalised against N), bitangent (the third axis of the same frame, with the uv layout's handedness, so detail computed per texel can be written into normal_ts's frame exactly) and every point attribute listed in Attributes, interpolated barycentrically.

When a high mesh is connected, a ray is cast from each texel along +-N (or from the cage, see Tracing Mode) to find the high-poly surface. This adds normal_ts (high-poly normal expressed in the low-poly tangent space, unencoded -1..1), displacement (signed distance along N, positive when the high mesh is outside) and the High Attributes interpolated at the hit point. Optional passes are worldnormal, position, occlusion, height and alpha. All layers except mask are dilated outwards from the UV islands by Dilate texels to avoid mip-map bleeding.

The second output is a JSON report of the bake.

Inputs

InputTypeDescription
lowGEOMETRYLow-poly geometry. Its UV attribute defines the texture layout.
high (optional)GEOMETRYOptional high-poly geometry to bake detail from. Without it only the geometry-derived layers are written.
cage (optional)GEOMETRYOptional cage mesh for Tracing Mode cage_mesh. It must have the same point count and topology as the low-poly mesh.

Outputs

OutputTypeDescription
copCOPIMAGEImage with the baked layers.
reportSTRINGJSON text describing the bake.

Parameters

Tracer

ParameterTypeDefaultDescription
Tracing Mode tracing_modemenuSurface NormalHow rays are cast to the high mesh: surface_normal shoots along +-N from the low-poly surface; cage_mesh shoots a one-directional ray from the matching cage point towards the low-poly point (needs cage and high); single_mesh casts no main ray and treats the low-poly mesh as the high mesh, which is only useful for passes such as occlusion (no normal_ts or displacement). Options: Surface Normal (surface_normal), Cage Mesh (cage_mesh), Single Mesh (low) (single_mesh).
Resolution resolution_x resolution_yint [1..16384]512, 512Width and height of the baked image in pixels.
UV Attribute uv_attribstringuvName of the vertex or point UV attribute on the low-poly mesh.
Face Culling face_cullingmenuNo CullingIgnore main-ray hits on back faces (back) or front faces (front) of the high mesh. Options: No Culling (none), Back Faces (back), Front Faces (front). Disabled when tracing_mode = single_mesh.
Visibility Culling visibility_cullingmenuNo CullingSame idea for the secondary occlusion rays: ignore hits on back or front faces. Only affects the occlusion pass. Options: No Culling (none), Back Faces (back), Front Faces (front). Disabled when occlusion is off.
Max Ray Distance max_distancefloat [0..]0Maximum ray distance along the normal. 0 means unlimited. Only used when high is connected. Disabled when tracing_mode = single_mesh.
Trace Both Sides both_sidestoggleonCast rays both outwards (+N) and inwards (-N). Only used when high is connected. Disabled when tracing_mode ≠ surface_normal.
Ray Bias ray_biasfloat0With surface_normal tracing, moves the ray origin this far along N. Displacement is still measured from the low-poly surface. Disabled when tracing_mode ≠ surface_normal.
Sample Multiplier sample_multiplierfloat [0..64]1Multiplies the number of occlusion samples (Samples x Sample Multiplier). Disabled when occlusion is off.
Edge Padding dilateint [0..1024]4Number of texels the layers are expanded beyond the UV islands. The mask layer is not expanded.

Texture Maps

ParameterTypeDefaultDescription
Normal Space normal_spacemenuSigned (-1 to 1)Encoding of normal_ts: signed keeps -1..1; offset stores n*0.5+0.5. Options: Signed (-1 to 1) (signed), Offset (0 to 1) (offset).
World Normal world_normaltoggleoffAlso output a worldnormal layer: the interpolated high-poly normal at the hit point (the low-poly N where nothing was hit or no high mesh is connected).
World Normal Space world_normal_spacemenuSigned (-1 to 1)Encoding of worldnormal: signed keeps -1..1; offset stores n*0.5+0.5. Options: Signed (-1 to 1) (signed), Offset (0 to 1) (offset). Hidden when world_normal is off.
Position positiontoggleoffAlso output a position layer: the world position of the hit point (the low-poly surface point where nothing was hit or no high mesh is connected).
Position Space position_spacemenuAbsoluteabsolute stores world positions; relative normalizes them by the bounding box of the low-poly mesh. Options: Absolute (absolute), Relative (relative). Hidden when position is off.
Bounding Box bounding_boxmenuFit to Bounding BoxFor relative positions: fit scales each axis to 0..1 separately; uniform uses the longest axis for all axes, centred at 0.5, so proportions are kept. Options: Fit to Bounding Box (fit), Fit to Uniform Box (No Stretching) (uniform). Hidden when position is off } { position_space ≠ relative.
Ambient Occlusion occlusiontoggleoffAlso output an occlusion layer: the fraction of cosine-weighted hemisphere rays from the hit point that are not blocked (1 is fully lit). Rays hit the high mesh, or the low mesh when no high mesh is connected or Tracing Mode is single_mesh.
Occlusion Samples occlusion_samplesint [1..4096]16Number of hemisphere rays per texel for the occlusion pass, before Sample Multiplier. Hidden when occlusion is off.
Max Distance occlusion_max_distancefloat [0..]0Maximum distance of occlusion rays. 0 means unlimited. Hidden when occlusion is off.
Height heighttoggleoffAlso output a height layer.
Height Space height_spacemenuTrue Displacementtrue_displacement writes the signed displacement as is; custom remaps it so that Inner Distance becomes 0 and Outer Distance becomes 1 (not clamped). Options: True Displacement (true_displacement), Custom (custom). Hidden when height is off.
Inner Distance inner_distancefloat-0.1Displacement value mapped to 0 when Height Space is custom. Hidden when height is off } { height_space ≠ custom.
Outer Distance outer_distancefloat0.1Displacement value mapped to 1 when Height Space is custom. Hidden when height is off } { height_space ≠ custom.
Alpha alphatoggleoffAlso output an alpha layer: the low-poly UV coverage (same as mask).
Mask Out High Resolution Mesh alpha_mask_hightoggleoffAlpha is 1 only for texels whose main ray hit the high mesh. Hidden when alpha is off.
Attributes attribsstring(empty)Space-separated point attributes of the low-poly mesh to bake into layers.
High Attributes high_attribsstring(empty)Space-separated point attributes of the high-poly mesh to bake, interpolated at the hit point. Only used when high is connected.

Compared with Houdini

Covers Bake Geometry Textures (2.0) and Bake Pre-Process in one node. Tangent-space normals are written unencoded (-1..1) by default; encode them with COP Convert Normal if a game engine needs it.

Tips

  • Keep Dilate at a few texels or more if the texture will be mip-mapped, otherwise island borders bleed.

COP Configure Stamps (PCG)#

PCG_COPConfigureStamps · category PCG/cop · Houdini: Configure Stamps (COP)

Writes sprite attributes (scale, rotation, colour, alpha, stamp index) onto points for use by stamping nodes.

Does not draw anything. It writes per-point attributes: spritescale (2 values), spriterot (degrees), Cd (colour), blend (alpha) and stamp (integer index of the stamp), and moves P with Jitter. Each property can be driven by a layer from the layers input, sampled at the point's position, and multiplied by a Mask amount, and can be randomized with Uniform, Variance or Min / Max modes. Randomness is a per-point hash of the point number and the relevant seed.

Points are mapped to layer uv using Plane and World Size (image width equals World Size, origin at the centre), the same convention as Layer to Points and Scatter Shapes. If any layer name is set, the layers input must be connected. A layer value blends the base value as base * (1 + (layer - 1) * mask).

Details: Scale percent_variance multiplies by 1 + variance * r and min_max by a random value between Min and Max; Stretch works the same per axis. Angle is Angle + AngleLayer * 360 * mask + atan2(direction.y, direction.x) * direction mask, then variance or min/max, and finally rounded to a multiple of Round To when that is above 0. Colour variance acts in HSV (hue wraps, saturation and value are clamped). Stamp selection: cycle uses point number modulo Stamp Count, random picks randomly, layer_select rounds layer value * (count - 1) and clamps.

Inputs

InputTypeDescription
pointsGEOMETRYPoints to receive the attributes.
layers (optional)COPIMAGEOptional image whose layers drive the properties. Required when any layer name field is filled in.

Outputs

OutputTypeDescription
pointsGEOMETRYThe points with spritescale, spriterot, Cd, blend and stamp set and P jittered.

Parameters

ParameterTypeDefaultDescription
Seed rand_seedint [0..]0Seed for the random jitter, scale, stretch and angle variation.
Plane planemenuXZ PlanePlane in which the layers are projected onto the points: xz (top view), xy or zy. It also decides which two axes Jitter moves. Options: XZ Plane (xz), XY Plane (xy), ZY Plane (zy).
World Size world_sizefloat [1e-06..]1World width covered by the image width when sampling layers (origin at the centre).

Jitter

ParameterTypeDefaultDescription
Jitter jitterfloat [0..]0Random displacement of P in the two plane axes, in world units. Each point gets a random value in -1..1 multiplied by this.
Jitter Scale jitter_scalestring1 1Per-axis multiplier (X Y) of the random jitter.
Jitter Layer jitter_layerstring(empty)Optional layer (first two channels) added to the displacement, in world units.
Jitter Layer Mask jitter_maskfloat1Amount of Jitter Layer that is added. Disabled when jitter_layer = "".

Scale

ParameterTypeDefaultDescription
Scale scalefloat [0..]1Uniform sprite scale.
Scale Mode scale_modemenuUniformuniform: the same scale for all points. percent_variance: scale varies by +-Scale Variance (as a fraction). min_max: scale is multiplied by a random value between Scale Min and Scale Max. Options: Uniform (uniform), Percent Variance (percent_variance), Min/Max (min_max).
Scale Variance scale_variancefloat [0..1000.0]0Variation of scale in percent_variance mode; 0.2 means up to +-20%. Hidden when scale_mode ≠ percent_variance.
Min Value scale_minfloat0.5Lower bound of the random multiplier in min_max mode. Hidden when scale_mode ≠ min_max.
Max Value scale_maxfloat1Upper bound of the random multiplier in min_max mode. Hidden when scale_mode ≠ min_max.
Scale Layer scale_layerstring(empty)Optional layer that modulates the scale at each point.
Scale Layer Mask scale_maskfloat1Strength of the layer modulation. 0 ignores the layer, 1 multiplies the full layer value. Disabled when scale_layer = "".

Stretch

ParameterTypeDefaultDescription
Stretch stretchstring1 1Non-uniform scale (X Y) applied on top of Scale.
Stretch Mode stretch_modemenuUniformuniform: no randomness. variance: each axis varies by +-Stretch Variance. min_max: each axis is multiplied by a random value between Stretch Min and Stretch Max. Options: Uniform (uniform), Variance (variance), Min/Max (min_max).
Stretch Variance stretch_variancefloat [0..1000.0]0Variation of each stretch axis in variance mode. Hidden when stretch_mode ≠ variance.
Min Value stretch_minfloat0.5Lower bound of the random multiplier in min_max mode. Hidden when stretch_mode ≠ min_max.
Max Value stretch_maxfloat1Upper bound of the random multiplier in min_max mode. Hidden when stretch_mode ≠ min_max.
Stretch Layer stretch_layerstring(empty)Optional layer that modulates the stretch. A single-channel layer is used for both axes.
Stretch Layer Mask stretch_maskfloat1Strength of the layer modulation. Disabled when stretch_layer = "".

Angle

ParameterTypeDefaultDescription
Angle anglefloat0Base rotation in degrees.
Angle Mode angle_modemenuUniformuniform: no randomness. variance: adds a random value of up to +-Angle Variance degrees. min_max: multiplies the angle by a random value between Angle Min and Angle Max. Options: Uniform (uniform), Variance (variance), Min/Max (min_max).
Angle Variance angle_variancefloat [0..]0Range of the random rotation in degrees in variance mode. Hidden when angle_mode ≠ variance.
Min Value angle_minfloat0Lower bound of the random multiplier in min_max mode. Hidden when angle_mode ≠ min_max.
Max Value angle_maxfloat1Upper bound of the random multiplier in min_max mode. Hidden when angle_mode ≠ min_max.
Round To round_tofloat [0..360]0Rounds the final angle to a multiple of this value in degrees. 0 means no rounding.
Angle Layer angle_layerstring(empty)Optional layer that adds to the angle: 0 gives 0 degrees, 1 gives 360 degrees.
Angle Layer Mask angle_maskfloat1Strength of the angle layer. Disabled when angle_layer = "".
Direction Layer direction_layerstring(empty)Optional two-channel vector layer; the angle of the vector (atan2 of y and x) is added to the rotation.
Direction Layer Mask direction_maskfloat1Strength of the direction contribution. Disabled when direction_layer = "".

Color and Blending

ParameterTypeDefaultDescription
Sort Layer sort_layerstring(empty)Layer whose value is added to the coordinate perpendicular to the plane, a small offset that controls draw order. Used when Use Sort Layer is on. Disabled when use_sort_layer is off.
Use Sort Layer use_sort_layertoggleoffEnables the Sort Layer offset.
Color colorstring1 1 1Base colour written to Cd.
Stamp Color color_modemenuUniformuniform: the same colour for all points. variance: random variation in hue, saturation and value. Options: Uniform (uniform), Variance (variance).
Color Seed color_seedint [0..]0Seed for the colour and alpha variation. Disabled when color_mode = uniform alpha_mode = uniform.
Hue hue_variancefloat [0..1]0Random hue change (as a fraction of the colour wheel) in variance mode. Hidden when color_mode ≠ variance.
Saturation saturation_variancefloat [0..1]0Random saturation change in variance mode. Hidden when color_mode ≠ variance.
Value value_variancefloat [0..1]0Random value (brightness) change in variance mode. Hidden when color_mode ≠ variance.
Color Layer color_layerstring(empty)Optional colour layer that multiplies the base colour.
Color Layer Mask color_maskfloat1Strength of the colour layer. Disabled when color_layer = "".

Alpha

ParameterTypeDefaultDescription
Alpha alphafloat [0..1]1Base opacity written to blend.
Stamp Alpha alpha_modemenuUniformuniform: the same alpha for all points. variance: random variation. Options: Uniform (uniform), Variance (variance).
Alpha Variance alpha_variancefloat [0..1]0Random alpha change in variance mode (result is clamped to 0..1). Hidden when alpha_mode ≠ variance.
Alpha Layer alpha_layerstring(empty)Optional layer that modulates the alpha.
Alpha Layer Mask alpha_maskfloat1Strength of the alpha layer. Disabled when alpha_layer = "".

Stamp Selection

ParameterTypeDefaultDescription
Stamp Count stamp_countint [1..]1Number of different stamps available for selection.
Mode select_modemenuCycleHow the stamp index is chosen: cycle (point number modulo count), random, or layer_select (from a layer value, 0 = first stamp, 1 = last). Options: Cycle (cycle), Random (random), Layer Select (layer_select).
Select Seed select_seedint [0..]0Seed of the random stamp choice. Hidden when select_mode ≠ random.
Select Layer select_layerstring(empty)Layer used by layer_select mode. Required for that mode. Hidden when select_mode ≠ layer_select.

Compared with Houdini

Random-from-ramp options for colour and alpha are not implemented. Scatter Shapes in this plugin is a rasterizing stamp and reads pscale and Cd, not spritescale, so the attributes written here are meant for Stamp Points style nodes.


COP Geometry to Layer (PCG)#

PCG_COPGeoToLayer · category PCG/cop · Houdini: Geometry to Layer (COP)

Converts volume primitives of a geometry into image layers by taking a slice, one voxel per pixel.

Equivalent of Geometry to Layer. Each requested volume becomes one layer named after its primitive (output<N> if it has no name). 3D volumes are sliced in the chosen plane at the given offset, with one voxel mapped to one pixel. Names with a wildcard such as vel.* collect the matching volumes, sorted by name, into one multi-channel layer named without the .*.

All outputs must have the same resolution, since layers in one image share a resolution. With optional on, a requested volume that cannot be found is filled with the default value using the resolution of the size_ref image instead of raising an error.

Inputs

InputTypeDescription
geoGEOMETRYGeometry containing the volume primitives to convert.
size_ref (optional)COPIMAGEImage whose resolution is used when an optional output is missing.

Outputs

OutputTypeDescription
copCOPIMAGEImage with one layer per converted output.

Parameters

ParameterTypeDefaultDescription
Slice slicemenuXY PlanePlane through the 3D volume: XY, YZ or ZX. Options: XY Plane (xy), YZ Plane (yz), ZX Plane (zx).
Slice Offset slice_offsetfloat0Position of the slice plane along its normal, in world coordinates.
Primitive Names outputsstring(empty)Space-separated list of what to convert: primitive names, volume indices, or wildcard names such as vel.* that are merged into one multi-channel layer. Empty converts every volume, one layer each.
Type out_typemenuAutoChannel layout of the layers: auto uses the number of matched volumes; id (1 channel, rounded to integers), mono (1), uv (2), rgb (3), rgba (4) truncate or pad with zeros. Options: Auto (auto), ID (id), Mono (mono), UV (uv), RGB (rgb), RGBA (rgba).
Optional optionaltoggleoffDo not error when a requested output is missing; fill it with the default value at the size of size_ref.
Default Value default_valuestring0Value used for missing optional outputs. Disabled when optional is off.

Compared with Houdini

VDB and camera primitives are not supported. The Slice Offset parameter is an extension; Houdini's node has no offset. Houdini outputs can have independent resolutions, while here all layers of one image share one.


COP HeightField to Mesh (PCG)#

PCG_COPHeightfieldToMesh · category PCG/cop · Houdini: Layer to Geometry (COP)

Converts a height layer into a Y-up grid mesh with one point per pixel center.

Each pixel center becomes a point; step thins the grid by taking every Nth pixel without resampling, so each point holds the exact pixel value. Mesh width is world_size and height is the layer value times strength.

v points toward -Z (north), so the height map reads correctly in a Houdini-style top view (X right, Z down). Points carry uv (pixel center, matching COP sampling) and height, so a later Scatter from Map or Attribute from Map lines up exactly with the terrain.

Point normals come from the height gradient (the same operator as COP Height to Normal), not from averaging mesh faces. Other layers can be carried over as point attributes.

Inputs

InputTypeDescription
copCOPIMAGEImage containing the height layer and any layers to carry over.

Outputs

OutputTypeDescription
geoGEOMETRYGrid mesh with P, N, uv and height.

Parameters

ParameterTypeDefaultDescription
Height Layer layerstringCHeight layer.
Height Scale strengthfloat [-10000.0..10000.0]1Height scale: layer value times Strength gives mesh height.
World Size world_sizefloat [1e-06..]1World-space width of the mesh.
Step stepint [1..1024]1Take every Nth pixel as a point, without resampling. At least 2 points per axis must remain.
Center at Origin centertoggleonPlace the mesh center at the origin.
Compute Normals normalstoggleonCompute point normals from the height gradient.
Layers to Attributes attribsstring(empty)Space-separated layers to bring in as point attributes. Use dst=src to rename, for example Cd=C erosion.

COP Integrate Volume (PCG)#

PCG_COPIntegrateVolume · category PCG/cop · Houdini: Integrate Volume (COP)

Casts one ray per pixel through a volume primitive and integrates, transmits, or takes the minimum or maximum of its samples.

For every pixel a view ray marches through the volume and produces one of:

  • Integral: the line integral of density times step length.
  • Transmittance: exp(-integral).
  • Minimum / Maximum: the smallest or largest raw sample value along the ray (not mapped through the density settings). A ray that never touches the volume gives +inf (minimum) or -inf (maximum).

By default the view is orthographic: the pixel centre in image coordinates (long side -1 to 1) gives the x, y of a ray that runs along +Z over the whole line, with no start cut-off. If the layers input is connected and View Origin or View Direction layer names are given, each pixel uses its own ray (starting at the origin, t >= 0); Min Depth and Max Depth layers restrict the ray to a distance range.

For Integral and Transmittance the sample is remapped as (v - Min) / (Max - Min), clamped to 0-1 (Clamped Ramp) or wrapped to its fractional part (Periodic Ramp), then multiplied by Density Scale. The ray is clipped to the volume's bounding box and cut into slices of Integration Step Size, one sample per slice; the last slice may be shorter and is weighted by its real length. Several volumes selected at once (such as vel.*) become channels, each accumulated separately.

Inputs

InputTypeDescription
geoGEOMETRYGeometry containing the volume primitive(s) to integrate.
layers (optional)COPIMAGEOptional image supplying per-pixel view origin, direction and depth-range layers. Without it the output uses Resolution and the default orthographic view.

Outputs

OutputTypeDescription
copCOPIMAGEImage with the result in the output layer, one channel per integrated volume. It is added to layers when connected, otherwise a new image of the given Resolution.

Parameters

ParameterTypeDefaultDescription
Volume densitystring(empty)Which volume to integrate: a volume name, an index, or a name pattern such as vel.* (several volumes make a multichannel result). Empty uses the first volume.
Operation operationmenuIntegralQuantity computed along each ray. Options: Integral (integral), Transmittance (transmittance), Minimum (minimum), Maximum (maximum).

Density

ParameterTypeDefaultDescription
Density Scale density_scalefloat [0..]1Multiplier applied to the remapped density (Integral and Transmittance only). Disabled when operation = minimum } { operation = maximum.
Min density_minfloat0Sample value that maps to 0 before scaling. Disabled when operation = minimum } { operation = maximum.
Max density_maxfloat1Sample value that maps to 1 before scaling. Must differ from Min. Disabled when operation = minimum } { operation = maximum.
Ramp Mode ramp_modemenuNo RampHow the remapped value is treated outside 0-1: left alone, clamped, or wrapped periodically. Only the clamp and wrap steps are implemented; there is no density ramp curve. Options: No Ramp (none), Clamped Ramp (clamped), Periodic Ramp (periodic). Disabled when operation = minimum } { operation = maximum.

Quality

ParameterTypeDefaultDescription
Sample Jitter Scale sample_jitterfloat [0..1]0Randomly shifts each sample inside its slice, as a fraction of the step, to hide banding. 0 samples at the slice centre.
Stratification Jitter Scale stratification_jitterfloat [0..1]0Randomly shifts the start of the whole ray by up to half a step (at 1), decorrelating neighbouring rays.
Seed rand_seedint [0..]0Seed for both jitters. Disabled when sample_jitter = 0 stratification_jitter = 0.
Integration Step Size step_sizefloat [1e-06..]0.01Length of each ray slice in volume space units. Smaller values are more accurate and slower.
Max Step Count max_stepsint [1..]4096Maximum number of slices per ray.
Transmittance Cutoff transmittance_cutofffloat [-1..1]-1Stop marching a ray once its transmittance drops below this value (all channels must). -1 never stops early. Disabled when operation = minimum } { operation = maximum.

Rays

ParameterTypeDefaultDescription
View Origin Layer origin_layerstring(empty)Layer in the layers input holding the ray origin per pixel. Empty uses the default orthographic view.
View Direction Layer direction_layerstring(empty)Layer in the layers input holding the ray direction per pixel (normalized by the node). Empty uses +Z.
Min Depth Layer mindepth_layerstring(empty)Layer in the layers input giving the ray distance at which integration starts.
Max Depth Layer maxdepth_layerstring(empty)Layer in the layers input giving the ray distance at which integration ends.
ParameterTypeDefaultDescription
Resolution resolution_x resolution_yint [1..16384]512, 512Output width and height in pixels. Used only when layers is not connected.
Output Layer out_layerstringresultName of the result layer.

Compared with Houdini

Houdini works on VDB volumes; this node works on the plugin's dense volume primitives. The Density Ramp curve is not implemented (the ramp modes only clamp or wrap).


COP Layer from Attribute (PCG)#

PCG_COPLayerFromAttrib · category PCG/cop · Houdini: Layer from Attribute (COP)

Writes a geometry attribute into an image, one element per pixel.

Element k of the chosen attribute is stored in pixel k. The order is set by Data Ordering, or, if the index input is connected, every pixel reads the element number found in the Index Layer. The output layer has as many channels as the attribute has components; a detail attribute counts as one element.

With Resize Layer off, the resolution comes from size_ref (or Resolution when it is not connected) and the layer is added to size_ref. With Resize Layer on, the resolution is derived from the element count using Resize Shape and the output contains only this layer.

If there are more pixels than elements the extra pixels are 0; extra elements are dropped. Index values outside the attribute range (including negative) give 0. The index image must have the same resolution as the output.

Inputs

InputTypeDescription
geoGEOMETRYGeometry that owns the attribute.
size_ref (optional)COPIMAGEOptional image that defines the output resolution; the result is added to it.
index (optional)COPIMAGEOptional image whose Index Layer gives, per pixel, which attribute element to read.

Outputs

OutputTypeDescription
copCOPIMAGEImage with the attribute stored in the output layer.

Parameters

ParameterTypeDefaultDescription
Class attrib_classmenuPointAttribute class to read from. Options: Point (point), Primitive (prim), Vertex (vertex), Detail (detail).
Attribute attribstringCdName of the attribute.
Data Ordering data_orderingmenuBottom LeftPixel order when no index is connected. Bottom Left fills from the bottom-left, left to right then upwards (the canonical COP order); Top Left starts at the top-left and goes downwards. Options: Bottom Left (bottom_left), Top Left (top_left).
Index Layer index_layerstring(empty)Layer of the index input to read element numbers from. Empty uses C.
Resize Layer resize_layertoggleoffDerive the resolution from the number of elements instead of using size_ref or Resolution.
Resize Shape resize_shapemenuPower of 2 SquareShape used with Resize Layer: a power-of-two square, the smallest square that fits, or a single row or column. Options: Power of 2 Square (pow2_square), Square (square), Single Row (single_row), Single Column (single_column). Disabled when resize_layer is off.
Resolution resolution_x resolution_yint [1..16384]512, 512Output width and height in pixels. Used only when size_ref is not connected and Resize Layer is off. Disabled when resize_layer is on.
Output Layer out_layerstringattribName of the layer that receives the data.

COP Layer To Points (PCG)#

PCG_COPLayerToPoints · category PCG/cop · Houdini: Layer to Points (COP)

Turns pixels of an image layer into points, sampling chosen layers as point attributes.

Each point also gets a uv attribute (its position on the image). Positions use the same plane + world mapping as HeightField to Mesh: the image width equals World Size, and Height Layer, if given, sets the coordinate on the axis perpendicular to the plane (Y for the XZ plane) to value times Height Scale. Layers listed in Layers to Attributes are sampled at each point's pixel and written as point attributes (C becomes Cd).

Methods:

  • One Point per Pixel: a point at every pixel centre, thinned by Stride and filtered by Mask Layer (pixels where the mask is greater than Threshold are kept).
  • Scatter by Density: Point Count random points, accepted in proportion to the Density Layer (uniform when empty). Positions are continuous inside the image, not only at pixel centres.
  • Houdini-style methods read the Mask Layer as their source layer (empty uses C; the first channel is the value, except Non-Zero Pixels, which looks at all channels): Non-Zero Pixels gives a point for every non-zero pixel; Count per Pixel gives floor(value) points per pixel; Unique Values gives one point per distinct value, placed on the first pixel (lowest buffer offset) that holds it, optionally ignoring -1; Count from First Pixel and Count from Last Pixel take the total number of points from the first or last pixel's value. Those points are all at the origin because they have no pixel position, but uv and attributes come from the source pixel.

Output points are ordered by buffer offset x + y*xres, with row 0 at the bottom.

Inputs

InputTypeDescription
copCOPIMAGEImage to read pixels from.

Outputs

OutputTypeDescription
geoGEOMETRYPoint geometry with uv and the requested attributes.

Parameters

ParameterTypeDefaultDescription
Method modemenuOne Point per PixelHow points are chosen; see the description. Options: One Point per Pixel (pixels), Scatter by Density (scatter), Non-Zero Pixels (nonzero), Count per Pixel (count_per_pixel), Unique Values (unique_values), Count from First Pixel (count_first), Count from Last Pixel (count_last).
Mask Layer mask_layerstring(empty)One Point per Pixel: layer used as a mask (empty keeps all pixels). Houdini-style methods: the source layer (empty uses C). Hidden when mode = scatter.
Threshold thresholdfloat0.5Pixels whose mask value is greater than this are kept (One Point per Pixel). Hidden when mode ≠ pixels. Disabled when mask_layer = "".
Stride strideint [1..4096]1Keep one pixel out of every Stride in each direction (One Point per Pixel). Hidden when mode ≠ pixels.
Jitter jitterfloat [0..1]0Randomly displaces points inside their pixel (or stride cell) by up to this fraction. Not applied to Scatter or to the Count from First/Last methods. Hidden when mode = scatter } { mode = count_first } { mode = count_last.
Point Count countint [0..]1000Number of points to scatter (Scatter by Density). A sparse density layer can yield fewer. Hidden when mode ≠ scatter.
Density Layer density_layerstring(empty)Layer giving the scatter density. Empty scatters uniformly. Hidden when mode ≠ scatter.
Ignore Minus One ignore_minus_onetoggleonUnique Values: do not create a point for the value -1. Hidden when mode ≠ unique_values.
Seed rand_seedint [0..]0Seed for jitter and scattering. Disabled when mode ≠ scatter jitter = 0 } { mode = count_first } { mode = count_last.
Set Positions set_positionstoggleonWhen off, all points are placed at the origin (Height Layer is not read), while uv and attributes are still written. Disabled when mode = count_first } { mode = count_last.
Plane planemenuXZ PlanePlane the image is laid on in 3D. Options: XZ Plane (xz), XY Plane (xy), ZY Plane (zy). Disabled when set_positions is off } { mode = count_first } { mode = count_last.
World Size world_sizefloat [1e-06..]1World width of the whole image. Disabled when set_positions is off } { mode = count_first } { mode = count_last.
Height Layer height_layerstring(empty)Layer used for the coordinate along the axis perpendicular to the plane. Empty leaves it at 0. Disabled when set_positions is off } { mode = count_first } { mode = count_last.
Height Scale height_scalefloat1Multiplier applied to Height Layer values. Disabled when height_layer = "" } { set_positions is off } { mode = count_first } { mode = count_last.
Layers to Attributes attribsstringCSpace-separated layers to sample into point attributes (C becomes Cd). Empty writes none.
Layer Attrib layer_attribstring(empty)Name of an integer point attribute that receives the source pixel's value. Empty does not write it.
Index Attrib index_attribstring(empty)Name of an integer point attribute that receives the source pixel offset x + y*xres. Empty does not write it.

Compared with Houdini

The first two methods (One Point per Pixel, Scatter by Density) are specific to this plugin; the other five follow Houdini's Method menu.


COP Planar Inflate (PCG)#

PCG_COPPlanarInflate · category PCG/cop · Houdini: Planar Inflate (COP)

Inflates a mask into a height layer, like a pillow or soap bubble.

Pixels of the mask above 0.5 are inflated, and the result is normalized so the highest point equals Height. It is a good starting point for relief, bevelled text and normal maps. An empty mask gives an error.

  • Round: a circular-arc profile h = sqrt(2Rd - d^2) / R, where d is the distance to the boundary and R the largest inner distance. Edges are vertical and the middle is a flat top, like a pillow.
  • Poisson (Soap Bubble): solves laplacian(h) = -1 with h = 0 on the boundary, using a coarse-to-fine Jacobi solver.

Inputs

InputTypeDescription
copCOPIMAGEImage containing the mask layer.

Outputs

OutputTypeDescription
copCOPIMAGEImage with the height layer added.

Parameters

ParameterTypeDefaultDescription
Mask Layer layerstringmaskMask layer. Pixels above 0.5 are inflated.
Profile modemenuRoundShape of the profile; see the description. Options: Round (round), Poisson (Soap Bubble) (poisson).
Height heightfloat1Height of the highest point.
Iterations iterationsint [1..]200Poisson mode: Jacobi iterations per resolution level. More gives a more converged result. Round mode ignores it. Hidden when mode = round.
Output Layer out_layerstringheightName of the height layer.

COP Point Generate (PCG)#

PCG_COPPointGenerate · category PCG/cop · Houdini: Point Generate (COP)

Adds new points to a point cloud, with the count taken from parameters or from a count attribute.

The number of new points comes from one of three sources:

  • Parameters: Number of Points + Points per Second * Time Step. Any fractional part is rounded up or down at random according to Seed. The two terms are added, which is this plugin's reading of Houdini's behaviour.
  • Point Attribute: each source point is copied floor(count) times (negative counts give none). Point attributes matching Copy Attributes are copied from the source point; all other attributes of the new points are 0.
  • Detail Attribute: an integer detail attribute gives the count (floored; the fractional part is not randomized).

The source is ref when connected, otherwise points. New points sit at the origin unless P is copied. If points has an id attribute, new points continue the numbering from the detail attribute nextid (updated afterwards) when present, otherwise from max(id) + 1, with a step of the detail attribute idstep or 1. With Append Points on, the output is the input points (primitives are discarded) plus the new points.

Inputs

InputTypeDescription
points (optional)GEOMETRYPoint cloud the new points are added to. Optional.
ref (optional)GEOMETRYOptional geometry that supplies the count attribute and the attributes to copy. When not connected, points is used.

Outputs

OutputTypeDescription
pointsGEOMETRYPoints, with the new points appended (or only the new points when Append Points is off).

Parameters

ParameterTypeDefaultDescription
Method methodmenuParametersWhere the point count comes from. Options: Parameters (parameters), Point Attribute (point_attribute), Detail Attribute (detail_attribute).
Number of Points number_of_pointsint [0..]10Parameters method: number of points to add. Hidden when method ≠ parameters.
Points per Second points_per_secondfloat [0..]0Parameters method: rate multiplied by Time Step and added to Number of Points. Hidden when method ≠ parameters.
Time Step time_stepfloat [0..]0.0416667Parameters method: time in seconds used with Points per Second. Houdini uses the simulation time step; there is no simulation here, so it is a parameter (default 1/24). Hidden when method ≠ parameters. Disabled when points_per_second = 0.
Seed rand_seedint [0..]0Seed for the random rounding of a fractional count. Hidden when method ≠ parameters.
Count Attribute count_attribstringcountName of the point or detail attribute that holds the count (Point Attribute and Detail Attribute methods). Hidden when method = parameters.
Copy Attributes copy_attribsstring*Point Attribute method: pattern of point attributes copied from the source points to their new copies. Hidden when method ≠ point_attribute.
Append Points append_pointstoggleonKeep the input points and append the new points. When off, only the new points are output (with the input's attribute definitions).

Compared with Houdini

Time Step is an explicit parameter because the plugin has no simulation time. Houdini's Layer to Points is a different node (see COP Layer To Points).


COP Points From Blobs (PCG)#

PCG_COPPointsFromBlobs · category PCG/cop · Houdini: Points from Blobs (COP)

Converts each connected blob of a mask layer into one point with area, radius and bounding-box attributes.

Thresholds the mask layer, labels its connected components and emits one point per blob at the blob's centroid. Each point carries area (pixels), world_area, radius (radius of the circle with the same area, usable directly as pscale), blob_id and the blob's bounding box. If a Value Layer is given, the mean of that layer inside the blob is written as an extra point attribute.

The second output is the number of blobs that survived the Min Area filter.

Inputs

InputTypeDescription
copCOPIMAGEImage containing the mask layer (and optionally the value layer).

Outputs

OutputTypeDescription
geoGEOMETRYPoint cloud with one point per blob.
countINTNumber of blobs (points).

Parameters

ParameterTypeDefaultDescription
Mask Layer layerstringmaskLayer used as the mask.
Threshold thresholdfloat0.5Pixels with a mask value above this are part of a blob.
Connectivity connectivitymenu8 (Include Diagonals)Whether diagonal neighbours connect pixels into the same blob (8) or only edge neighbours (4). Options: 8 (Include Diagonals) (8), 4 (Edges Only) (4).
Min Area min_areaint [1..]1Blobs smaller than this many pixels are discarded.
Value Layer value_layerstring(empty)Optional layer whose mean inside each blob is written to the point as an attribute. Empty disables it.
Plane planemenuXZ PlaneWorld plane the image is mapped onto when computing point positions. Options: XZ Plane (xz), XY Plane (xy), ZY Plane (zy).
World Size world_sizefloat [1e-06..]1World-space size of the image along its longer side; scales positions, world_area and radius.
Height Layer height_layerstring(empty)Optional layer sampled at each centroid to set the point's height on the axis perpendicular to the plane. Empty keeps the points flat.
Height Scale height_scalefloat1Multiplier applied to the sampled height. Disabled when height_layer = "".

Tips

  • Feed radius into a copy-to-points step as pscale to place a shape matching each blob's size.

COP Rasterize Curves (PCG)#

PCG_COPRasterizeCurves · category PCG/cop · Houdini: Layer from Curves (COP), Mask from Curves (COP), Rasterize Curves (COP)

Draws the primitives of a geometry as anti-aliased lines into an image layer.

Each primitive is drawn as a polyline with the given pixel width; the width can be multiplied per point by an attribute. With Fill enabled, closed curves are filled using the even-odd rule. A Rasterize Attribute is interpolated along the lines into an additional layer.

Inputs

InputTypeDescription
geoGEOMETRYGeometry whose primitives are drawn.
cop (optional)COPIMAGEOptional image providing the resolution.

Outputs

OutputTypeDescription
copCOPIMAGEImage with the curves layer.

Parameters

ParameterTypeDefaultDescription
Width (Pixels) widthfloat [0..4096]2Line width in pixels.
Width Attribute width_attribstring(empty)Point attribute (for example pscale or width) multiplied onto Width. Empty disables it.
Fill Closed Curves filltoggleoffFills closed curves with the even-odd rule. Open curves are never filled.
Rasterize Attribute attribstring(empty)Attribute interpolated along the lines into an extra layer named <Output Layer>_<attribute>.

Projection

ParameterTypeDefaultDescription
Plane planemenuXZ PlaneWorld plane the geometry is projected onto. Options: XZ Plane (xz), XY Plane (xy), ZY Plane (zy).
Mapping mappingmenuWorld Size (Centered)World Size maps a centred square of the given size; Fit scales the geometry bounds to the image. Options: World Size (Centered) (world), Fit to Bounds (fit).
World Size world_sizefloat [1e-06..]1World-space extent mapped onto the image. Hidden when mapping ≠ world.
ParameterTypeDefaultDescription
Output Layer out_layerstringcurvesName of the layer that receives the result.
Resolution resolution_x resolution_yint [1..16384]512, 512Image size, used only when no image is connected.

COP Rasterize Splats (PCG)#

PCG_COPRasterizeSplats · category PCG/cop · Houdini: Rasterize GSplats (COP)

Renders 3D Gaussian splat points orthographically onto a plane with front-to-back alpha compositing.

Reads P, scale, orient, Cd and opacity from the points (missing attributes fall back to defaults), projects the Gaussians orthographically onto the chosen plane and composites them front to back. The result is an RGB layer plus an alpha layer named <Output Layer>_alpha. The second output is the number of splats drawn.

There is no perspective camera and no spherical harmonics, so this is meant for baking top-down views and textures.

Inputs

InputTypeDescription
geoGEOMETRYPoints carrying the Gaussian splat attributes.
cop (optional)COPIMAGEOptional image providing the resolution.

Outputs

OutputTypeDescription
copCOPIMAGEImage with the colour layer and its alpha layer.
countINTNumber of splats rendered.

Parameters

Projection

ParameterTypeDefaultDescription
Plane planemenuXZ PlaneWorld plane the splats are projected onto. Options: XZ Plane (xz), XY Plane (xy), ZY Plane (zy).
Mapping mappingmenuWorld Size (Centered)World Size maps a centred square of the given size; Fit scales the geometry bounds to the image. Options: World Size (Centered) (world), Fit to Bounds (fit).
World Size world_sizefloat [1e-06..]1World-space extent mapped onto the image. Hidden when mapping ≠ world.
ParameterTypeDefaultDescription
Scale Multiplier scale_multfloat [0..]1Multiplier on all splat sizes.
Opacity Multiplier opacity_multfloat [0..]1Multiplier on all splat opacities.
Cutoff (σ) cutofffloat [0.5..10]3Number of standard deviations at which each Gaussian is truncated. Lower is faster, higher is smoother.
Background Color backgroundstring0 0 0Background colour as r g b.
Output Layer out_layerstringCName of the colour layer; the alpha goes to <Output Layer>_alpha.
Resolution resolution_x resolution_yint [1..16384]512, 512Image size, used only when no image is connected.

COP Scatter Shapes (PCG)#

PCG_COPScatterShapes · category PCG/cop · Houdini: Scatter Shapes (COP), Scatter on Curves (COP), Stamp Points (COP)

Stamps copies of a shape into an image, either randomly scattered or placed from input geometry.

COP Scatter Shapes (PCG): input and result

Without geometry, Count shapes are scattered at random; the Density Layer filters them by probability and Minimum Distance spaces them apart (as a fraction of the image width). With geometry connected, Spacing 0 puts one stamp on every point (pscale multiplies the size and Cd is used as the colour); Spacing above 0 takes evenly spaced points along the curves, and Align to Curve rotates each stamp along the tangent. Plane and Mapping control how geometry maps onto the image (XZ plus World Size matches HeightField to Mesh).

With Shape set to Stamp Input Layer, the Stamp Layer of the stamp input is used as the shape. Besides the main layer, <Output Layer>_id, <Output Layer>_color and <Output Layer>_rand are written. The second output is the number of stamps drawn.

Inputs

InputTypeDescription
cop (optional)COPIMAGEOptional image providing the resolution (and canvas).
stamp (optional)COPIMAGEOptional image supplying the stamp layer when Shape is Stamp Input Layer.
geo (optional)GEOMETRYOptional geometry (points or curves) that defines the stamp positions. Without it, positions are random.

Outputs

OutputTypeDescription
copCOPIMAGEImage with the scattered shapes layer and its id, colour and random helper layers.
countINTNumber of stamps drawn.

Parameters

ParameterTypeDefaultDescription
Shape shapemenuCircleShape to stamp. Options: Circle (circle), Box (box), Ring (ring), Star (star), Triangle (triangle), Diamond (diamond), Stamp Input Layer (layer).
Stamp Layer stamp_layerstringCLayer of the stamp input to use. A 4-channel layer uses alpha as the shape and RGB as colour. Hidden when shape ≠ layer.
Size sizefloat [0..10]0.05Shape diameter as a fraction of the image width.
Size Randomness size_randomfloat [0..1]0.5Random variation of the size, 0 to 1.
Aspect Ratio aspectfloat [0.01..100]1Width to height ratio of the shape.
Rotate rotationfloat [-3600..3600]0Rotation in degrees.
Rotate Randomness rotation_randomfloat [0..360]180Random rotation range in degrees.
Edge Softness (Pixels) softnessfloat [0.01..64]1Edge softness in pixels. Hidden when shape = layer.
Blend Mode blendmenuMaximumHow overlapping stamps combine: maximum, additive, or the newest drawn over the others. Options: Maximum (max), Add (add), Over (over).
Tileable (Wrap Edges) tiletoggleonWraps stamps across the image edges so the result tiles.
Seed rand_seedint [0..]0Seed for all randomness.

Random Scatter

ParameterTypeDefaultDescription
Count countint [0..]100Number of shapes scattered. Used only without geometry.
Density Layer density_layerstring(empty)Layer whose values act as the probability of keeping each scattered shape. Used only without geometry.
Minimum Distance min_distancefloat [0..1]0Minimum spacing between scattered shapes as a fraction of the image width. Used only without geometry.

Geometry

ParameterTypeDefaultDescription
Plane planemenuXZ PlaneWorld plane geometry is projected onto. Used only with geometry. Options: XZ Plane (xz), XY Plane (xy), ZY Plane (zy).
Mapping mappingmenuWorld Size (Centered)World Size maps a centred square of the given size; Fit scales the geometry bounds to the image. Options: World Size (Centered) (world), Fit to Bounds (fit).
World Size world_sizefloat [1e-06..]1World-space extent mapped onto the image. Hidden when mapping ≠ world.
Curve Spacing spacingfloat [0..1]00 puts one stamp on every point. Above 0, stamps are placed at equal distances along curves.
Align to Curve align_to_curvetoggleonRotates stamps to follow the curve tangent. Disabled when spacing = 0.
ParameterTypeDefaultDescription
Output Layer out_layerstringshapesName of the main layer. Helper layers _id, _color and _rand use it as a prefix.
Resolution resolution_x resolution_yint [1..16384]512, 512Image size, used only when no image is connected.

COP Triplanar (PCG)#

PCG_COPTriplanar · category PCG/cop · Houdini: Triplanar (COP), Triplanar Hex Tile (COP), Triplanar UV (COP)

Projects a texture along the three axes using per-pixel world position and normal, blending by normal direction.

Reads the world-space position P and world-space normal N per pixel (the layers produced by Render Pass). The texture is projected onto the YZ, XZ and XY planes using P x Scale as coordinates (always wrapping), and the three projections are blended with weights |N|^Sharpness, normalised to sum to 1. The texture period is 1 / Scale world units.

With Hex on, every projection uses hex-tiling: three overlapping hex cells are blended, each with a random offset and a random rotation, which hides visible repetition. If UV Layer is set, an extra layer is written with the projected UVs (0-1) of the dominant axis.

Inputs

InputTypeDescription
copCOPIMAGEImage containing the position and normal layers (and the texture layer if no source is connected).
source (optional)COPIMAGEOptional texture to project. Without it the texture is taken from the Layer of the main input.

Outputs

OutputTypeDescription
copCOPIMAGEThe input image plus the projected texture layer (and the UV layer if requested).

Parameters

ParameterTypeDefaultDescription
Position Layer p_layerstringPLayer with the world-space position per pixel (the position channel of Render Pass).
Normal Layer n_layerstringNLayer with the world-space normal per pixel (use the world option in Render Pass).
Texture Layer layerstringCTexture layer to project. Taken from the source input if connected, otherwise from the main input.
Scale scalefloat [1e-06..]1Multiplier on the position used as projection coordinates. Larger values make the texture repeat more often.
Blend Sharpness sharpnessfloat [0..64]4Exponent applied to the absolute normal components for blending. Higher values give narrower blend zones between the projections.

Hex Tiling

ParameterTypeDefaultDescription
Hex Tiling hextoggleoffUse hex-tiling in each projection to break up repetition.
Max Rotation hex_rotationfloat [0..180]180Maximum random rotation in degrees (plus or minus) applied to each hex cell. Only used with Hex.
Seed rand_seedint [0..]0Seed for the random offsets and rotations of the hex cells.
ParameterTypeDefaultDescription
Output Layer out_layerstringtriplanarLayer that receives the blended result.
UV Output Layer uv_layerstring(empty)If not empty, also writes the projected UVs of the dominant axis to this layer.

COP UV Shape (PCG)#

PCG_COPUVShape · category PCG/cop · Houdini: UV Shape (COP)

Generates interior UV coordinates, UV stretch and a mask for a disk or annulus shape.

Outputs where each pixel lies in the shape's own parametric coordinate system, so that a square image can be mapped into the shape with UV Sample. This is not the same as COP Shape, which outputs a signed distance field.

Coordinates are centred and normalised by the short side of the image (short side from -0.5 to 0.5), as in COP Shape. Three layers are written (empty name = not written):

  • uv: two channels with the interior coordinates, by default in the range -1 to 1 as in Houdini.
  • uvscale: how fast the UV changes per pixel (largest singular value of the Jacobian, measured in -1 to 1 units and clamped to UV Filter Bound); use it to pick a filter width in UV Sample.
  • mask: 1 inside the shape and 0 outside, decided at the pixel centre without anti-aliasing.

The shape's UVs are first computed, then sheared (u += Shear x v), rotated by Angle, offset, and finally multiplied by the U and V scales. Border modes then fold values outside -1 to 1.

Disk modes: Linear (radial stretch to a square, most distortion on the diagonals), Polar (U = angle/pi, V = 2r - 1), Equal Area (area preserving concentric mapping), Squircle (little distortion near the axes), Elliptic Arc. Annulus modes: Polar (V linear in radius) and Log (V proportional to ln of the radius, which keeps cells conformal so they do not flatten towards the outside).

Inputs

InputTypeDescription
cop (optional)COPIMAGEOptional image. Only provides the resolution; without it the given resolution is used.

Outputs

OutputTypeDescription
copCOPIMAGEThe input image plus the uv, uvscale and mask layers.

Parameters

ParameterTypeDefaultDescription
Shapes shapemenuDiskDisk or annulus (ring). Options: Disk (disk), Annulus (annulus).
Mode disk_modemenuLinearMapping from disk to UV square: Linear stretches radially, Polar uses angle and radius as U and V, Equal Area preserves area, Squircle keeps the axes almost undistorted, Elliptic Arc maps a square grid to elliptic arcs. Options: Linear (linear), Polar (polar), Equal Area (equal_area), Squircle (squircle), Elliptic Arc (elliptic_arc). Hidden when shape ≠ disk.
Radius radiusfloat [1e-06..10000.0]0.4Radius of the disk, in short-side-normalised units (0.5 touches the short edges). Hidden when shape ≠ disk.
Mode annulus_modemenuPolarPolar maps V linearly between the inner and outer radius; Log maps V logarithmically so UV cells keep their shape at every radius. Options: Polar (polar), Log (log). Hidden when shape ≠ annulus.
Inner Radius inner_radiusfloat [1e-06..10000.0]0.2Inner radius of the annulus. Must be greater than 0 and less than the outer radius. Hidden when shape ≠ annulus.
Outer Radius outer_radiusfloat [1e-06..10000.0]0.45Outer radius of the annulus. Hidden when shape ≠ annulus.

Transform

ParameterTypeDefaultDescription
Offset offsetstring0 0Offset (U and V) added to the UVs after shear and rotation.
Angle anglefloat [-3600..3600]0Rotation of the UVs in degrees, around the UV origin.
Shear shearfloat [-10000.0..10000.0]0Shear amount: u += Shear x v, applied before the rotation.

UV

ParameterTypeDefaultDescription
UV Filter Bound uv_filter_boundfloat [0.0..]4Upper limit for the values written to the uvscale layer. Disabled when uvscale_layer = "".
U Border u_bordermenuClampHow U values outside -1 to 1 are handled: Clamp, Mirror, Wrap (period 2), or Extend (left as they are). Options: Clamp (clamp), Mirror (mirror), Wrap (wrap), Extend (extend).
V Border v_bordermenuClampHow V values outside -1 to 1 are handled: Clamp, Mirror, Wrap (period 2), or Extend (left as they are). Options: Clamp (clamp), Mirror (mirror), Wrap (wrap), Extend (extend).
U Scale u_scalefloat [-10000.0..10000.0]1Multiplier on U, applied after the transform and before the border.
V Scale v_scalefloat [-10000.0..10000.0]1Multiplier on V, applied after the transform and before the border.
UV Range uv_rangemenu−1 to 1 (Houdini)Range of the uv output: -1 to 1 as in Houdini, or 0 to 1, which is what this plugin's UV Sample expects. Options: −1 to 1 (Houdini) (signed), 0 to 1 (for UV Sample) (unit).
ParameterTypeDefaultDescription
UV Layer uv_layerstringuvLayer for the UVs. Empty writes nothing.
UV Scale Layer uvscale_layerstringuvscaleLayer for the UV stretch measure. Empty writes nothing.
Mask Layer mask_layerstringmaskLayer for the inside mask (1 inside, 0 outside). Empty writes nothing.
Resolution resolution_x resolution_yint [1..16384]512, 512Output resolution (width, height) used when nothing is connected. With an input, its resolution is used.

Compared with Houdini

Only Disk (Linear, Polar, Equal Area, Squircle, Elliptic Arc) and Annulus (Polar, Log) are implemented. Disk Conformal, Square, Horseshoe, Spiral and Fishscale are not. The transform is applied before the U/V scale; Houdini does not state the order.


Render Pass (PCG)#

PCG_RenderPass · category PCG/cop · Houdini: Rasterize Geometry (COP)

Rasterizes geometry through a camera into COP layers: depth, mask, normals and more.

Renders geometry into raw (unclamped) data layers, which are the exact conditions a ControlNet needs, computed analytically instead of guessed. Packing into 0-1 is the job of Control Image, as that step is tied to the ControlNet conventions.

Layers written, depending on the pass toggles:

  • mask: 1 where geometry was hit.
  • depth: camera-space distance (scene units).
  • N: unit normal, signed. In Camera space the third axis is -forward (+Z points to the viewer), so a face looking at the camera is (0, 0, 1), the classic light blue after packing.
  • P: world-space position.
  • uv: interpolated UV (from the vertex or point attribute).
  • id: integer ID from a primitive attribute (string attributes are numbered in order of appearance); background is -1.
  • facing: how much a surface faces the camera, |N . forward|.
  • C: simple headlight shading for a quick look at the shape (not a final render).

Rasterization (scan conversion with a z-buffer) is O(covered pixels), much cheaper than ray casting, which matters for per-frame rendering. Triangles crossing the near plane are clipped. With Far > 0, triangles lying completely beyond it are dropped.

With camera mode Frame Geometry the distance or orthographic size is set automatically from the bounding sphere, so the object fills the image. If a camera is connected, all camera parameters on the node are ignored so that the render and later back-projection are guaranteed to use the same camera.

Inputs

InputTypeDescription
geoGEOMETRYGeometry to render.
cam (optional)PCGCAMOptional camera. When connected, it overrides every camera setting on this node.

Outputs

OutputTypeDescription
copCOPIMAGEImage with the selected pass layers.
camPCGCAMThe camera that was used (the connected one, or the one built from this node's settings).

Parameters

ParameterTypeDefaultDescription
Group groupstring(empty)Group pattern selecting the primitives to render. Empty renders all.
Resolution resolution_x resolution_yint [8..16384]512, 512Output resolution (width, height).
Device devicemenuNumPyBackend that holds the output image; Exact is float64 NumPy. Options: NumPy (numpy), Auto (auto), CPU (cpu), CUDA (cuda), Exact (float64) (exact).

Camera

ParameterTypeDefaultDescription
Camera Mode cameramenuFrame GeometryFrame Geometry places the camera automatically to fit the bounding sphere (with Azim, Elev and Margin); Orbit uses elevation, azimuth and distance around the target; Look At uses the eye and target positions. Options: Frame Geometry (frame), Orbit (orbit), Look At (look_at).
Projection projectionmenuPerspectivePerspective or orthographic projection. Options: Perspective (perspective), Orthographic (orthographic).
Field of View fovfloat [1.0..179.0]45Field of view in degrees for perspective projection. Hidden when projection = orthographic.
Ortho Width ortho_sizefloat [0.0001..]2Size of the view in scene units for orthographic projection (not used in Frame Geometry mode). Hidden when projection = perspective } { camera = frame.
Elevation elevfloat [-89.9..89.9]25Camera elevation above the horizon in degrees (Frame Geometry and Orbit). Hidden when camera = look_at.
Azimuth azimfloat [-3600.0..3600.0]35Camera azimuth around the target in degrees (Frame Geometry and Orbit). Hidden when camera = look_at.
Distance distancefloat [0.0001..]5Camera distance from the target (Orbit). Hidden when camera ≠ orbit.
Frame Margin marginfloat [0.5..10.0]1.15Frame Geometry: framing margin. 1 makes the bounding sphere touch the image edge. Hidden when camera ≠ frame.
Target target_x target_y target_zfloat0, 0, 0Point the camera looks at (X, Y, Z). Used by Orbit and Look At. Hidden when camera = frame.
Eye eye_x eye_y eye_zfloat0, 0, 5Camera position (X, Y, Z). Used by Look At. Hidden when camera ≠ look_at.
Near Clip nearfloat [1e-06..]0.01Near clipping distance.
Far Clip farfloat [0.0..]0Far distance; triangles entirely beyond it are dropped. 0 disables far culling.

Passes

ParameterTypeDefaultDescription
Depth pass_depthtoggleonWrite the depth layer. If no pass is enabled, only the mask is rendered.
Mask pass_masktoggleonWrite the mask layer.
Normal pass_normaltoggleonWrite the N layer.
Shaded Preview pass_shadetoggleoffWrite the C layer with simple shading.

Passes › More Passes

ParameterTypeDefaultDescription
Position (P) pass_positiontoggleoffWrite the world-space position P.
UV pass_uvtoggleoffWrite the uv layer from the UV attribute. The geometry needs that attribute (for example from UV Project).
Piece ID pass_idtoggleoffWrite the id layer from a primitive attribute. Fracture, cluster and connectivity nodes write suitable attributes.
Facing Ratio pass_facingtoggleoffWrite the facing layer.

Attributes

ParameterTypeDefaultDescription
Normal Space normal_spacemenuCameraCamera: normals in camera space (what ControlNet expects). World: world-space normals (for example for Triplanar). Options: Camera (camera), World (world). Hidden when pass_normal is off pass_shade is off.
Normal Source normal_sourcemenuAuto (Point N or Face)Auto uses the point N attribute if present and the face normal otherwise; Point interpolates point normals (computed if missing); Face uses flat face normals. Options: Auto (Point N or Face) (auto), Point (point), Face (face). Hidden when pass_normal is off.
ID Attribute id_attributestringnamePrimitive attribute that provides the IDs for the id pass. Hidden when pass_id is off.
UV Attribute uv_attributestringuvVertex (or point) attribute used for the uv pass. Hidden when pass_uv is off.
Backface Culling cullmenuNoneDrop back-facing or front-facing triangles before rasterization, or none. Options: None (none), Back Faces (back), Front Faces (front).

Compared with Houdini

Corresponds to Rasterize Geometry.