Articles

Houdini Rest Position VOP: Preventing Texture Swimming on Simulations

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 Rest Position VOP: Preventing Texture Swimming on Simulations

Houdini Rest Position VOP: Preventing Texture Swimming on Simulations

Have you ever run a fluid or cloth simulation in Houdini only to find your textures sliding or warping mid-animation? That distracting shift, often called texture swimming, can shatter the realism you’ve worked to achieve and leave you hunting for a reliable fix.

Frustrated by manual UV baking or clumsy attribute transfers that still fail under motion? You’re not alone. Many artists spend hours tweaking shaders and UVs, only to see their patterns drift across the surface when the sim runs.

In complex simulations, maintaining stable texture coordinates demands more than basic UV workflows. The Rest Position VOP in Houdini provides a robust solution, but its setup and integration can feel opaque without clear guidance.

In this guide, you’ll learn how to configure the Rest Position VOP step by step, anchor your texture data, and prevent that unwanted swim. By the end, you’ll master a workflow that keeps your procedural textures locked in place throughout any simulation.

Why do textures swim on simulations and how does a Rest Position solve it?

When a mesh undergoes deformation or topology changes during a simulation, its per-vertex UV coordinates get interpolated or re-projected each frame. As vertices slide, stretch, or remesh, the texture lookup moves across the surface, creating the distracting effect known as texture swimming.

In practice—whether it’s an RBD fracture, FLIP water surface, or FEM cloth—the underlying point positions evolve continuously. If UVs are bound to the current position, any smoothing or remeshing warps the UV “map,” so painted details appear to drift or shear.

Common causes of texture swimming:

  • Topology updates (remeshing or fracturing) recalculating UVs at each frame
  • Smoothing operations or collision responses altering vertex order or connectivity
  • UV interpolation across deformed triangles, introducing drift in heavy stretch

The Rest Position VOP addresses this by anchoring texture lookups to a static reference state. Before the sim, you copy the original point position into an attribute (often named restP). Inside a VOP-based shader, the Rest Position VOP reads that attribute and transforms it into the current space. When you sample your texture using this restored coordinate, all deformation happens on the geometry, but the UV mapping remains locked to the undeformed “rest” state—eliminating swimming even under extreme distortion.

How do I build a robust Rest Position VOP network in SOPs for deforming geometry?

Node-by-node SOP/VOP workflow: capture restP, preserve UVs, and persist attributes

Start by isolating your undeformed mesh on frame 1 using a TimeShift SOP. Feed that into an Attribute Create SOP to store position in a new vector attribute named restP. Ensure your UVs are properly tagged as vertex attributes before deformation.

Next, use an Attribute Copy SOP to transfer restP (and UVs) onto your animated geo. Insert a Geometry VOP after each deforming SOP to read restP and your UV attribute. This preserves texture coordinates and reference positions through every skin, blend, or simulation SOP.

VEX/VOP code patterns: computing restP, handling point vs primitive attributes, and velocity compensation

Within a Geometry VOP or Attribute Wrangle, import the stored rest position via point() or prim(), matching how you baked it:

  • vector restP = point(0, “restP”, @ptnum);
  • vector offset = @P – restP;
  • vector velComp = @v * @TimeInc;

Adjust your UV lookup by combining offset and velocity compensation in the XY plane:

  • @uv += offset.xy + velComp.xy;

Key tips: if restP was a primitive attribute, replace point() with prim(). Always match attribute ownership. The velocity term counteracts motion blur and high-speed drift, locking textures to the surface and eliminating swimming artifacts.

How do I apply Rest Position in DOP-based simulations (RBD, FEM, FLIP, cloth) to preserve UVs across solvers?

To preserve UVs across solvers, you must carry an initial UV-mapping attribute through the DOP network and reapply it each timestep. Houdini does not automatically maintain non-P attributes in DOPs, so we create a custom restuv attribute in SOPs before entering DOP context. Then we flag it for retention in each solver’s attribute list or via a SOP Solver.

For RBD with Packed Geometry, add your mesh via an RBD Packed Object. Under “Primitive Attributes to Keep,” list “uv” and your custom restuv. Insert a SOP Solver in the DOP network: inside it, use an Attribute Copy SOP to copy restuv back onto the dynamic “uv” attribute each frame. This ensures texture mapping follows moving fragments without distortion.

