Jump to content
CinnamonMetal

Pop Attract with set of points ?

Recommended Posts

The attract points node within a POPNet attract a point to another point. What if one of the points is representing a primitive; how could I get the four points of a quad primitive to snap to the nearest points of a polygonal sphere; while the point of the quad primitive is directed by a POPNet. I hope that was understood. Remember there two different set of points / point, one is controlled by a POPNet, the other is the Primitive which is made up of the point.

When the point representing the quad primitive is within distance of a sphere, for example; the four points on the sphere meet with the nearest four points on the sphere.  

I was thinking of opening the point cloud of the primitive but I don't know how to get attract points within a POPNet to use the point cloud of the primitive rather then the point representing the primitive ?

Share this post


Link to post
Share on other sites

maybe with a draw or something would be easier to understand what you need.

Share this post


Link to post
Share on other sites

The attract points node within a POPNet uses the middle point of a primitive or more then one primitive to attract its self to the points of the target geometry in my case.  

Rather then the one point which is center of the primitive; the four points of the primitive are used instead, attracting them-self to the target geometry ?

primwpoints.png

Share this post


Link to post
Share on other sites
Posted (edited)

Here is an example scene with various ways to get points on a surface.

BLUE = Vertex

RED = Primitive Center

GREEN = Scatter

PopAttract works a lot like PopSteerSeek in the fact that you can override the goal variable (a fixed vector at world origin) with a companion goal point via VEX code. A particle can only be attracted to one point, not four, but each particle can have it's own unique goal on a surface.

 

Untitled-1.jpg

ap_points_buffet.hiplc

Edited by Atom

Share this post


Link to post
Share on other sites

If a point can only be attracted to one point, but the one point controls a primitive made up of three or four points; is there a way to get those three or four points of the primitive to snap to the nearest points on the target mesh ?

Share this post


Link to post
Share on other sites

But what is the nearest point? If you want the center point of those 4 points just use compute dual as I have shown in the example file, represented by the red points.

Share this post


Link to post
Share on other sites

The nearest point which would be the three\four points of the primitive which come close to the target mesh.

I have the center point for each primitive; if the center point is controlled by the POPNet; how can I get the three/four points that make up the primitive to which the center point is controlling to attract to the nearest point of the target object; whatever the target object is, let say in this case a sphere ?  

Share this post


Link to post
Share on other sites

Just fetch the primitive then get the points.

Share this post


Link to post
Share on other sites

Why don't you just post a scene of what you already have?

Share this post


Link to post
Share on other sites

In the scene, you'll see the primitive which have a center point; attract to the nearest point on the sphere.  Although what I want is for the four points as well on the primitive to attract to the nearest points on the sphere. Unless someone has another solution to this ?

One caveat, I realize that more sub-divisions on the sphere will be required unless the goal is to have the points on the primitives to stretch to the nearest point on the sphere.

LoopDeletePrim2_odup.hipnc

Share this post


Link to post
Share on other sites
Posted (edited)

So you want the rectangles to conform to the sphere? Perhaps you could make the rectangles cloth then set the sphere as a collision object for the cloth but make the cloth rectangles seek the center of the sphere.

If you want the rectangle to stretch to fill the area of a primitive on the sphere check out this link.

 

 

Edited by Atom

Share this post


Link to post
Share on other sites

Actually, using cloth is something I considered. 

Quote

If you want the rectangle to stretch to fill the area of a primitive on the sphere check out this link.

The link you posted, fills the primitive with an object. I want the primitive to, I guess you could say; snap to the nearest point on the sphere.

The center point, snaps to the nearest point on the sphere, while the other points on the primitive snap to the other nearest points on the sphere

Share this post


Link to post
Share on other sites

You could make the object a rectangle. It does not have to be an irregular shape.


Is the snapping part of the animation (like one part first, then the other parts) or is that just a descriptive word to indicate the modeling locks in.

Share this post


Link to post
Share on other sites
Quote

Is the snapping part of the animation (like one part first, then the other parts) or is that just a descriptive word to indicate the modeling locks in.

You're on track with the first part of what you said; then again not quite sure what you meant by "the modeling locks in".  Did you mean piece by piece ?

3 minutes ago, Atom said:

You could make the object a rectangle. It does not have to be an irregular shape.

Going by the link which you posted, if that is what you're referencing; I hope.  I want the primitive too not snap as it to look clean. By it finding the nearest point on the sphere then as you mentioned in what I quoted above, things are not clean and look more natural when the other parts come into play so to speak.

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

×