Jump to content

Path CV Point Normal Issue


Recommended Posts

I've been going through the tutorials listed on the SideFX website for Houdini lately, and I've had an issue with the first tutorial in Procedural Modeling where Ari is making a hose that follows a Path CV object.

My issue is that no matter what I do when creating the path, my normals are not aligned along the curve as his are in the downloaded scene files. Instead, the normals of all points point perpendicular to the path. This causes issues later when trying to manipulate the path to pull the end points in/out to carve them and create tension. Instead of having the desired effect of moving the points in or out along the path, they move along the Y-axis, which is how the normals appear to be oriented.

 

I can't find any steps that I've missed, having combed over the lecture yesterday, and cannot find any options to change how the normals are oriented. As well as this, all my attempts to correct the issue have failed, including manipulating the normals in a VOP, trying to use a Point SOP to change them, and experimenting with the Polyframe node.

 

What am I missing? Thanks heaps for the help, this one has me stumped and I can't figure out if I just missed an important step, did something stupid, or am suffering at the hands of Houdini 14 when he used Houdini 12 for this tutorial.

Link to comment
Share on other sites

I have not checked the tutorial but you can easily reorient Normals to follow a curve's shape by using a polyframe SOP. Just uncheck the Normal toggle and replace the default Tangent Name by N.

 

You can manually point your Normals toward the next point with a single line of VEX in an attribWrangle set to point mode
 

@N = normalize(point(0, "P", @ptnum + 1) - @P);

(This code is not taking care of the last point where it'll query an imaginary "last + 1" point position)

Link to comment
Share on other sites

You know, I could've sworn I'd tried that with the polyframe node and it didn't work, but I might've tried to do it in a point wrangle instead and muddled it (only been learning Houdini for about 2 weeks now). That's fantastic and does work :) thank you kindly.

 

How would you tackle the imaginary last + 1 position? The only solution I can come up with for that is to check if it's the last point, if not, use the above line, if it is the last point, orient the Normal to "last - 1" and reverse it. Is that about as efficient as it would get? I can't see any reason for that not to work.

Link to comment
Share on other sites

It would work yes.

 

Just for further informations on the subject:

You could also have think about copying the "last - 1" point Normal since they will be the same.... but it will not work as you can't query an attribute your VEX code is currently defining. This is because of multithreading things splitting all your points in chunks reparted among the different cores.

In that case you would need a second attribwrangler to define the Normal on the last point.

For efficiency -even though we are speaking of mere ms here- you would define it as running on detail (only once) and manually define the last point normal with a setpointattrib() function. It'll avoid going through all the points only to change one.

vector _N = point(0, "N", @numpt - 2);          // query the "last - 1" point Normal
setpointattrib(0, "N", @numpt - 1, _N, "set");

but your solution is the one to go.

Link to comment
Share on other sites

That's an interesting alternative. I come from Blender and Maya, teaching myself over the last 6 months a variety of software, and I'm still getting used to the idea of different attribute levels. Wouldn't have even thought of the detail attribute level! Will have to keep that in mind in future when coming up with solutions. Thank you very much for your help.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...