Jump to content
garf

Matching Curves

Recommended Posts

Hello,

I have two sets of curves - the first has a lot of points and the second is a lower-res resample of the first. Ideally I would like to simulate the lo-res and then match the hires back to the lo-res.

I'm thinking I need to find the nearest uv location on the lo-res for the hi-res points (on a rest frame) and then transform each of the hi-res points via that matrix in order to match them.

Is this the right methodology and how do I go about doing this?

Any pointers greatly appreciated.

Share this post


Link to post
Share on other sites

Pointdeform almost gets me there but it's not a match - templated (grey) is what I want it to be.

image.png.e3ca648849faa93a00815f070a743c29.png

 

 

I've tried a setup using nearpoint on rest frames and then using that point number's point position on the animated geo to set my point positions. This almost works too but with some random points crossing over to other curves:

image.png.6aaeea0e5cdeb06dabff57bdb82c3b15.png

Edited by garf
grammar

Share this post


Link to post
Share on other sites

Yes, primuv function is for that purpose.

I didn't open your scene.... but usual technique would be like this:.

Suppose you have low res curves. Then just generate U coordinate attribute on those (resample node can do that or you can process each curve separately where U = float(@ptnum / (@numpt-1))  on each curve assuming point order is sorted same way as on high res curve).. That puts U in range (0 to 1). 

Later at the place you need some attribute from lowres curve to put on hi res (assuming curve count is the same) you can use pointwrangle node, connect high res curve into first input and low res curve into second :

vector tempUV = set(@u, 0, 0);

@attribute = primuv(1,"SomeAttributeFromLowRes", @primnum, tempUV);

This way you can fetch any attribute from LowRes curve to HighResCurve (and vice versa if you exchange inputs into wrangle node) according to U coordinate which should exists on both geometries.

So if you write:

@P = primuv(1,"P",@primnum, tempUV);     This will put your high res curve at low res curve 

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

×