Jump to content

Is there a fast way to delete all points that occupy the same space?


magneto

Recommended Posts

Hi,

I have a geometry where some points occupy the same space. I want to delete all points that do this, not merge them to a single point so Fuse SOP doesn't work. In my case these points are isolated and also only 2 could be at the same place at most.

I thought of saving some attribute values onto the points but how will I know that the other points are fused since they don't have any relationship to each other?

I thought of using the Snap option with the Point Attributes set to Least and Greatest in 2 separate Fuse operations and then get the difference but it didn't work.

Any ideas?

Thanks :)

Link to comment
Share on other sites

Thanks cwhite, it's doing point cloud lookups. Would this not be expensive for millions of points? If it's the only choice, I will have to use it though :)

I have boxes copied onto points and I want to delete all points and faces that are inside the surface, where they are not visible from the outside. Then I will fuse them to have a closed shell-like surface.

Some boxes might be missing though, so I have to do it in a way that will work for these cases, instead of a perfect NxNxN cube distribution.

That's why I thought of doing it by creating points at the center of each primitive which the inner faces will have 2 points at the same spot, so they will be the faces to remove.

I also tried using rays using the Intersect VOP but firing rays towards the polygon where there are 2 faces with opposing normals do not work. In most cases, both intersect operations return the same face, not the one that's looking opposite of ray's direction. I think this is a bug because intersect shouldn't hit faces where the face normal is facing away from the ray's direction.

EDIT: Forgot the picture:

aQjETsx.png

Edited by magneto
Link to comment
Share on other sites

It shouldn't be too bad if you choose appropriate parameters - in your case, you can make the max search points and search radius very small since you're only looking for a single point within a small distance threshold.

I'm not sure if I'm understanding your problem exactly, but the PolyDoctor SOP has an option to remove pairs of overlapping polygons.

  • Like 1
Link to comment
Share on other sites

Thanks, you are right, I will use very small radius and only 1 point or 2, since it also includes the point itself I think.

I just tried the PolyDoctor SOP but it says the polygons have to use the same vertices. In my case, they are separate :)

So for something like this, all the inner points and faces will be deleted and only the outer/visible faces will remain and fused:

KY9z70Y.png

Edited by magneto
Link to comment
Share on other sites

Also if there are any alternatives, I am open to them :)

I was just foolishly smiling when I checked the cook times of the Clean SOP, until I noticed 10 seconds of calculation, where I realized it was a digital asset so the cook times shown at the top level are not accurate at all.

Motivated by this, I extracted only the nodes I need outside, which are Fuse and Poly Doctor to do the same thing. Unfortunately both are very slow. 10 seconds total for 1 million points is too long.

There has to be a simpler way I think :)

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