Is there a way with VOPs to find the length of a spline?
I found the arclen() expression but i wasn't able to find the relative command in the VOPs.
How to calculate in VOPs the vector tangent (I think that with expressions the command is primduv) to a point in a spline?
Also…how to use the second input in a VOP geometry op? If I attach a primitive wich has attributes I cannot use the attributes if the primitive is connected to a second input.
Sorry for the many questions…thanks
Length of a spline
7930 7 2- glauca
- Member
- 10 posts
- Joined: July 2005
- Offline
- old_school
- Staff
- 2540 posts
- Joined: July 2005
- Offline
Very difficult to do this in VOPs as there is no real connectivity information to work with. There is no built-in function to do this right now.
I have done this in the past where I needed the arc length to the current point from the start. For that I used a VOP for loop where I interated across the points to the current point summing the result as I marched along the curve. Only works for poly curves as well and is somewhat slow but real handy.
Best bet is to do this in SOPs using the Measure SOP. Easy and painless if all you need is the total arc length. It works equally well with NURBs, Beziers and Polygon faces.
I have done this in the past where I needed the arc length to the current point from the start. For that I used a VOP for loop where I interated across the points to the current point summing the result as I marched along the curve. Only works for poly curves as well and is somewhat slow but real handy.
Best bet is to do this in SOPs using the Measure SOP. Easy and painless if all you need is the total arc length. It works equally well with NURBs, Beziers and Polygon faces.
There's at least one school like the old school!
- Simon
- Member
- 2199 posts
- Joined: July 2005
- Online
glauca
Is there a way with VOPs to find the length of a spline?
Also…how to use the second input in a VOP geometry op? If I attach a primitive wich has attributes I cannot use the attributes if the primitive is connected to a second input.
Can you explain what you mean here?
You can access attributes from any point on any input to a vop sop using the import vop. You can also use prim_attribute but I don't think it has a vop, so you'd have to put it into an inline vop.
What I usually do is add a parameter and then put a prim expression in it that grabs the value I want.
The trick is finding just the right hammer for every screw
- glauca
- Member
- 10 posts
- Joined: July 2005
- Offline
Hi Jeff and Simon
thanks for your answer…
too bad to know that some real useful informations as acurve length are omitted from VOPs…
As for the second input, what I mean is that if I find the length of a spline with an arclen() expression in an AttributeCreate SOP and attach this to a second input of a VOP SOP I'm not able to import it in the VOP using the import_attribute VOP…the attributes attached to a second input simply desappear…
Anyway thank you for your help
thanks for your answer…
too bad to know that some real useful informations as acurve length are omitted from VOPs…
As for the second input, what I mean is that if I find the length of a spline with an arclen() expression in an AttributeCreate SOP and attach this to a second input of a VOP SOP I'm not able to import it in the VOP using the import_attribute VOP…the attributes attached to a second input simply desappear…
Anyway thank you for your help
- edward
- Member
- 7710 posts
- Joined: July 2005
- Offline
- glauca
- Member
- 10 posts
- Joined: July 2005
- Offline
- Simon
- Member
- 2199 posts
- Joined: July 2005
- Online
It definately should work, I've done this a million times. Make sure you are creating a point attribute and that you match the type you are creating in the import vop. So if you are adding a float attribute then make sure you change the signature on the import vop to float by default it is vector.
The trick is finding just the right hammer for every screw
- glauca
- Member
- 10 posts
- Joined: July 2005
- Offline
-
- Quick Links