Jump to content

Matching Curves


garf

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.

Link to comment
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
Link to comment
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 

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