Jump to content
anbt

Adjust orientation of N along curveu

Recommended Posts

Hello guys,

could anyone help me achieve what I just draw? I used the OrientAlongCurve to orient my normals along my curve. Then I use the AttribRandomize with N as Direction Attribute in the parameters. 

So far so good, I have the drawing on the left. I would like my normals at the bottom to be closer to my curve and the ones at the end more perpendicular. What should I do?

basically it is the Cone Angle parameter of the attribute randomize (set to Distribution Inside Sphere) that I would like to scale by curveu (I think this is what I have to do).

But how can I fetch a parameter and use it as an attribute in a wrangle or VOP. I probably don’t have to do this for my issue but this is something I was wondering how to do.

Thank you !

C795FBCA-D539-4F35-B2B3-D5EE40550509.jpeg

Share this post


Link to post
Share on other sites

wow, thank you. I am decrypting your code at the moment and trying to understand it.
So far, from my understanding is that you:
- create N along the curve
- create another N perpendicular to the curve
- create an axis from the cross product of those two different normals
- create an identity matrix
- rotate that identity matrix according to the position on the curve
- multiply N by this new rotation

Well, I think I get it, the only tricky thing is that identity matrix because I had not seen it before.

Thank you very much

Share this post


Link to post
Share on other sites

That is correct. The method used is from here, but I added the ramp functionality to give better control. Instead of using point number over total number of points, you can also use something like arclen() if your points are not evenly distributed on the curve.

Share this post


Link to post
Share on other sites

I found another way without using matrices (which seems to produce the same result, as far as I can see) by using the Attribute Transfer and the lerp() function between the two different normals:

 

float amount = chf('amount');
@curveu *= amount;
amount = chramp('ramp', @curveu);

v@N = lerp(v@N, v@N2, amount);

 

Edited by anbt

Share this post


Link to post
Share on other sites

 

almost the same. I can't rotate the normals completely around the axis (360*), but I can achieve the same result until a certain angle of rotation

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

×