Connecting two different SOPs

   5989   9   1
User Avatar
Member
87 posts
Joined: Aug. 2009
Offline
Hello

I'm trying to figure out the best way to connect points from one object to the other. I have two spheres with the same amount of points, and want to connect their points.
I can see how I can use an Add SOP to connect the points coming from one object, but this will not work for two. A Merge SOP will also not do the trick for me.

Any hints?

Thanks
Alex
User Avatar
Member
24 posts
Joined: Dec. 2008
Offline
I don't understand your question, but I believe that what you need may rely on the “attribtransfer” (attribute transfer SOP).
User Avatar
Member
87 posts
Joined: Aug. 2009
Offline
Say you have a sphere, with 50 points
Inside of it you have a smaller sphere with 50 points.
You want to connect the two spheres points with lines, as if the inner sphere was tied to the outer sphere with these lines

I think the trick may lie in the type of point selection I create within the Add Sop

Thanks
Alex
User Avatar
Member
24 posts
Joined: Dec. 2008
Offline
why don't you poly-extrude the sphere, instead of trying to connect the points?. After that, you can group faces to have two spheres.
User Avatar
Member
24 posts
Joined: Dec. 2008
Offline
Here is the solution to your problem. Check the file I'm attaching and let me know if this is what you're looking for.

Cheers!
Alsegura

Attachments:
spheresConnected.hipnc (51.8 KB)

User Avatar
Member
24 posts
Joined: Dec. 2008
Offline
here's another solution

Attachments:
spheresconnected_2.hipnc (47.9 KB)

User Avatar
Member
8582 posts
Joined: July 2007
Online
you don't need som many nodes, Add SOP is enough
here

Attachments:
connect_points.hip (41.2 KB)

Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
87 posts
Joined: Aug. 2009
Offline
Thanks, those examples are great.

Tomas, I was coming close to what you did, but missed the part where you are skipping every other point. But doesn't this assume that the number of points naturally progresses from one sphere to the other (so point 0 on sphere 1, point 1 on sphere 2, point 2 on sphere 1, point 3 on sphere 2, etc…)

How do you know that that is the case?

Thanks! This is exactly what I was looking for, just want to make sure I understand the process fully
Alex
User Avatar
Member
8582 posts
Joined: July 2007
Online
ok, imagine it this way
each sphere has 42 points
since they are merged then there is one geo with 84 points
0-41 is first sphere 42-83 is second

expression to skip every Nth point is: npoints(opinputpath(“.”,0))/2 which is 84/2 which is 42

so imagine Add SOP is processing point 0 then skip 42 points which leads to 0 + 42 which is 42 (exactly the first point of second sphere)
so it connects 0-42 then is skips another 42 so 42+42 = 84 which is out of range (0-83) so it doesnt connect it to any more points
then it process point 1 then skips 42 so it connects 1-43
then 2-44
.
.
.
41-83
and that was the last pair
42-84 doesn't lead to any line, neither any of 43-85, … 83-125 since points 84…125 dont exist
so no more lines are created

EDIT: it does not actually skip 42 points, but as the name of the mode says Skip Every Nth Point, so every 42th point is the point it's connecting to so actually it fully skips 41 points
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
87 posts
Joined: Aug. 2009
Offline
Such an elegant use of Houdini and procedural thinking.

Thanks so much

Alex
  • Quick Links