Cloth's slow speed

   16199   29   7
User Avatar
Member
806 posts
Joined: 10月 2016
Offline
symek
Houdini's cloth manageable as long as optimal conditions are met.

I cannot agree more than I already do.

(albeit old Syflex turned out to be also very accurate).

Syflex is very fast, but I wouldn't call it “accurate” when it comes to *physical* simulations. You have to “play” with parameters to make the results *look* plausible. But since it is fast and stable, that is actually more fun than using a “physically correct simulation”, that just takes ages to cook.

Interestingly, once your mesh is optimal the solver doesn't seem to care much about polygons count.

Which, with FEM, is to be expected, since FEM stands for “Finite Element Method”, your mesh gets “replaced” by the specified amount of (finite) elements. That's the whole magic. So it doesn't matter how many polygons your mesh has: FEM is replacing it anyway.

Marc
---
Out of here. Being called a dick after having supported Houdini users for years is over my paygrade.
I will work for money, but NOT for "you have to provide people with free products" Indie-artists.
Good bye.
https://www.marc-albrecht.de [www.marc-albrecht.de]
User Avatar
Member
1390 posts
Joined: 7月 2005
Offline
malbrecht
(…) Which, with FEM, is to be expected, since FEM stands for “Finite Element Method”, your mesh gets “replaced” by the specified amount of (finite) elements. That's the whole magic. So it doesn't matter how many polygons your mesh has: FEM is replacing it anyway.
Marc

I'm hardy an expert, but I wouldn't expect FEM solver is re-discratizing mesh it creates elements on. I would rather assume it builds elements (tetra, cubes, whatever) based on provided polygons. In that sense the denser mesh is, the more elements end up in a solver and this does influence execution time obviously. The magic of FEM you mentioned AFAIK comes from the mathematical fact of Galerkin methods that density of discratization of the function domain hardly influences accuracy of PDE solves, the solution of the problem approaches the continuous (ideal) value. It's only smoother, but not biased (similarly to how unbiased monte carlo estimates value of a function minus high frequency of it).

In case of cloth I presume the problem is that less polys causes less elements which makes collision response less accurate or false positive. It injects a lot more energy/noise to the system, and makes solver's life harder (more iterations per step).
Speculating again .
Edited by symek - 2018年3月23日 07:53:28
User Avatar
Member
806 posts
Joined: 10月 2016
Offline
I wouldn't expect FEM solver is re-discratizing mesh it creates elements on. I would rather assume it builds elements (tetra, cubes, whatever) based on provided polygons.

It isn't rebuilding the mesh, instead, the (rendered) mesh is “wrapped” around the (tets) elements that get “filled” into the (closed) mesh. For single-plane sims, a virtual “mini-volume” is filled with tets. You can actually display the tets making up the simulated “blob” in Houdini.
In that respect, yes, the number of tets will increase if your mesh gets more complex. But the number of tets is not dependent on the number of polygons of the original mesh. You can influence how many tets are being used to represent the reference mesh.

Marc

P.S. I may be completely wrong, but this understanding is how I have been using the FEM cloth approach in Houdini so far, with some good results …
---
Out of here. Being called a dick after having supported Houdini users for years is over my paygrade.
I will work for money, but NOT for "you have to provide people with free products" Indie-artists.
Good bye.
https://www.marc-albrecht.de [www.marc-albrecht.de]
User Avatar
Member
2631 posts
Joined: 6月 2008
Offline
There are reasons for simming multiple layers of cloth. Consider the clothes you are wearing right now. One of the nice things about Marvelous Designer is building up layers of garments on top of one another. But even in MD the workflow is to simulate the lower levels first then “freeze” them in place and simulate the next layer on top. This approach can work in Houdini as well.

My problem with Houdini Cloth is in garment creation. It basically fails after you stitch more than a few piece together (i.e front,back,sleve,cuffs is too much). So the creation of complex garments is not practical in Houdini 16.5 yet. You can import a pre-created garment in layers and should be able to sim/conform to your character. The less stitching involved, the better the success.
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
1390 posts
Joined: 7月 2005
Offline
malbrecht
You can actually display the tets making up the simulated “blob” in Houdini.
Oh, this is interesting. I was suspecting it's intrinsic for a solver, as I've never seen it in the spreadsheet. There is ShellModelData DOP for setting properties of the shell (which I thought was created straight from provided polygons). Could you point me to the example on how to see tets for cloth objects? This must be totally useful for work.
Edited by symek - 2018年3月23日 09:41:54
User Avatar
Member
806 posts
Joined: 10月 2016
Offline
I am not at a Houdini-fied system right now, but if I remember correctly: When you create a FEM object, the embedded tets get their own “node-thread” inside the mesh/geometry network (outside the DOP network), there is a parallel “render geometry” and a “FEM tets” thread after you created a FEM based simulation.

The “cloth” shelf tools are not “100% FEM” if I remember correctly. I asked SideFX about what simulation type 16.x is actually using for cloth, since the shelf-tool-cloth sims don't behave like PBD and don't behave like FEM. I think it actually is a kind of hybrid when you use those tools.

