Cloth's slow speed

   5644   29   7
User Avatar
Member
96 posts
Joined: May 2006
Offline
I have researched the problem a little and this seems to crop up every so often.

The issue is the slow, slow speed of the cloth simulations in houdini (16). Of course I may be missing a trick but this is the only area I am really having to leave Houdini and head elsewhere (and to maya of all places…."). For most general purposes (in this instance a grotty torn sail on a derelict ship in light wind) ncloth is much, much quicker and gives perfectly acceptable results.

For example in the time Houdini had in the background simulated just 15 frames I had brought the two OBJs into maya, set up and simulated 100 frames ready for export.

Hopefully it is just me? I understand Houdini's may be more accurate and ultimately beautiful if allowed to run but I am hoping there is a way to get fast results that are ‘good enough’ for background elements and the like and I have to say nCloth does give very, very acceptable results.

Thanks,
Rich.
User Avatar
Member
573 posts
Joined: Oct. 2016
Offline
Hi, Rich,

it's hard to tell without having any really comparable data to tell if you hit a limitation of Houdini's two cloth solving methods (FEM and position/spring based) or haven't used all tricks available. Yes, I will try to address some optimization approaches in my cloth-course, but in general:

- the more “physically plausible” (if not to say “accurate”) you want a simulation to be, the slower it will run
- for “hero” objects a “plausible” simulation may or may not be what you want, this may be a fundamental decision. You *may* want to have a fully “artistically directable” solution (there are very, very fast “cloth solvers” out there that have almost nothing in common with real-world behavior but are considered “perfect” by art directors)
- for background objects, you might get much faster results with low-resolution simulations (small number of FEM objects or even a position based solver) and just project the result to your high-resolution geometry
- make sure to only use collision detection where you actually need it. Switch off collision detection if you only need the cloth simulation as such. Don't use self-collision detection when not needed, either.
- consider using a rig-based solution where applicable (i.e. rig your sail with bones and add a basic IK driving velocity-field to move the bones) if possible
- consider using a muscle based setup (Houdini's new muscles are quite capable of helping with cloth-look-alike stuff)

I hope any of these ideas are of help. Again: There are MUCH faster solutions out there but that isn't to say that they are *better*.

Marc

Software Sewers Service (aka Pipeline Problems Solver)
https://www.marc-albrecht.de [www.marc-albrecht.de]
User Avatar
Member
96 posts
Joined: May 2006
Offline
Hi Marc, thanks for the prompt reply!

I certainly haven't exhausted all the options you mention (I will be running through them though as well as trying carbon for future shows/shots).

I do unfortunately need collisions on for this shot (the sail is wrapped around and held in place by a broken mast) and I did note it had a huge impact on the speed. I have to render the shot tonight for morning dailies so will stick with the nCloth version this time, but this will be a good test scene to run through the list.

Thanks again, I would like to have a ‘fast mode’ for cloth implemented for those times the art directable, quick options (coming from Soft I would say syflex I guess) would be preferable, especially in a lot of TV work where you have to blitz through shots.

Thanks again,
Rich.
User Avatar
Member
573 posts
Joined: Oct. 2016
Offline
Hi, Rich,

one thing to keep in mind when doing cloth simulations is that it often works quite well to get the LOOKS done first and the DETAIL later - meaning: If you can “orchestrate” the simulation WITHOUT collision first, to get the overall “feeling” of the fabric, it makes sense to get everything set up without collisions first and then only use collision detection on the final sim.
Also, check collision types. If your sail does not need to cause impact to whatever it collides with, the non-affected objects don't need to be FEM objects. Using a mix of FEM (for the cloth) and RBD can be significantly faster. It's possible that a grains solver is better suited for your specific setup, too.

And yes … syFlex is blazingly fast, I love it. Getting “realistic” results out of it can be challenging - but who cares if you can basically do everything in realtime :-D

Marc

Software Sewers Service (aka Pipeline Problems Solver)
https://www.marc-albrecht.de [www.marc-albrecht.de]
User Avatar
Member
96 posts
Joined: May 2006
Offline
Thanks Marc, swings and roundabouts I guess!
Hopefully carbon will allow me to do quick things when needed without going to the *m* word
User Avatar
Member
1320 posts
Joined:
Offline
Hi

I hate to say this as I'm a huge Houdini fan, but unfortunately Houdini's cloth is not a viable option for not only cloth in production, but any cloth whatsoever, this is one area the Houdini fails to deliver, hopefully one day SESI will re-look at the method they using for cloth solving.

We had a chance to try Carbon here a while back, the results where pretty impressive and easy to setup. For now we use ncloth(unfortunately), and for complex character clothing we use Marvelous designer.

j
HOD fx and lighting @ blackginger
https://vimeo.com/jasonslabber [vimeo.com]
User Avatar
Member
573 posts
Joined: Oct. 2016
Offline
> Houdini's cloth is not a viable option for not only cloth in production, but any cloth whatsoever

wow. What a statement. I guess what I have done for the last production I worked on was all in my dreams.

With that I am out of this “discussion” - I don't have time for destructive dissing.

Marc

Software Sewers Service (aka Pipeline Problems Solver)
https://www.marc-albrecht.de [www.marc-albrecht.de]
User Avatar
Member
1320 posts
Joined:
Offline
Sorry it's not destructive or dissing… I'm a long time Houdini user, this is the last thing I would want them to think I'm doing.

It's just well, the reality of the situation is that we have never been able to achieve anything the looks good at all…
Do you have any examples of good cloth done in Houdini?

J
HOD fx and lighting @ blackginger
https://vimeo.com/jasonslabber [vimeo.com]
User Avatar
Member
573 posts
Joined: Oct. 2016
Offline
You know, it seems - in recent years - that forums are being used to tell people what is NOT possible in a software. I don't know what you would call “good cloth simulation” (the problem being that a lot of cloth simulation I see in movies is, in my eyes, just plain bad - because it's “artistically directed”, not “physically plausible”), so I cannot really help you with examples.

However, I can tell you that the last Mica cloth sim I did on Trollbridge was using Houdini 16.0. It took me 24 minutes to do the complete shot including all import, export etc. - a shot that I had “simmed” two years ago using modo. In modo this shot took me, all in all, about 50 hours. And the TD was happy with the result. That is: in both cases.
It would have taken me roughly about 3 minutes to do it in syFlex, I know. But unfortunately I only have syFlex for modo, not for Houdini - and using modo would have pumped those 3 minutes up to 2 hours including all the crashes.

My “job”, when I work for companies, studios and whatsnots, usually is to solve problems, not to be the problem. Telling people what is not possible creates problems because it breaks creativity and stops people from THINKING.
Telling people what could be better and where exactly the problems are (omitting phrases like “good-looking” because that, obviously, is highly subjective) would be productive and might lead to improvements.

Marc

P.S. sorry for answering, I promised to shut up :-D
Edited by malbrecht - Nov. 15, 2017 10:07:20

Software Sewers Service (aka Pipeline Problems Solver)
https://www.marc-albrecht.de [www.marc-albrecht.de]
User Avatar
Member
1320 posts
Joined:
Offline
I definitely agree with you on the first point, not only for cloth but a lot of simulations nowadays, we try a hardest to create realism, but directors just mess it all up by art directing the crap out of it..

I hear you on your last point, In this industry I/we are constantly trying to solve problems, I'm my experience it's better to tell someone sooner than later that the approach they are trying is not going to work. There's no point in letting a artist bang their head against the wall when you know it's just not going to work!
Edited by JasonSlab - Nov. 15, 2017 10:24:51
HOD fx and lighting @ blackginger
https://vimeo.com/jasonslabber [vimeo.com]
User Avatar
Member
96 posts
Joined: May 2006
Offline
I don't think it's a case of possible/not possible; just the speed of calculation.
User Avatar
Member
6484 posts
Joined: July 2005
Offline
Marc, I look forward to your tutorials on cloth especially if you're able to compare to Carbon to achieve the same or similar speeds. I think someone like yourself who has found success with the cloth has a lot to offer the rest of us who haven't (yet) found that success.

We use Carbon, as it's much, much faster as has been pointed out. We also still use Maya a lot too.

As many know, I'm a bit of a Houdini zealot and would prefer Houdini over everything, for everything, but the sad realities of deadlines and volume of work mean you must pick the best tool for the job.

I've seen Houdini's cloth get better and better over the years, but it definitely has a ways to go from a speed perspective.

Cheers,

Peter B
User Avatar
Member
573 posts
Joined: Oct. 2016
Offline
before this gets out of hand:
I am in no way saying that Houdini's cloth is better, faster or more fluffy than anything else. I merely refuse to accept “it's unusable” (for cloth sims).
What I am trying to do with the tut is help people get started and, hopefully, get some problems solved. I am the first, third and last to keep repeating: USE THE TOOL THAT GETS THE JOB DONE. Don't be religious about tools, except maybe with religious tools.

If you don't have access to … xyz, but Houdini is a choice, you can use Houdini to do (good) cloth simulations. That's all I want to help people with. Not replace specialized solutions.
Plus I want to be fair. A general purpose tool - like Houdini - most likely will be inferior to specialized tools. The question is: DO you have the resources to go specialized? If yes, do so. If no, that's where I think cooperation, R&D and creating tutorials that help others comes in handy.

Marc

Software Sewers Service (aka Pipeline Problems Solver)
https://www.marc-albrecht.de [www.marc-albrecht.de]
User Avatar
Member
4127 posts
Joined: June 2012
Offline
malbrecht
However, I can tell you that the last Mica cloth sim I did on Trollbridge was using Houdini 16.0. It took me 24 minutes to do the complete shot including all import, export etc. - a shot that I had “simmed” two years ago using modo. In modo this shot took me, all in all, about 50 hours. And the TD was happy with the result. That is: in both cases.

Hey Marc, show us that cloth that took 24min please. I want to be able to point to it to show directors what can be done.

Thx!
User Avatar
Member
573 posts
Joined: Oct. 2016
Offline
contacting you directly - the “higher ups” right now aren't too keen on getting the final bits published before release.

Software Sewers Service (aka Pipeline Problems Solver)
https://www.marc-albrecht.de [www.marc-albrecht.de]
User Avatar
Member
4127 posts
Joined: June 2012
Offline
Overall what is confusing is that SESI keep pushing out new showcase FEM tools like muscles, wrinkly skin etc without fixing foundational basics such as collisions for cloth. Considering that H13 introduced FEM, over 4 years ago, priorities for robust production level tools seems to be off tbh.
User Avatar
Member
1865 posts
Joined: June 2008
Offline
The best way to achieve quicker sim times with cloth is to not overload it with too many polygons.

If your cloth object has more than a couple of thousand primitives, expect long sim times. But if you keep your cloth objects light and low poly they will sim quickly. Then you can use the Cloth Deform node to migrate the low poly simulation to the high poly render mesh.
Using Houdini Indie

Windows 7 32GB AMD FX8370 @ 4.1Ghz
nVidia 1070GTX 8BG RAM. Driver: 397.31
User Avatar
Member
1320 posts
Joined:
Offline
Enivob
Then you can use the Cloth Deform node to migrate the low poly simulation to the high poly render mesh.

I would suggest trying the point deform SOP rather, it's much quicker!
HOD fx and lighting @ blackginger
https://vimeo.com/jasonslabber [vimeo.com]
User Avatar
Member
573 posts
Joined: Oct. 2016
Offline
Aside from the question why anyone would WANT to “sim” a three-layer-cloth anyway … my first suggestion is, of course, to separate the sims into layers, too. Bake sim to the inner layer, sim the middle layer, bake that, sim the outer layer.

If you can use PBD (with its drawbacks), use the grains solver. It “handles collisions better” in certain situations.

Use the tool that fits the job

Marc

Software Sewers Service (aka Pipeline Problems Solver)
https://www.marc-albrecht.de [www.marc-albrecht.de]
User Avatar
Member
1388 posts
Joined: July 2005
Offline
As much as I would like to agree with most skeptical comments above, I have (recently) found Houdini's cloth manageable as long as optimal conditions are met.

We were able to get decent results after carefully preparing meshes. Beside intersection free initial state, polygons can't be too small or stretched - which at sight makes it hard to apply on typical cloth mesh with folds on a sleeves and such). They basically should be similar shape and size (because solver makes volumetric (tetrahedral) representation internally I presume and solving PDE iteratively requires solid numbers - me speculates). You can get nice speed up just by that.

I don't think we are in a place where I would use Houdini cloth without hesitation on every project, but I managed to finish not-so-hard character shots without pain in hours, where FEM cloth with polygon collisions was faster than FEM with volumetric collisions, and only 2-4 times slower than PBD. The quality was superior from any other thing we usually use (Qualoth, nCloth, PBD), which is expected from FEM (albeit old Syflex turned out to be also very accurate).

Interestingly, once your mesh is optimal the solver doesn't seem to care much about polygons count. I think I was simulating 140K poly cloth with no need to downres it as it was easier to just let it go a little longer rather than going down and up with the proxy.

I was specially surprised that collision proxy mesh (body) end up faster than volumetric one at the moment its density was chosen right.

Generally speaking we do recently a lot of FEM solves, and I'm totally amazed by the speed of that thing (compared to a couple of open source solvers I've tried (Vega, simit, ebb, Cubica++) and previous releases). Apparently the missing part is how solver handles deteriorated meshes and collisions. Cloth needs extra care to make it feasible (like merging small polygons?).

Final remark is that we really do a lot of character related work in Houdini right now and I would love to do even more. Our animation lead considered even skinning in Houdini, as biharmonic makes it super easy to apply on Maya's rigs. Having solid support for character effects would be really a game changer. Today's realm is that we pass almost every animated mesh from Maya through Houdini to add secondary motions, clean up, merging different caches, and doing fur and hair obviously (although I can't imagine how grooming in Houdini could become so slow again).

Sorry for a long post,
Szymon.
Edited by symek - March 23, 2018 07:23:02
  • Quick Links