I always forget how to do this ,so here we are.
This creates a spiral loop around a provided curve (no need to add cross section)
Important bits - Round Tube surface shape, Columns surface type, control the twists in the rotation section.
Wednesday, 8 October 2025
sweep node, spiral / wrap a curve around a curve
Monday, 22 September 2025
How to move point/points along a curve
Some wise words from Toadstorm on the odforce forum.
Make your main curve, blast some points off that you want to move along this main curve..
The main curve goes into input "one" (2nd input) of both wrangles. The points wrap round too, which is cool.
Good for a stream of things moving along a curve constantly. Things to consider, different u-increment values per points.
If you want to do it manually, what you probably want to do is create a duplicate set of disconnected points via the Add SOP or whatever, and then use xyzdist() to determine their relative positions along the parametric U of the curve. This would be done in a point wrangle, with your disconnected points in input 0 and the original curve in input 1:
int posprim; vector primuv; float dist = xyzdist(1, @P, posprim, primuv); f@u = primuv.x;
Then after that's been established, you can use a second wrangle with a parameter to add to that starting @u value and lock each point to the position along the curve that matches the new parametric U value:
float add_u = ch("add_u"); float new_u = (f@u + add_u) % 1.0; // wrap points if they go past 1.0 vector new_P = primuv(1, "P", 0, new_u); @P = new_P;
Thursday, 2 March 2023
curl curves with vex
VEX code taken from this forum post, by user F1 -
Curling hair curves with VEX - General Houdini Questions - od|forum (odforce.net)
Very hand bit of code that can curl up your curves for hairstyles, bits of fluff or any other curly things you might imagine.
If you're going to use a path deform SOP after this (eg, you're using the curves to deform a bunch of snakes) you'll want to Attribute Delete the Normal "N" attribute that this script creates. Otherwise your geo might come out a bit flat/squashed/wrong in places.
// Primitive wrangle.
#define TWO_PI 6.2831852
addpointattrib(0, "N", {0, 0, 0});
int pts[] = primpoints(0, @primnum);
int npt = len(pts);
// Loop variables.
vector rest = point(0, "P", pts[0]);
vector prev_pos = rest;
matrix3 frame = ident();
for (int i = 0; i < npt; i++)
{
vector pos = point(0, "P", pts[i]);
vector delta = pos - rest;
rest = pos;
// Make normal. Point normals could be used instead.
vector normal = normalize(cross(cross({0, 1, 0}, delta), delta));
if (length(normal) == 0)
{
normal = {0, 0, 1};
}
// Drive a shape with ramps and multipliers.
vector axis;
float ramp, angle;
// Twist the bend axis.
axis = normalize(delta);
ramp = chramp("twist_profile", (float) i / npt);
angle = fit01(ramp, -TWO_PI, TWO_PI) * ch("twist") / (npt - 1);
rotate(frame, angle, axis);
// Bend the curve.
axis = normalize(cross(normal, delta));
ramp = chramp("bend_profile", (float) i / npt);
angle = fit01(ramp, -TWO_PI, TWO_PI) * ch("bend") / (npt - 1);
rotate(frame, angle, axis);
// Compute new position and normal.
vector new_pos = delta * frame + prev_pos;
prev_pos = new_pos;
setpointattrib(0, "P", pts[i], new_pos);
setpointattrib(0, "N", pts[i], normal * frame);
}// Primitive wrangle.
int pts[] = primpoints(0, @primnum);
vector rest = point(0, "P", pts[0]);
vector prev_pos = rest;
matrix3 frame = ident();
for (int i = 0; i < len(pts); i++)
{
vector pos = point(0, "P", pts[i]);
rotate(frame, 0.1, {0, 0, 1});
vector new_pos = (pos - rest) * frame + prev_pos;
rest = pos;
prev_pos = new_pos;
setpointattrib(0, "P", pts[i], new_pos);
}
Sunday, 14 February 2021
cutting curves into seperate parts (like detach in maya). Houdini modelling
Simple stuff, but only once you know.
Group some points on a curve. Apply a Polycut node, specify the group you made in the cut points.
BLAM.
If you simply delete points, the curve will remain connected, so this is whatcha need.
Thursday, 5 April 2018
Exporting curves to Maya
In the options for the Arnold archive output, make sure the "export Asstoc file" box is ticked. This creates the bounding box info for the curves.