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

pointdeform ?

##### Share on other sites

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

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:

Edited by garf
grammar

##### Share on other sites

I was over thinking it. This will do the job. prim attribute = P

##### Share on other sites

@garf... errr... how does that work exactly?
Would you mind sharing a simplified scene?

• 1
• 1

##### Share on other sites

Thanks.... I'm still learning all the (literal) ins and outs... hooking all this stuff up!

##### Share on other sites
5 hours ago, garf said:

Sure.

nice...thanks.

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

## Create an account

Register a new account