Houdini - Modeling With a Ramp
A ramp
takes in a sample position 0 <> 1
(x-axis) and outputs the value sampled at that position from the y-axis.
Here, we take a Line SOP and create a line with direction {0, 1, 0}
. We feed it into a Revolve SOP.
Before the Revolve, we use a Wrangle to push the @P.x
of the points around with the ramp
.
float pos = @ptnum/float(@numpt); // For each point 0.1, 0.2, 0.3 etc
@P.x = chramp("ramp", pos);
Which gives us this “distorted” line.
Another example:
We start with a flattened box (the templated outline) and attach this Wrangle:
Remember, to sample a ramp, we need a moving value 0 <> 1
which is what relpointbbox
returns – the point’s position within the bbox – which goes from 0 to 1. Since the length of the “leaf” runs along the z-axis, bb.z
will give us this “changing value” we need.