Marc
---
Out of here. Being called a dick after having supported Houdini users for years is over my paygrade.
I will work for money, but NOT for "you have to provide people with free products" Indie-artists.
Good bye.
https://www.marc-albrecht.de [www.marc-albrecht.de]
User Avatar
Member
1390 posts
Joined: 7月 2005
Offline
malbrecht
I am not at a Houdini-fied system right now, but if I remember correctly: When you create a FEM object, the embedded tets get their own “node-thread” inside the mesh/geometry network (outside the DOP network), there is a parallel “render geometry” and a “FEM tets” thread after you created a FEM based simulation.

The “cloth” shelf tools are not “100% FEM” if I remember correctly. I asked SideFX about what simulation type 16.x is actually using for cloth, since the shelf-tool-cloth sims don't behave like PBD and don't behave like FEM. I think it actually is a kind of hybrid when you use those tools.

Marc

OK, I see now where this misunderstanding came from. I aware of embedding geometry in solid object, but afaik FEM cloth uses different schema in Houdini.

FEM itself doesn't imply any specific element type, as you may know. It can work on triangles, quads, tetra, cubes, but 2d element type doesn't allow you to model easily physical properties of a material (like bend).

I don't know what SESI solver is actually doing, but in a typical setup (used in papers and source codes I've seen) the way you model 3d behavior out of 2d object (approximating thin plate) is by placing so called ghost vertices around the mesh which form 3d element (tets or cubes) on top of it. You can even compute spring forces with PBD with such elements or do full FEM simulation. Hairs are usually modeled for sims this way (most probably in nCloth for example).

I assume Houdini does something along this line. Otherwise it would have to arbitrary re-discretize mesh - what apparently isn't happening(?) (thus this conversation leads us to the conclusion of the importance of the quality of initial mesh. Another subject is how this quality influences collision detection and false positive hits).

Interesting observation is that some solvers (marvelous) actually requires UV to exists on a mesh, and by enforcing elegant 2d space you're giving your solver a lot of understanding in how to treat deteriorated polygons, and how to repair the mesh for a sim…

I should probably leave this subject long time ago knowing someone who has actually written this awesome solver might stumble upon this thread… I'm now embarrassed.
User Avatar
Member
806 posts
Joined: 10月 2016
Offline
Please - no - don't be embarrassed! Even if we are all just plain wrong (which I don't believe we are), every discussion, every thought, every brainstorm can shed some light on the topic.
And may help one or another looking for ideas how to solve a problem!

(That said, I am pretty sure Houdini's docs say that Houdini uses tets and tets exclusively for FEM - and I *think* I remember it also saying that a FEM cloth is being created by adding virtual thickness. But I am not sure which part of the docs actually said that - I wish the docs would include developer tidbits that give some behind-the-scenes insights. I find reading a source code often more helpful than studying the PR material …)

Marc
---
Out of here. Being called a dick after having supported Houdini users for years is over my paygrade.
I will work for money, but NOT for "you have to provide people with free products" Indie-artists.
Good bye.
https://www.marc-albrecht.de [www.marc-albrecht.de]
User Avatar
Member
1390 posts
Joined: 7月 2005
Offline
malbrecht
That said, I am pretty sure Houdini's docs say that Houdini uses tets and tets exclusively for FEM - and I *think* I remember it also saying that a FEM cloth is being created by adding virtual thickness

We are talking about the same thing. Virtual thickness can be modeled by placing additional vertices (labeled ghosts as they don't collide) around triangles to form tets with them. The only controversy we have here is whether these tets are formed from the original mesh (thus following its density), as I speculate, or built upon some parameters as in case of Solid Object (as suggested by you afaik). I've not seen such possibility for cloth object, thus my confusion. I think we have to wait for SESI to answer this. Also birds say there is new solver coming, so our findings might quickly become obsolete.

Yes, Houdini uses tets solely, but general concept of FEM allows other elements too. You could model and simulate cloth from triangles or quads without any virtual thickness, but then you need a way to model 3rd dimension behavior of cloth material.
Edited by symek - 2018年3月23日 10:48:18
User Avatar
Member
978 posts
Joined: 4月 2008
Offline
Awesome thread! I've learned a lot from it but going back to the drawing board.

I was hoping to use this thread to get any more tips that can help to deal better with the current cloth solver, I find the documentation on this regard comparing to Pyro or Mantra lacking more information to deal with cloth.

I am currently trying to solve a 3 layered garment cloth not that complex, I get good results with 2 layers when I start to have a 3rd layer then things go south.

I've tried so far:

-Maintain the real world scale;
-Change the collision radius;
-I've tried to figure out which situation is better to have more substeps or more collision passes any tips here would be nice;
-Poly reduce sometimes doesn't make much difference to reduce that much also is hard to tell if a higher mesh is better to help calculate the collisions, is it?;
-I also tried to adjust the mesh so it doesn't penetrate in the beginning.

I forgot to mention that the garment came from Marvelous, it seems fine regarding to penetrations in the start pose.

Maybe it would be nice to Sidefx to make a new updated cloth masterclass things changed quite a bit since the last one.

Anyway thanks for the explanations already given here.

Cheers!
https://vimeo.com/user2163076 [vimeo.com]
  • Quick Links