Articles

Houdini Stamp SOP: Creating Variation in Instanced Geometry

Includes one exclusive complete course

The exclusive course — a full production tutorial you won't find anywhere else, never sold alone.

Best Seller
Most Loved
Tutorial Camera Rig

ADVANCED CUSTOM CAMERA RIG

ANIMATION · CONSTRAINTS · CUSTOM UI

BUILD A FULLY CUSTOM CONSTRAINT-BASED CAMERA RIG IN HOUDINI WITH A CUSTOM UI PANEL. DESIGN FLEXIBLE SYSTEMS FOR PRECISE, CINEMATIC CAMERA ANIMATION ON ANY PROJECT.

€29.99

Freebies
Free Studio HDRI Pack box by Artivoxa showing 60 studio lighting setups with softboxes wrapped around the packaging

Studio HDRI Collection

ASSETS · EXR & HDR · 60 HDRIS

DOWNLOAD 60 STUDIO HDRIS CAPTURED IN A REAL PHOTO STUDIO. LIGHT YOUR PRODUCT AND BEAUTY RENDERS LIKE A PHOTOGRAPHER — SOFTBOX, LANTERN, STRIP AND GRID SETUPS, READY FOR ANY RENDERER.

FREE

ARTILABZ™

Everything You Need to master Houdini.

ARTILABZ™ gives you unlimited access to all Houdini courses, 3D assets, simulation files, textures and tools. updated every month.

01

Premium Houdini Tutorials

Full access to every course — fluid simulation, procedural FX, brand visuals and more.

02

Monthly New Content

Fresh tutorials and assets added every month — your library grows with you.

03

Instant Access to Everything

The moment you join, the full library is yours — no drip-feed, no waiting.

04

Project Files Included

Every tutorial comes with the full Houdini scene file — open every node, learn every detail.

FROM 14.99€/MONTH

Houdini Stamp SOP: Creating Variation in Instanced Geometry

Houdini Stamp SOP: Creating Variation in Instanced Geometry

Are your Houdini instances all looking the same? Do you spend hours trying to randomize transforms and colors only to end up with predictable results? Working with instanced geometry can be frustrating when each copy feels machine-made.

The Stamp SOP can be a game changer for per-instance variation, but its node parameters and expression syntax often leave you scratching your head. Writing manual attribute wrangles or resorting to vex snippets adds complexity and slows your workflow.

In this guide, we’ll cut through the confusion and show how the Stamp SOP injects unique values into each copy effortlessly. You’ll learn to drive scale, rotation, and color attributes directly from the Stamp node without drowning in custom scripts.

By the end, you’ll understand how to set up your instancer for true randomness, tweak stamp expressions for precise control, and maintain clean, efficient networks. Let’s dive into creating rich, varied geometry with Houdini’s Stamp SOP.

What is the Stamp SOP and when should I use it for instanced geometry?

The Stamp SOP is a procedural node that iterates over each input primitive or point and evaluates parameter expressions per iteration. It injects custom values—via channel names and local variables—into downstream SOPs, effectively “stamping” unique attributes into each copy. This approach predates VEX-driven instancing but remains valuable for quick per-copy variation without writing code.

Under the hood, Stamp SOP builds a small loop, driving parameter overrides using the stamp(“op:/path”, “channel”, default) expression. You can define multiple channels—such as scale, rotation, or color index—and reference them in transforms or material assignments. Each stamped copy becomes distinct geometry, ready for export or further procedural treatment.

  • Randomizing scale, rotation and color in a Copy SOP network
  • Selecting different geometry sets or LODs per instance
  • Driving attribute values in downstream VOPs or attribute transfers
  • Creating patterned variations by linking stamp channels to noise or ramps

Use instanced geometry workflows when you need deterministic variation without writing VEX or Python. Stamp SOP shines in scenarios with moderate copy counts (hundreds to low thousands) where each copy must carry unique, baked-in attributes. For massive point clouds or GPU-based instancing, consider Attribute Wrangles or Copy to Points with packed primitives to optimize memory and performance.

How does the Stamp SOP apply values to instance attributes like pscale, orient, and Cd?

The Houdini Stamp SOP evaluates expressions per input primitive or point and writes results into local channels. When feeding a Copy to Points SOP, these channels map automatically to instancer attributes such as pscale, orient, or Cd. Stamp creates one channel per stamp name, promoting it from detail scope on each child geometry.

