Jump to content
AlexanderT

Need help to find a way to cut spikes from the objects

Recommended Posts

Hi,

I have a stream of OBJ's with various spikes as a result of photogrammetry issues. Is there a way to somehow select and delete elements of the mesh that have substantial surface but very small connection point to the main mass of an object. Please see the image below.

Thank you!

spikes.jpg

Spikes.OBJ

Share this post


Link to post
Share on other sites

I think your starting point is to find a way to detect these anomalies? maybe use measure sop to measure curvature and gradient (e.g. high change gradient or curvature means it's a candidate point) then smooth these areas... BUT most probably that won't work just detecting these anomalies would be difficult (e.g. many other places in the mesh would have high gradient and yet the are correct)...If some one else have ideas it would be nice to know :)

Share this post


Link to post
Share on other sites

From what I see in the images, your candidates also have a low density of points. 

Maybe you can run a Point Wrangle, then run a nearpoints() function to get the near points in a given volume around your point. Then you store on each point an attribute density = len(nearpoints())/(4/3Pi*power(radius,3))

delete points that have a density below a threshold. Play with the threshold until you identified most of problematic-spiky-lowrez area. And finish manually... should save you some time.

Of course it is based on the assumption that your spikes are low point dentity areas...

You could mix that as well with curvatures (selected areas that have high curvature AND low density of points ?).

Last but not least, you could use a similar attribute that would be based on len(neighbours()) (eg. the number of points that share an edge with your point)==> if your spiky areas are less connected, as you mentionned, you’ll see that as well.

and you can even delete based on these 3 attributes...

Edited by StepbyStepVFX

Share this post


Link to post
Share on other sites

A slightly more brutal approach could be using an Attribute Blur SOP on P and try slightly higher blur values. Or use a DeltaMush deformer, with some non-spiky object as reference object.

If that won't help, is it possible the distance to the nearest points might be different for the spiky areas? You can check that easily using point clouds:
(More on point clouds: http://www.tokeru.com/cgwiki/index.php?title=JoyOfVex20 )
 


 

Share this post


Link to post
Share on other sites

Hi Alexander,

Here is an example.

Play with the thresholds on the various Group Expression nodes (it could have been made into one, but more clear to understand with 3) to select the spikes, expand the groups using the last group node with edge depth parameter, and smooth using Attrib Blur.

By the way, if you don't need to do it on a lot of scanned objects, then don't do it procedurally, just paint your group and blur the group...

Hope this helps

smoothSpikes.hip

Edited by StepbyStepVFX
  • Like 2

Share this post


Link to post
Share on other sites

StepbystepVFX, this is absolutely amazing!!! Thank you so much for this!!! It sure helps a lot, and yes I need to do it procedurally as I load up an obj sequence. Having a lot of ways to fine tune this is also incredible, just what I need.

catchyid and Whatsinaname, thank you for replying, I appreciate your input!

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

×