Jump to content

Automatically remove interior from double-sided geometry


mottosso

Recommended Posts

Hi all,

There likely does not exist a perfect solution here, instead I'm looking to brainstorm and find the most automatic method by which to detect and remove one of two sides from a double-sided polygonal mesh. The end goal is preparing meshes for simulation with Vellum, of e.g. a t-shirt or pants, that has been modelled with two sides (to represent thickness during render). The simple solution would be to provide a separate one-sided mesh for simulation in addition to the renderable mesh, but when that is not possible the current workflow are as follows.

  1. Recieve double-sided render mesh (of potentially too-high polygonal count and needless edgeloops unsuitable for simulation)
  2. Manually select interior (via e.g. edgeloops and growing of primitive selections) to remove it
  3. Remesh to achieve a uniformly distributed triangular mesh
  4. Profit

The manual step (2) is what's preventing my setup from being applied procedurally to the tens of characters with tens of double-sided geometries each. I'm attaching an example of one such mesh for clarity.

Given that thickness is most commonly - but not always - achieved by extruding a single-sided mesh, there are some assumptions we can make about the extruded side; primarily that each exterior primitive will have exactly one associated interior primitive, and that their normals are facing away from each other. So what I've got in mind is somehow iterating over primitives, finding their closest neigbours and checking whether any of them are (1) unconnected, (2) within a certain distance and (3) faces the opposite way.

That's about as far as I've gotten at this point, and wanted to enquire with the community about whether anyone has tackled a similar issue, or whether there are any ideas along the same lines?

Thanks, Marcus

 

double-sided.png

Edited by mottosso
Link to comment
Share on other sites

Thanks for chiming in @konstantin magnus, that sounds reasonable. Would it be possible to illustrate?

I also considered converting to a volume, and generating a new single-sided mesh from it. Since the mesh is remeshed before use in a simulation, preservation of the topology isn't necessary. It would need to fit somewhat tightly though, and would need to account for folds and nearby parts of itself.

Link to comment
Share on other sites

That's a really good idea, could potentially sculpt something more fitting than a sphere for complex cases like a long-sleeve shirt. I wasn't able to manuever the feature, it didn't seem to respond to changes to the sphere and didn't seem to respond to any changes to the geometry at all. :S Will need to experiment more, but the idea is sound!

Link to comment
Share on other sites

16 hours ago, mottosso said:

Would it be possible to illustrate?

Sure. You can only keep outer walls with this procedure:

  • Group edge 'seams' by min edge angle
  • Promote edges to primitives
  • Shrink the 'seams' group with group expand node
  • Blast 'seams' primitives to remove the extrusion walls
  • Connectivity node to separate inner and outer walls
  • Measure area per piece
  • Promote the maximum area to a detail attribute
  • Remove primitives that do not keep up with the maximum area
  • Remove all attributes we have been using for this

keep_outer_wall.hipnc

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Thanks @konstantin magnus, I've been meaning to come back here once I've taken the approach as far as I can and I think that's where I am now.

In a nutshell, it works well for simple cases where the differences in angles between seam and surface are distinct. I managed to find a way to help increase that distinction for geometry that had sharp angles not part of seams, like t-shirt arms or general wrinkling in the model, by prepending a Smooth SOP.

76683262-2df22380-6603-11ea-8ac2-babc257

It had this nice effect of making uneven surface angles smoother, whilst making seams *sharper*, and works quite well for a few kinds of clothing. I was also able to build on this technique to automatically move the resulting surface to the center of its thickness, even in cases of irregular thickness across the surface. An ideal case for cloth simulation.

The issue I found however was that my clothing is rarely evenly extruded. Part of the interior is often removed; partly for optimisation (as it would never be visible) but likely for ease of editing the clothing after the extrusion. And when the thickness ends shortly after the seam, this smoothing trick doesn't cut it anymore.

Link to comment
Share on other sites

  • 2 weeks later...

Just saw this, that's an interesting approach!. I'll give this a try on the real geometry and see what pops up. And yes, the groupexpand node in 18 also seems to do the trick. I'm still on 17.5 though so the VEX will come in handy. Thanks!

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