For pscale, you define a Stamp Name like “size” and an expression such as rand($PT)*0.5+0.1. Stamp stores this as a primitive attribute “size”. In the Copy SOP’s Scale parameter, reference it via $SIZE or use the Attribute Shuffle to rename “size” to “pscale”. This workflow avoids VEX coding and remains fully procedural.

To randomize orient, supply a quaternion or Euler angle vector in the Stamp Value field. For example, Stamp Name “rot” with expression fit01(rand($PR), -180,180) for each axis. Stamp writes it into “rot” channels and the Copy SOP can read it under Attribute->Rotation Order. You can also stamp separate X, Y, Z rotation channels and combine them in the instancer.

Color variation uses Cd. Stamp Name “Cd” takes a vector expression like lerp({1,0,0},{0,0,1},rand($PR)). The SOP writes three floats into Cd.r/g/b. When imported by the Copy SOP, these drive per-instance diffuse color in a packed primitive or USD instancer without touching COPs or shaders. Everything remains in the SOP network.

  • Create a Stamp SOP downstream of your template geometry.
  • Enter a Stamp Name for each attribute and a HScript or Python Stamp Value expression.
  • Connect Stamp output to a Copy to Points SOP and set Attribute parameters to match stamp channels.
  • Inspect instanced pscale, orient, and Cd in the Geometry Spreadsheet or downstream shaders.

How do I set up a basic Stamp SOP instancing network step-by-step?

Minimal node network and parameter wiring (points, Copy to Points, Stamp SOP, instance source)

Begin with a point generator (Grid or Scatter) to define instance positions. Connect your source geometry (Sphere, Box or custom model) to the second input of a Copy to Points node. Insert a Stamp SOP between the point generator and Copy to Points, wiring its output into the first input of Copy to Points. This ensures each point carries its own stamped parameter.

In the Stamp SOP’s Parameters, set “Stamp Input” to “Point Number” so $PT drives stamping. Under Attributes, add a new entry (e.g., scale) and define its Value. Then in Copy to Points > Transform tab, right-click Scale and choose “Fetch Input Attribute” or type @scale. That binds the stamped attribute to per-instance scale, completing the minimal instancing network.

Practical stamp expression examples (using $PT, stamp(), rand(), sprintf) and where to place them

  • Point index: Value = $PT or stamp(“../copy1”, “ptnum”, 0) to assign a unique index per point.
  • Random scale: Value = fit01(rand($PT*123.456), 0.5, 1.5) for consistent noise-based scaling across sessions.
  • File variant: Value = sprintf(“models/rock_%02d.bgeo.sc”, stamp(“../copy1”, “ptnum”, 0)) to load different assets per copy.
  • Color variation: Attribute Name = Cd, Value = set(rand($PT), rand($PT+1), rand($PT+2)) for per-instance color.

Enter these expressions in the Stamp SOP Attributes > Value fields. After stamping, ensure Copy to Points > Copy tab has “Pack And Instance” enabled to recognize per-point attributes like scale or Cd. This links your stamp expressions directly into the instancing workflow.

How can I create controlled variation (scale, rotation, color, UVs) using Stamp expressions?

To introduce precise randomness in instanced geometry, use the Stamp SOP or the Copy to Points’ Stamp Inputs. Define template variables (for example “min_scale”, “max_scale”, “rot_seed”, “col_variation”, “uv_offset”). Then reference them with Stamp expressions inside each copy’s parameter fields. This workflow gives you full procedural control over each instance’s attributes.

  • Scale: On your Copy node’s Uniform Scale field enter
    stamp(“../copy1″,”min_scale”,1)
    + rand($PT)* (stamp(“../copy1″,”max_scale”,1)-stamp(“../copy1″,”min_scale”,1))
    This picks a value between your defined min/max per point.
  • Rotation: In Rotate Z use
    radians(stamp(“../copy1″,”rot_seed”,1) + rand($PT+1)*360)
    Seed each copy with a template “rot_seed” for repeatable headings.
  • Color: Under Cd attribute create a Vector parameter slot, then set
    set(
    stamp(“../copy1″,”r”,1),
    stamp(“../copy1″,”g”,1),
    stamp(“../copy1″,”b”,1)
    )
    and control RGB ranges via your stamp templates.
  • UVs: Drive UV Scale and Offset:
    U Scale → stamp(“../copy1″,”uv_scale_u”,1)
    V Scale → stamp(“../copy1″,”uv_scale_v”,1)
    U Offset → rand($PT + stamp(“../copy1″,”uv_seed”,1))
    V Offset → rand($PT*2 + stamp(“../copy1″,”uv_seed”,1))

