Cleaning Up Bad CAD Geometry

   3216   3   0
User Avatar
Member
39 posts
Joined: Oct. 2017
Offline
Hi folks!

I'm wondering if anyone here has any good ideas for how to work with bad CAD geo.

Effectively what I want to do is close up seams on my geo to create a nice, well-connected mesh for lodding - this is easy when your starting point is a nicely modelled, watertight geometry and even if it has self-intersections and other nastiness, you can generally clean it up with enough booleans and VDBs.

But what if you have open geometry that's not easily stitchable together?

Here's an example geo - an archway with an open bottom, open back and open top. If it's good geometry, I can simply remesh and polyReduce it to create a wonky LOD:


But when importing CAD data, often faces will not be connected to each other, and worse, they can't even be fused properly because joining edges have different degrees of tessellation:


It's the same shape, but it's not fused together, and it's not really fusable. This means that if you process it further and polyreduce it, gaps in the geometry only get much worse. If the mesh were watertight, converting to VDB could help, but that's not an option here since the geometry's open and there's no reasonable way to cap it.

So I'm wondering if anyone has any good tools for dealing with this? In Houdini or even otherwise?

I'm mainly looking at solutions for LODing, so I'm not necessarily too concerned about maintaining extreme mesh accuracy. I've seen a lot of work lately on automating processing and LODing of CAD data, so I'm wondering if maybe there are any neat workflows for these kinds of problems?

Sample geometry attached!

Alternatively maybe this would be fixed with a decent CAD import, but it doesn't seem like Houdini can handle this is in any decent fashion?
Edited by 9of9 - Feb. 5, 2021 21:13:23

Attachments:
given_mesh_cache.bgeo.sc (4.5 KB)

User Avatar
Member
9380 posts
Joined: July 2007
Offline
there was this magical node called Poly Stitch SOP that was for some reason deprecated so its ophidden now (to unhide type this into textport: opunhide Sop polystitch) (you can also just copy it around once in your scene)

it may be able to help you stitch aligned edges with different amount of points, you may need to adjust some parms per model though
Edited by tamte - Feb. 6, 2021 05:01:23

Attachments:
ts_polystitch_example.hip (97.4 KB)

Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
327 posts
Joined: May 2016
Offline
I played with it and mesh is too far gone for a simple fix. the arch does not have same number of cuts as face/body, left side top bevel is same way, you need to dissolve those angle cuts and edge loop new cuts to get same geometry. In short you would be better served by redoing this with a boolean cube and tube. I have attached a screen shot of what I did along with the file. you will have to play with my file to get it way you want/need it to be or give you and idea of how to get it done. hopefully you will be able to open it, I have Indy
Edited by bobc4d - Feb. 6, 2021 11:07:54

Attachments:
bad CAD geo.png (74.3 KB)
bad CAD geo.hiplc (90.0 KB)

User Avatar
Member
39 posts
Joined: Oct. 2017
Offline
tamte
there was this magical node called Poly Stitch SOP that was for some reason deprecated so its ophidden now (to unhide type this into textport: opunhide Sop polystitch) (you can also just copy it around once in your scene)

it may be able to help you stitch aligned edges with different amount of points, you may need to adjust some parms per model though

That's a neat node! Works wonders for this particular example - wonder why it's deprecated? Fuse node doesn't work half as well.

Seems to have trouble with my geometry in the wild, going to have to play around with it some more :/

bobc4d
I played with it and mesh is too far gone for a simple fix. the arch does not have same number of cuts as face/body, left side top bevel is same way, you need to dissolve those angle cuts and edge loop new cuts to get same geometry. In short you would be better served by redoing this with a boolean cube and tube. I have attached a screen shot of what I did along with the file. you will have to play with my file to get it way you want/need it to be or give you and idea of how to get it done. hopefully you will be able to open it, I have Indy

Thanks for taking a look at it! Yes, this is kind of an artificial problem example of the kind of issue I'm dealing with on a much larger scale - I actually made it specifically out of a few identical booleans at different subdivision levels to replicate it. Problem is the CAD geometry I'm importing that's been converted to OBJ or FBX ends up looking like this, with very different levels of subdivision on different surfaces, which makes joining it all up rather difficult.

The actual CAD data I'm trying to get it to work for is this kind of thing, where the selected edges are open boundaries:



Even with PolyStitch, these are annoying to deal with - it doesn't seem to respond well to the unshared edges here, at best having no effect, and at worst actually creating gaps. Some of these edges do share points, so fuse works on some parts of it, but no combination of Fuse and PolyStitch is enough to entirely weld the geometry together:

Edited by 9of9 - Feb. 6, 2021 20:08:00
  • Quick Links