AlexanderT Posted September 13, 2019 Share Posted September 13, 2019 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.OBJ Quote Link to comment Share on other sites More sharing options...
catchyid Posted September 17, 2019 Share Posted September 17, 2019 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 Quote Link to comment Share on other sites More sharing options...
StepbyStepVFX Posted September 18, 2019 Share Posted September 18, 2019 (edited) 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 September 18, 2019 by StepbyStepVFX Quote Link to comment Share on other sites More sharing options...
Whatsinaname Posted September 18, 2019 Share Posted September 18, 2019 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 ) Quote Link to comment Share on other sites More sharing options...
StepbyStepVFX Posted September 20, 2019 Share Posted September 20, 2019 (edited) 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 September 20, 2019 by StepbyStepVFX 2 Quote Link to comment Share on other sites More sharing options...
AlexanderT Posted September 21, 2019 Author Share Posted September 21, 2019 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! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.