Skip to content

Attribute Nodes

Attribute nodes read and write per-point data — both built-in point properties (Density, Position, Rotation, Scale, Color, Steepness, Seed) and arbitrary named metadata attributes. All nodes in this category use the green node color (#80B24D).


Attribute Noise

Category: Attributes
Description: Applies 3D noise to an attribute or density.
Seed-sensitive: Yes

Samples a procedural noise function at each point's world position and writes the result to a chosen attribute. Supports fractal layering (fBm) via octave stacking.

Ports

DirectionNameType
InputInPoint
OutputOutPoint

Settings

Target

FieldTypeDefaultDescription
targetSelectorPPGAttributeSelectorDensityAttribute to write the noise result to. Accepts built-in properties or a custom attribute name.

Noise Parameters

FieldTypeDefaultDescription
noiseTypePPGNoiseTypeSimplexNoise algorithm. Options: Simplex, Perlin, VoronoiF1, VoronoiF2, VoronoiEdge.
frequencyfloat1.0Spatial frequency of the noise field.
amplitudefloat1.0Multiplier applied to the final noise value.
offsetfloat0.0Constant bias added to the noise result after amplitude scaling.
noiseOffsetVector3(0, 0, 0)World-space translation applied to the sampling position before lookup.
absoluteboolfalseIf enabled, takes the absolute value of the noise result (abs(n)).

Fractal (fBm)

FieldTypeRangeDefaultDescription
octavesint1 – 81Number of noise layers. 1 = no fractal; higher values add fine detail.
lacunarityfloat2.0Frequency multiplier between successive octaves.
persistencefloat0 – 10.5Amplitude multiplier between successive octaves. Values below 1 reduce contribution of higher octaves.

Voronoi

FieldTypeRangeDefaultDescription
jitterfloat0 – 11.0Cell randomness. 0 produces a regular grid; 1 fully randomises cell positions. Only affects Voronoi noise types.

Provided Attributes

When targetSelector points to a custom attribute, the node declares it as a Float attribute via IPPGAttributeProvider.

Tips

  • The node is executed using the Unity Job System (IPPGJobElement). Up to 64 points are scheduled per batch for efficient parallel processing.
  • When writing to the built-in Density property, the job writes directly into PPGPoint.density on the worker thread. For custom attributes the value is written on the main thread after job completion.
  • Combining Simplex noise with octaves = 4, lacunarity = 2, and persistence = 0.5 produces classic fBm terrain-style variation.

Attribute Remap

Category: Attributes
Description: Remaps an attribute value from one numeric range to another.

Reads a float value from sourceSelector, linearly remaps it from [inRangeMin, inRangeMax] to [outRangeMin, outRangeMax], and writes the result to targetSelector. The source and target can be the same attribute for in-place remapping.

Ports

DirectionNameType
InputInPoint
OutputOutPoint

Settings

Source

FieldTypeDefaultDescription
sourceSelectorPPGAttributeSelectorDensityAttribute to read the source value from.

Target

FieldTypeDefaultDescription
targetSelectorPPGAttributeSelectorDensityAttribute to write the remapped result to (Write mode selector).

Input Range

FieldTypeDefaultDescription
inRangeMinfloat0.0Minimum of the expected input range.
inRangeMaxfloat1.0Maximum of the expected input range.

Output Range

FieldTypeDefaultDescription
outRangeMinfloat0.0Minimum of the target output range.
outRangeMaxfloat1.0Maximum of the target output range.
clampbooltrueWhen enabled, clamps the result to [min(outRangeMin, outRangeMax), max(outRangeMin, outRangeMax)]. Handles inverted ranges correctly.

Provided / Consumed Attributes

  • Provides: If targetSelector is a custom attribute, declares it as Float (IPPGAttributeProvider).
  • Consumes: If sourceSelector is a custom attribute, declares it as consumed (IPPGAttributeConsumer).

Tips

  • Setting outRangeMin > outRangeMax inverts the value. The clamp step handles the reversed bounds automatically.
  • Source and target selectors may reference the same attribute for an in-place remap.
  • If inRangeMin == inRangeMax the node outputs 0 to avoid a division-by-zero.

Attribute to Color

Category: Attributes
Description: Maps an attribute value to the point's vertex color.

Reads a float value from sourceSelector (clamped to [0, 1]) and writes it to the point's color field. Useful for driving vertex colors on GPU instanced meshes or for passing data to MaterialPropertyBlock overrides via instancer nodes.

Ports

DirectionNameType
InputInPoint
OutputOutPoint

Settings

Source

FieldTypeDefaultDescription
sourceSelectorPPGAttributeSelectorDensityAttribute supplying the [0, 1] driving value.

Color Mapping

FieldTypeDefaultDescription
targetColorTargetRGBAWhich channel(s) to write. See table below.
colorAtZeroColorColor.blackFull RGBA color written when the attribute equals 0. Used only in RGBA mode.
colorAtOneColorColor.whiteFull RGBA color written when the attribute equals 1. Used only in RGBA mode.

ColorTarget enum

ValueBehaviour
RGBALerps from colorAtZero to colorAtOne and writes all four channels.
RWrites the attribute value directly to the R channel only.
GWrites to the G channel only.
BWrites to the B channel only.
AWrites to the A channel only.

Consumed Attributes

If sourceSelector is a custom attribute, declares it as consumed (IPPGAttributeConsumer).

Tips

  • In single-channel modes (R/G/B/A) the colorAtZero and colorAtOne fields are ignored; the raw attribute value is written as-is.
  • The color is clamped to [0, 1] via math.saturate before any mapping.
  • Point colors can be picked up by the Prefab Instancer or Weighted Instancer nodes through PPGMaterialPropertyMapping to drive shader parameters per instance.

Attribute to Transform

Category: Attributes
Description: Maps an attribute value to position offset, rotation, or scale.

Reads a float value from sourceSelector (clamped to [0, 1]) and linearly interpolates transform components between an "at zero" and "at one" value, multiplying the result into each point's transform matrix.

Ports

DirectionNameType
InputInPoint
OutputOutPoint

Settings

Source

FieldTypeDefaultDescription
sourceSelectorPPGAttributeSelectorDensityAttribute that drives the interpolation t.

Position Offset

FieldTypeDefaultDescription
applyPositionboolfalseEnable position offset driven by the attribute.
positionAtZeroVector3(0, 0, 0)Local position offset when the attribute equals 0.
positionAtOneVector3(0, 0, 0)Local position offset when the attribute equals 1.

Rotation

FieldTypeDefaultDescription
applyRotationboolfalseEnable rotation driven by the attribute.
rotationAtZeroVector3(0, 0, 0)Euler rotation in degrees applied when the attribute equals 0.
rotationAtOneVector3(0, 0, 0)Euler rotation in degrees applied when the attribute equals 1.

Scale

FieldTypeDefaultDescription
applyScaleboolfalseEnable scale driven by the attribute.
scaleAtZeroVector3(1, 1, 1)Scale multiplier applied when the attribute equals 0.
scaleAtOneVector3(1, 1, 1)Scale multiplier applied when the attribute equals 1.

Consumed Attributes

If sourceSelector is a custom attribute, declares it as consumed (IPPGAttributeConsumer).

Tips

  • Transforms are applied in the order: position → rotation → scale, each multiplied into the point's existing float4x4 transform matrix using math.mul.
  • Rotation is converted from Euler degrees (ZXY order) to a quaternion internally.
  • Only the enabled channels are processed; disabling all three makes the node a passthrough.
  • Useful for attribute-driven height offsets, random lean angles, or density-scaled vegetation.

Create Attribute

Category: Attributes
Description: Creates a named metadata attribute on points and populates it with a constant, a random value, or the value of another attribute.

Ports

DirectionNameType
InputInPoint
OutputOutPoint

Settings

Attribute

FieldTypeDefaultDescription
attributeNamestring"MyAttribute"Name of the attribute to create. Must not be empty. Built-in property names (e.g. "Density") are also accepted and write directly to the corresponding PPGPoint field.
attributeTypePPGAttributeTypeFloatData type for the new attribute. See type table below.
sourceSourceModeConstantHow the value is determined: Constant, FromAttribute, or Random.

Supported Attribute Types

PPGAttributeTypeC# type / components
Floatfloat
Intint
Boolbool
Float2float2 (2 components)
Float3float3 (3 components)
Float4float4 (4 components)
Quaternionquaternion (defaults to identity)
Stringstring

Source: FromAttribute

FieldTypeDefaultDescription
sourceSelectorPPGAttributeSelectorDensityAttribute to copy the value from. Only the scalar (float) component is read; multi-component types use the first component.

Default Values (used when Source = Constant)

FieldTypeDefaultUsed for type
defaultFloatfloat0Float
defaultIntint0Int
defaultBoolboolfalseBool
defaultFloat2Vector2(0,0)Float2
defaultFloat3Vector3(0,0,0)Float3
defaultFloat4Vector4(0,0,0,0)Float4
defaultStringstring""String

Quaternion type always defaults to quaternion.identity regardless of the default value fields.

Provided / Consumed Attributes

  • Provides: The new attribute (with its declared type) if the name does not match any built-in property (IPPGAttributeProvider).
  • Consumes: If source = FromAttribute and sourceSelector is a custom attribute (IPPGAttributeConsumer).

SourceMode enum

ValueBehaviour
ConstantWrites the corresponding defaultXxx field value to every point.
FromAttributeReads a float from sourceSelector and writes it to the new attribute.
RandomGenerates a deterministic random value per point using WangHash(point.seed) ^ WangHash(contextSeed + pointIndex).

Tips

  • If attributeName matches a built-in property (e.g. "Position", "Rotation", "Color") the value is written directly to the PPGPoint struct fields instead of the metadata store.
  • Rotation writes via Euler angles (3 components). The Float3 default value fields are used for built-in Rotation.
  • Random mode is seed-stable: the same seed + point layout always produces the same values.

Math Operation

Category: Attributes
Description: Applies a single math function to an attribute value, optionally using a constant operand, and writes the result to an output attribute.

Ports

DirectionNameType
InputInPoint
OutputOutPoint

Settings

Input / Output

FieldTypeDefaultDescription
inputSelectorPPGAttributeSelectorDensityAttribute to read the input value from.
outputSelectorPPGAttributeSelectorDensityAttribute to write the result to (Write mode selector).

Operation

FieldTypeDefaultDescription
operationMathOpMultiplyThe mathematical function to apply. See operation table below.
operandfloat1.0Right-hand operand for binary operations. Ignored by unary operations.

Available Operations

OperationFormula / DescriptionUses Operand
Addvalue + operandYes
Subtractvalue - operandYes
Multiplyvalue * operandYes
Dividevalue / operand (returns 0 when operand is 0)Yes
Powerpow(value, operand)Yes
Minmin(value, operand)Yes
Maxmax(value, operand)Yes
Absabs(value)No
Floorfloor(value)No
Ceilceil(value)No
Roundround(value)No
OneMinus1 - valueNo
Sqrtsqrt(abs(value))No
Modulovalue % operand (returns 0 when operand is 0)Yes
FracFractional part of valueNo
Sign-1, 0, or 1 depending on sign of valueNo
Lerplerp(0, operand, value)Yes
InverseLerpsaturate(value / operand) (returns 0 when operand is 0)Yes
Smoothstepsmoothstep(0, operand, value)Yes
Remap01saturate(value / operand) (same as InverseLerp)Yes
LengthVector magnitude of multi-component attribute; abs(value) for scalarNo
LengthSqSquared vector magnitude; value * value for scalarNo
Negate-valueNo
Saturateclamp(value, 0, 1)No
LogNatural log (clamped to EPSILON)No
Log2Base-2 log (clamped to EPSILON)No
Log10Base-10 log (clamped to EPSILON)No
Expe^valueNo
Exp22^valueNo

Provided / Consumed Attributes

  • Provides: If outputSelector is a custom attribute, declares it as Float (IPPGAttributeProvider).
  • Consumes: If inputSelector is a custom attribute, declares it as consumed (IPPGAttributeConsumer).

Tips

  • Length and LengthSq automatically read the full vector when inputSelector targets a multi-component attribute (Float2/Float3/Float4) without a component sub-index.
  • The output selector may be the same as the input selector for in-place modification.
  • Divide and Modulo silently return 0 instead of throwing on division by zero.

Procedural Placement Graph for Unity