Jump to content

VEX::How to access a curve


Recommended Posts

Hi,

is there a way to get a curve in vex. for example I want to deform a geometry with a curve and need the curve for this. so when I evaluate the curve at a specified u value i want to get the position at this point

is it possible?

martin

Link to comment
Share on other sites

Hi,

is there a way to get a curve in vex. for example I want to deform a geometry with a curve and need the curve for this. so when I evaluate the curve at a specified u value i want to get the position at this point

is it possible?

martin

You maybe can use a carve to get the desired u in worldspace and feed this into VEX.

Just guessing, though.

Cheers,

Georg

Link to comment
Share on other sites

I think this is not very well suited to vex. You can access the points and work out an interpolated position, either find the closest 2 using a point cloud or use the connectivity to find the neighbours. But actually just looking up the position using the u value I don't believe is possible. Maybe in a python sop?

Link to comment
Share on other sites

I think this is not very well suited to vex. You can access the points and work out an interpolated position, either find the closest 2 using a point cloud or use the connectivity to find the neighbours. But actually just looking up the position using the u value I don't believe is possible. Maybe in a python sop?

Python + hscript expression unfortunately what makas this thing slow...

What I was thinking recently is, since these are parametric curves..., so with a help of arrays one could represent a curve in vex. All we need is a proper bezier() call for example... Might be interesting to implement it by someone... ;)

Edited by SYmek
Link to comment
Share on other sites

You could use a resample-SOP before your VEX-Sop and then use either nearest neighbor sampling or linear interpolation for your curve. By cranking up the samples in the resample-SOP you can control the accuracy for your curve. I've attached an example scene, where a VOP-Sop places a point along a curve. Hope it helps ;-)

curveToVop.hipnc

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...