This little work horse will be your new best friend!
The pointOnCurveInfo node.
This node allows you to pin a transform node anywhere on a nurbs curve, and the applications there are numerous.
Aside from the usual parametres that almost all utility nodes have, pointOnCurveInfo has only three inputs you need to worry about, and they're all fairly intuitive:
inputCurve takes as input the shape node of the nurbs curve you want as the position driver.
parameter, though non-descriptively named, controls where on the curve you want the transform object to be pinned to.
turnOnPercentage (christ, who names these inputs?) is a boolean which when on means the parameter input will be treated as a percentage of the curve's total length (I'll show you in more detail in a moment)
inputCurve takes as input the shape node of the nurbs curve you want as the position driver.
parameter, though non-descriptively named, controls where on the curve you want the transform object to be pinned to.
turnOnPercentage (christ, who names these inputs?) is a boolean which when on means the parameter input will be treated as a percentage of the curve's total length (I'll show you in more detail in a moment)
So Suppose I have a nurbs curve:
I'd like the pin sayyyyy... a joint onto that curve.
So I make a joint, and I take the positional output data from the pointOnCurveInfo node and plug it into that joint's translation:
So I make a joint, and I take the positional output data from the pointOnCurveInfo node and plug it into that joint's translation:
Nothing will happen yet. We need to give the pointOnCurveInfo node a curve as input.
We don't use the curve's transform node, because that just holds information like translate, rotate, scale, etc. The information we want - regarding the curve's shape, and CVs - is on the shape node.
But we have two options to consider:
But we have two options to consider:
As input for the pointOnCurveInfo node, we can either use the curve shape's local output or its worldSpace output.
If we use local, the pointOnCurveInfo will only pay attention to the curve's CVs in the context of the curve itself.
Whereas worldSpace will consider the CVs positions within the entire scene.
Whereas worldSpace will consider the CVs positions within the entire scene.
So either option will get us this behaviour:
But only worldSpace will also make the joint follow when we move the curve's transforms:
local only pays attention to how the CVs are being moved. It ignored where in the scene the curve's transform is:
So worldSpace is typically the behaviour I want. I just want the object to follow that point on the curve wherever the curve may be and for whatever reason:
So now the joint is stuck firmly to the curve. But it's right at the start. Right at cv[0].
Maybe that's what you want, but often not.
Suppose I want the joint right in the middle of the curve. This is where the parameter input come into play. Watch what happens as I increase the parameter input:
Maybe that's what you want, but often not.
Suppose I want the joint right in the middle of the curve. This is where the parameter input come into play. Watch what happens as I increase the parameter input:
How large a number corresponds to where on the curve exactly depends on the number of CVs in the curve.
You could just eyeball it to find the right value for the position you want, but often the easier thing to do is make use of the turnOnPercentage input.
When it's turned on, the parameter input will be treated as a percentage of the curve's total length, so a parameter input of 0.5 will place it 50% of the way down the curve:
You could just eyeball it to find the right value for the position you want, but often the easier thing to do is make use of the turnOnPercentage input.
When it's turned on, the parameter input will be treated as a percentage of the curve's total length, so a parameter input of 0.5 will place it 50% of the way down the curve:
Hell, you could even drive the parameter input anim the joint sliding up and down the curve.
Now there's more we can do here. All we're effecting is the translation of this joint. And maybe that's all you need, but take note that the orientation remains unaffected:
It's a pretty common scenario to want the joint to remain staring down the barrel of the curve, wherever it is. Using the curve as input for a tangent constraint could help you there
I'd also consider putting the joint inside an offset transform, and pinning that to the curve.
That way the joint is still following the curve, but its translation is free, so you can add extra animation on top of its curve-following tendency.
That way the joint is still following the curve, but its translation is free, so you can add extra animation on top of its curve-following tendency.
When is it useful?
Oh so many scenarios!
You could also use this in the segments of a limb. Rotation is still free by default, so twist distribution is still easily accomplished, and as a bonus, you can skin the CVs of the curve so you can pull on them and reshape the curve and in doing so reshape the limb on the fly:
Basically any time you want the movement or positions of a bunch of transforms/joints to follow a path that would be easier to control if it were a nurbs curves.
Similar nodes
Depending on your specific needs you can get similar behaviour from the motionPath node. It's easier to get a cyclical reaction. With the pointOnCurveInfo node, it's often necessary to include a driven key with post-cycle and pre-cycle set to infinite.
pointOnSurfaceInfo is the same node but for nurbs surfaces instead of curves. There are two parameter attributes, one U, one V, that are used to pick a point in UV space on the surface of the object. Often used when making twist ribbons such as to drive joint positions/orientations in a character's limbs.









No comments:
Post a Comment