By combining template fields with rand() and stamp(), you can systematically dial in variation ranges. This preserves a procedural setup where you tweak only the Stamp SOP’s controls to globally adjust scale, rotation, color or UVs across all instances—ideal for versatilizing large scenes without breaking your node graph.

How do I combine Stamp with attribute transfers, VEX snippets, and Copy Stamping for more complex procedural variation?

To achieve layered control over your instanced geometry, integrate the Stamp SOP with attribute transfers, inline VEX snippets, and Copy Stamping. The Stamp SOP generates per‐copy custom attributes, attribute transfers bring in data from nearby surfaces or guide curves, VEX lets you procedurally tweak values at particle or point level, and Copy Stamping unifies all attributes at instancing time.

Typical workflow:

  • Generate points on a source mesh with Scatter or Point Generate.
  • Use Attribute Transfer to sample normals, curvature, or edge weights onto points.
  • Plug a Stamp SOP to assign random seeds or variant indices via stamp(“../shape_geo”, “seed”, $PTNUM).
  • Insert a VEX Snippet SOP to modify transferred attributes, e.g. @pscale *= fit01(rand(@seed), 0.8, 1.2).
  • Finally, deploy Copy Stamping (Copy to Points with “Stamp Inputs” enabled) to pick instances based on your stamped index and procedural attributes.

Within the VEX Snippet SOP, reference your stamped values directly. For example:

float f = rand(@stamp_seed + @ptnum);
@scale = fit01(f, ch(“minScale”), ch(“maxScale”));
@Cd = lerp({1,0.8,0.6}, {0.2,0.5,1}, f);

This snippet reads the stamped seed, generates a noise‐based float, remaps it to user‐exposed channels, and drives both scale and color. By chaining multiple VEX adjustments you can layer turbulence, falloff, or directional bias.

Key tips:

  • Group your Stamp SOP region to isolate variation logic from upstream geometry.
  • Use Attribute Promote to control whether data lives per-vertex, per-primitive or per-point.
  • Name your stamped attributes clearly (seed, variantID, weight) so VEX expressions remain readable.
  • Leverage Copy Stamping’s “stamppath” expression to switch between totally different geometry on each copy.

By combining these techniques, you unlock a non-destructive, fully procedural pipeline where every instance can follow complex, driven rules while remaining easy to adjust or extend in production.

What are common performance pitfalls with Stamp-driven instancing and how do I debug them?

When driving instancing with the Stamp SOP, users often hit slowdowns due to redundant loops, heavy expression evaluation, or large attribute transfers. Debugging these requires measuring cook times, isolating hotspots, and replacing Stamp operations with more efficient alternatives when needed.

  • Excessive Stamp Iterations: Creating hundreds or thousands of stamped points in one SOP chain can trigger repeated node cooks. Each stamp pass evaluates all downstream networks, multiplying cook time.
  • Complex Expressions per Stamp: Using string functions, lookups, or channel references inside stamp variables slows each iteration. Houdini evaluates them in Python or HScript for every stamp.
  • Attribute Blowing Up: Transferring large arrays or complex attributes (e.g., heavy detail geometry) through stamp channels increases memory and cook overhead.
  • Instanced Geometry Overhead: Point instancing with unique transforms but identical geometry still duplicates transform data. If instancing is done before collapsing, viewport and render overhead spikes.

To debug, follow a systematic approach:

  • Enable the Performance Monitor (Windows ▶ Performance Monitor). Record a cook and locate nodes with the highest self and total cook times. Focus on Stamp SOP and downstream nodes flagged red.
  • Break down the network: Bypass or disable the Stamp SOP, then cook only the geometry upstream. Check how much time the stamping step alone adds.
  • Use the Info CHOP or Detail attributes to count iterations. Create a counter in a Wrangle (i = detail(0,"iteration_number",0)) and cache values to verify the expected loop count.
  • Swap Stamp SOP for For-Each loops: A For-Each Named Primitive or For-Each Number block can batch-process stamping with grouped data, reducing redundant cooks. Monitor the difference in the Performance Monitor.
  • Convert Stamp expressions to attribute lookups: Precompute variable tables in a CSV and import via Table Import SOP. Use point attributes instead of stamping strings or scripts.
  • Cache heavy geometry: If the instanced object is complex, use a File Cache or Geometry ROP to store it on disk. Then reference it with an Instance SOP rather than stamping entire geo each iteration.

By isolating the Stamp SOP, reducing expression costs, and leveraging more node-efficient loops or caching, you can dramatically improve instancing performance. Always measure before and after changes to ensure your optimizations are effective.