In FEM and standard cloth simulations, the mesh topology remains consistent so UVs survive by default. However, cloth tearing introduces new edges. Preprocess with Connect Adjacent Fragments SOP to unify seam loops and store restuv. Inside the cloth solver, enable “Archive Particle Attributes” and add a SOP Solver that reassigns UVs post-tear, preserving seamless mapping across newly created geometry.

  • FLIP: In the particle emission SOP, capture restuv on each particle. Then inside the FLIP Solver’s SOP Solver, project particles back onto the original mesh per frame using a Ray SOP and copy restuv onto the evolving surface mesh.
  • Cloth tearing tip: Use sticky constraints on seam edges and store restuv at creation. Post-tear, your SOP Solver can detect new points and blend UVs from neighboring stored restuv values to avoid visible texture seams.

How do I integrate Rest Position into material VOPs and renderers (Mantra, Redshift, Karma) to eliminate swimming at render time?

To stop texture swimming, bake your stable UVs or world‐space coordinates into a “rest” attribute in SOPs, then bind that attribute inside your shader. This ensures your lookup coordinate stays fixed regardless of simulation or deforming geometry at render time.

  • Create a stable attribute (e.g., “restuv” or “restpos”) with the Rest Position SOP or an Attribute Create.
  • In your material VOP, use a Bind Export or Bind to fetch the rest attribute instead of built-in UV or P.
  • Feed the bound rest data into your texture or procedural node’s UV input.

Mantra: Inside your Material Builder, drop an Attribute VOP set to “restuv” (type: vector2). Connect it to your Texture VOP’s UV input. Disable or bypass the default uv lookup. This directs Mantra to sample textures using the unchanged rest coordinates, eliminating drift caused by deforming simulations.

Redshift: After baking “restuv” on your mesh, switch your Redshift Texture node to use a User Data node. Set its Attribute Name to “restuv” and Type to “float2.” Chain that into the Texture’s UV port. Ensure your RS OBJ Properties or RS ROP does not override UV sets—Redshift will then sample using the static rest attribute.

Karma (USD): In Solaris, create or import a primvar named “restuv” on your UsdGeomMesh. In your MaterialX network, use a primvar reader with varname “restuv.” Link its output to your image or procedural generator’s UV input. Karma will then consistently sample the texture at rest coordinates, preventing any simulation-driven swimming artifacts.

What are common pitfalls, debugging checks and performance optimizations for Rest Position workflows?

When integrating a Rest Position VOP into complex simulations—FLIP fluids, grains or pyro—errors often stem from mismatched attribute scopes, incorrect time offsets, or UV seams. These issues lead to visible texture swimming, memory spikes, and slowdowns in SOP and DOP contexts.

  • Missing or overwritten v@rest attributes after a procedural transform or cache reload
  • Using point-level rest on packed primitives without promotion to detail or primitive scope
  • Forgetting to bake the rest attribute before exporting to Alembic or USD
  • Time sampling errors when reading rest positions from disk on frame zero
  • Excessive attribute storage when rest positions are stored per element in large particle systems

Debugging begins with visualizing the rest vector on geometry. In SOPs, plug the rest attribute into a Color SOP or use the Attribute Visualize node to confirm consistency across frames. In DOPs, promote the rest position from geometry to the DOP attribute table, then inspect the rest field in the Geometry Spreadsheet at different simulation times.

To isolate UV-related swimming, drive your shader’s UV lookup with the rest attribute plugged into a UV Quickshade or test texture. If the pattern shifts, verify that the incoming UV attribute is correctly interpolated—use the Attribute Interpolate node in VOP context set to “Continuous” rather than “Piecewise” to avoid seam artifacts.

Performance optimizations center on reducing per-point storage and minimizing VOP evaluation cost. Store rest positions as 16-bit half floats when full precision isn’t critical, enabled via an Attribute Create node. Cache baked rest attributes to disk (bgeo.sc or USD), then reference them with a File SOP instead of regenerating in real time.

In SOP VOPs, collapse complex rest-based logic by chaining a single Rest Position VOP with local transforms rather than multiple wrangle snippets. When dealing with instanced geometry, compute rest positions once on the master geometry and drive copies via instancing attributes, cutting down eval overhead by orders of magnitude.

Finally, profile using the Performance Monitor. Identify hotspots in SOP/VOP evaluation and consider switching heavy vector operations into VEX Wrangle for optimized multi-threaded runs. By combining correct attribute scope, caching strategies, and efficient VOP design, you’ll eliminate texture swimming and maintain high frame rates in demanding Houdini pipelines.