Jump to content

Adjust orientation of N along curveu


anbt

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

Link to comment
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

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

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