Jump to content

Point transfer from less to more points (formula included)


Recommended Posts

I know it is possible for one to transfer points from object A to object B if they both have the same number of points.

It is also possible to transfer points from object A to object B if object A has more points than object B by using a wrapping formula which looks like this:

 

Object A

       scatter1 (60)

       attribute create "variable1" (integer, value = $PT % npoints("../scatter1"))

      

Object B

       scatter (15)

       attribute create "variable1" (integer, value = $PT)

 

Plug into Blendshape/Sequenceblend and presto.

 

What I would have liked to find out after this was how to "wrap" a smaller number of points onto a bigger number of points. A friend and I managed to make a formula to do this but only mathematically and I am not sure how to apply this principle to transferring points from one object to another in Houdini to which I am still quite new.

 

Here is the formula:

 

Object A - scatter (3) [A, B, C]

Object B - scatter (11)

floor($NPT Object A / $NPT Object B) * $NPT Object A + ($NPT Object B % $NPT Object A) * A

 

So here's what it would look like:

 

floor(3/11)*3 [A, B, C] + mod(11, 3)*A

 

So basically my question is: Would this formula be useful? I have tried to write these values into attribute create nodes but got stuck somewhere everytime.

 

Thanks!

Link to comment
Share on other sites

Thanks cloud68, I'm not very familiar with point cloud lookups until you mentioned it. Seems awesome and useful, although in this context I'm not sure how it would be used to "create" points, unless it filters through the amount of points from object A and when there's more points (when compared to object B ) that the point cloud creates them. Which still leaves a couple questions but it I suppose it does add another possibility.

Edited by nico_venster
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...