mottosso Posted March 3, 2020 Share Posted March 3, 2020 (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. Recieve double-sided render mesh (of potentially too-high polygonal count and needless edgeloops unsuitable for simulation) Manually select interior (via e.g. edgeloops and growing of primitive selections) to remove it Remesh to achieve a uniformly distributed triangular mesh 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 Edited March 3, 2020 by mottosso Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted March 4, 2020 Share Posted March 4, 2020 Detect and remove the extrusion sides surrounded by their sharp normal angle and only keep the part with the greater surface area. Quote Link to comment Share on other sites More sharing options...
mottosso Posted March 4, 2020 Author Share Posted March 4, 2020 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. Quote Link to comment Share on other sites More sharing options...
Atom Posted March 4, 2020 Share Posted March 4, 2020 (edited) It looks like if you put a sphere inside the garment, you can group by primitives that face away. Edited March 4, 2020 by Atom Quote Link to comment Share on other sites More sharing options...
mottosso Posted March 4, 2020 Author Share Posted March 4, 2020 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! Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted March 5, 2020 Share Posted March 5, 2020 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 1 Quote Link to comment Share on other sites More sharing options...
Howitzer99 Posted March 5, 2020 Share Posted March 5, 2020 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. Quote Link to comment Share on other sites More sharing options...
mottosso Posted March 16, 2020 Author Share Posted March 16, 2020 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. 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. Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted March 16, 2020 Share Posted March 16, 2020 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? Quote Link to comment Share on other sites More sharing options...
mottosso Posted March 20, 2020 Author Share Posted March 20, 2020 @konstantin magnus Sure, I mocked up some examples of clothing that represents what we're dealing with. Two of them are from the "DemoSoldier" ZBrush project, and the other two are modified from the Houdini "Test Geometry: Tommy" keep_outer_side_examples.hipnc Quote Link to comment Share on other sites More sharing options...
djiki Posted March 24, 2020 Share Posted March 24, 2020 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 2 Quote Link to comment Share on other sites More sharing options...
Noobini Posted March 24, 2020 Share Posted March 24, 2020 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 Quote Link to comment Share on other sites More sharing options...
djiki Posted March 24, 2020 Share Posted March 24, 2020 well, yes in new Houdini v18 GroupExpand is implemented (finally) Quote Link to comment Share on other sites More sharing options...
mottosso Posted April 5, 2020 Author Share Posted April 5, 2020 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! 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.