Jump to content

Alternative to Fuse SOP?


Skybar

Recommended Posts

I'm consolidating points with a Fuse SOP. It doesn't seem to be multithreaded, so it's understandable that it isn't very quick. When cooking a frame the Fuse makes up about 95% of the total cooking time, which is quite a lot. Are there any faster ways to consolidate points like the Fuse SOP does, preferably multithreaded?

Link to comment
Share on other sites

Depending on your case and if you haven't tried it unchecking remove degenerate, update point normals and use accuarte distance might give you a speed up. Using muliple threads to fuse a mesh seems rather hard since alot of locking would have to occure to make sure that connectivity information won't get lost.

Link to comment
Share on other sites

I recently tried to do a fuse on a 60mil points point cloud to get rid of duplicates, and after running on one thread for ~15 mins it started to eat up all 64gigs (!) memory of my work machine. :) So it can be risky with heavy geometry.

Perhaps the process could be speeded up by a VEX-pointcloud preprocessing that finds duplicate points and group them. The run the Fuse SOP only on that group.

Link to comment
Share on other sites

  • 5 months later...
  • 2 years later...

I was googling for fuse slowness, and didn't find anything else so here goes.

I was bit by the same thing when dealing with increasingly higher poly count meshes. It felt like there is some O(n^2) algorithm in there (feels natural for a fuse-like operation) so I thought a bit of divide-and-conquer would help here.

I partitioned my geo to octants with a bit of vex like

int getOctant(float x; float y; float z)
{
    int octant = 0;
    if ( x > 0 )   octant +=1;
    if ( y > 0 )   octant +=2;
    if ( z > 0 )   octant +=4;
    return octant;
}

and then put the Fuse SOP in a Foreach, set to process Each Attribute Value with attribute set to the above octant. 

With my test geo of 14mil polys, that cut the Fuse time from 3.5 minutes to 1 minute, and the mem looked to be lower too. With higher counts the difference is of course larger, I just didn't want to wait for the results :)

For increased effect, you could of course partition the geo further.

 

(The eagle-eyed reader must've noticed that this leaves 3 planes of unfused points along the axis planes. You could create a group with a rule like "abs(x) < 0.1 || abs(y) < 0.1 || abs(z) < 0.1" and run a final fuse on that group.

 

A proper fuse with a pointcloud acceleration structure would of course be the better option here, as Riviera alluded above.

(In my use case all polys are separate and all points are needed for the fuse, so just tagging the points before fuse wouldn't have helped me)

Edited by eetu
  • Like 1
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...