Jump to content

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.

Share this post


Link to post
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)

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×