Jump to content
Sign in to follow this  
mottosso

Automatically remove interior from double-sided geometry

Recommended Posts

Posted (edited)

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

Share this post


Link to post
Share on other sites

Detect and remove the extrusion sides surrounded by their sharp normal angle and only keep the part with the greater surface area. 

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
Posted (edited)

It looks like if you put a sphere inside the garment, you can group by primitives that face away.

Untitled-1.jpg

Edited by Atom

Share this post


Link to post
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!

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Cool, the measure idea is a nice way to ensure you don't remove the large groups.

I believe the Group Expand node is new to Houdini 18, just FYI.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Hi Marcus, I don't think there will be an easy and reliable solution to this. Anyways, could you possibly provide a few example files?

Share this post


Link to post
Share on other sites

Hehe .... try this.... description is in scene ..... sensitivity is keyed for every input geometry because they are very distinctive but it works properly on all geos you provided.

 

keep_outer_side_examples_djiki.hipnc

 

cheers

  • Like 2

Share this post


Link to post
Share on other sites

noice....but now that I've had an idea of your VEX...the same (near identical) result can be achieved (for non VEXers) by using groupexpand, flood, restrict by normals...~22 degrees

Share this post


Link to post
Share on other sites

well, yes in new Houdini v18 GroupExpand is implemented  (finally)  

Share this post


Link to post
Share on other sites

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!

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
Sign in to follow this  

×