How to create 2 parallel curves in Houdini (PolyFrame node)

The end result. 2 curves which are completely parallel to each other.
The end result. 2 curves which are completely parallel to each other.


When creating curve I ran into a problem when trying to make a copy of the curve that would run parallel to my existing curve. Sometimes you can not simply scale the curve up. For example:




Just applying a scale & translate transform does not work. You’d get a result like this, which does not keep an equal distance between the 2nd curve and the 1st curve. You could manually adjust the points using the move tool, but it will not nearly be as nice as doing this procedurally.



Specifically what we want to do to get the desired effect is we want to move the 2nd curve to have its point positions moved away exactly in the direction of its ‘bitangent’. The bitangent for a point in this case is the direction which is perpendicular to both the tangent and the normal. The normal here for each point is in the direction of the plane which the curve is being drawn on (pointing out of your screen).

The PolyFrame node has the ability to add normals, tangents, and bitangents for each point in our curve, as well it can add each attribute under any attribute name we want! The Peak node has the ability to move each point along its normal. Using a combination of both the PolyFrame node and the Peak node we can create a 2nd curve which runs parallel to the first, while maintaining an equal distance between the 2 curves.


FYI: All screenshots here are taken while I’m using Houdini 15.5

1) Draw the first curve

This is up to you of course. I’ll be drawing my simple curve through the ‘top view’.

2) Place down a PolyFrame node

This will allow us to add the bitangents to each point. The important idea here is to actually add the bitangents with the attribute name ‘N’, so that we can simply use the peak node (Which operates using the N attribute). Once again, the original name for bitangents was ‘tangentv’, I renamed it to N so that it is compatible with the Peak node we will use later on.



optional) Turn on display normals

This will help you see that the ‘normals’ are in fact pointing in the correct direction. Note: Remember, our normals in this case are actually bitangents but we named them with N so this means that the viewport is tricked into displayed these as normals!



3) Use the Peak node to move the line along its ‘Normals’

Note: It doesn’t matter that ‘Recompute Point Normals’ is checked here, as we won’t be using the normals anymore after node, though it will wipe out the bitangents that we added.



4) Merge the original curve with this new curve




5) Housekeeping: Delete the extra attribute from the 2nd curve

As you can see, there’s a warning on the merge node saying that there’s an attribute mismatch. This is because one of the inputs has normals and the other does not. We can either delete the attribute using an attribute delete node, or simply merge from the polyframe instead of the the original curve node. I will add an attribute delete node to delete ‘N’.



Please comment if you know of a different approach or if something is unclear!

EDIT: I ran into a different type of approach to this problem, check that out here:


Leave a Reply

Your email address will not be published. Required fields are marked *