Jump to content
Sign in to follow this  
marcosimonvfx

subdivide without smoothing

Recommended Posts

Hi,

as the title says, I'm trying to subdivide a curve without changing the shape of the curve at all. I see no option in the subdivide node to not interpolate between points - even point attributes seem to always be interpolated with no chance of turning it off - help!

Share this post


Link to post
Share on other sites

Thanks. But the resample node only leaves the endpoints alone. If I have a curve with three points, one at x=0, one at x=0.0158487 one at x=1 then resampling the curve with 4 segments (one division between every two points) will space them out with equal length, effectively moving my second point.

Rather I would want x0 to stay at 0, x1 to be at 0.0158487/2 and x2 to stay at 0.0158487 etc

Share this post


Link to post
Share on other sites

Something Like This!!
And Just using Diff Spline Func You Can Achieve This

vector keys[] = detail( 1, 'stemPs', 0);

float lookUpLoc = abs( ch('pow')/@curveu)-0.01;
@P = spline( 'catmullrom', lookUpLoc, keys);

http://127.0.0.1:48626/vex/functions/spline

Ress.hiplc

Edited by Librarian

Share this post


Link to post
Share on other sites

Hm, not exactly. I really just wanted to get an additional subdivision between two points without changing the position of the two points - but these don't have to necessarily be the end points.

So first there's two points - in the next step one more gets added (in between the two points). Then, in the next step two get added - one between the first and the middle and the second one between the middle and last. Then in the next step four points are added ... So pretty much what the subdivision node does, but the subdivision node smoothes the parameters so all points (except the two very edges) change position.

In the end I managed to do it by subdividing (so points "loose" their correct position) and then checking the point positions before the subdividing: every point now has the old pointnumber *2. So it's easy to reference back the position this point had before the subdivision.

Kinda hacky - I would expect there'd be a possibility on a subdivide node "no interpolation" ... but oh well.

Thanks for your input, guys!

Edited by marcosimonvfx

Share this post


Link to post
Share on other sites

Hi,

have you tried resample by polygon edge? You can divide each edge by number and by segment length aswell.

  • Like 1

Share this post


Link to post
Share on other sites

Ah, that one does exactly what I wanted - even in the description it says that it doesn't move the edge points. Thanks!

 

Quote

Each edge of the polygon will be resampled independently. This option will preserve corners in the input.

 

  • Like 1

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
Sign in to follow this  

×