Log into your account to keep track of your progress. You can work through the lessons without logging in but your progress will be lost when you refresh the page.
Curveu is a very important attribute in Houdini. It dictates a remapped value of 0 - 1 on curves. I will show you how you can create it easily and how you can visualize it using color. Then will cover some thoughts on how you can make this attribute useful and manipulatable.
COMMENTS
Mike_A 1 year, 6 months ago |
How do you make a curveu attribute using a vex wrangle, rather than a Resample SOP?
Miaw 1 year, 2 months ago |
CurveU (in this case called: "polyLineGradient" point attribute), calculated via point distances (ordered from 0 to n) on "Detail" Attribute Wrangle:
float polyDistanceA[], vecAmplitude = 0, totalPolyDistance = 0, polyLineGradient = 0, polyDistAccum = 0;
vector ptVector;
for (int i = 1; i < @numpt; i++) //calc polyLine point distances array
{
ptVector = point(0,"P",i) - point(0,"P",i-1);
vecAmplitude = sqrt(pow(ptVector.x,2) + pow(ptVector.y,2) + pow(ptVector.z,2));
push(polyDistanceA,vecAmplitude);
}
foreach(float item; polyDistanceA) //calc total polyLine distance
{
totalPolyDistance += item;
}
for (int j = 0; j < @numpt; j++) //calc polyLine Gradient
{
polyLineGradient = polyDistAccum / totalPolyDistance;
setpointattrib(0,"polyLineGradient",j,polyLineGradient,"set");
polyDistAccum += polyDistanceA[j];
}
This is what I do, hope it helps!
ehuo 1 year, 4 months ago |
Same query as Mike_A here
Mike_A 8 months, 2 weeks ago |
@Miaw - I just came across your reply today : )
Many thanks for this - I'll try this and look into it when I have time. Your response and know-how is much appreciated!
Please log in to leave a comment.