Terribly slow Cloth on this character (dragon)

   6731   10   2
User Avatar
Member
304 posts
Joined: May 2006
Offline
Hi.
Here´s a scene imported from another package content (Lightwave).
It´s a dragon where I want the wing membrames to use cloth.

In the mentioned software, bullet-based cloth takes a second per frame to solve. Addmitedly, bullet ain´t very accurate, but it solves very well the geometry at an acceptable rate.

Now, this very scene imported to Houdini, takes forever to solve. If I deactivate the wing animation, it solves at an acceptable rate, but as soon as I want the wing to follow its original animation, the whole thing crawls painfully.
I know it´s somehow related to the constrains I´m using, but I don´t know of a better way to do this.

I´m getting right now about 30 seconds per frame with an ugly looking simulation, so it´s far from acceptable, specially considering the one-second per frame good looking solution in Lightwave.

Also, on a related note, the REALLY OUTDATED documentation on Cloth, states I can assign the attributes “animation stiffness” or “animation damping” from SOPs, which is obviously an error because attributes don´t like spaces into their names. I´ve tried “animationstiffness”, “animation_stiffness” and even the clearly wrong “animation stiffness” to no avail. Anybody could tell me the proper name for this?

Even more damaging is that usually in this cases the help files give me good hints, but here the example file suggested at the docs for Cloth is called “TODO” which clearly tells me isn´t there yet. This coupled with the recent Cloth Masterclass being the first in quite some time not uploading the example videos/scenes tells me something fishy is going on with the Cloth Solver work at SESI currently.

Any ideas what I´m doing wrong?

Attachments:
DragonClothSetupProblem.rar (1.9 MB)

Javier Meroño
FX TD.
User Avatar
Member
55 posts
Joined: Jan. 2006
Offline
I took a look at your scene and poked around a little bit. I like your painting attribute to group setup. I just love the paint SOP, I only wish it could be animated easier than a $F switch and a paintSOP for every frame.

First take of plasticity. You most likely won't need that and it's certainly eating up cycles. I'm not sure what you need the wing to do, so this might not help, but if you took off all collisions it would also run faster.

Good luck and let me know how it goes and if that helps.
“If you can eat it raw you can't under cook it”
User Avatar
Member
304 posts
Joined: May 2006
Offline
Hi kleer01. Thanks for checking my issue.

I deactivated both plasticity and collisions and the whole thing still crawls, so the problem must be somewhere else.
I still think something with the constrains is really dragging down the sim, but I don´t know how else I can make the wing keep its animation.
Javier Meroño
FX TD.
User Avatar
Member
55 posts
Joined: Jan. 2006
Offline
That weird. When I stepped through those frames on your scene they were running about 4 seconds a frame. When I took off those things it was about 1 second a frame. I'm on a 3,06 GHz MacBook Pro with 8GB of ram.

Writing geometry directly out through a ROP will save you a little bit of time. But on the whole my experience with the cloth solver is that it's not the fastest thing around and no way is it going to run real time. Maybe try NCloth in Maya if you're really constrained by time.

I'm not exactly sure how, but you might want to try and simulate the wings with wires instead of full cloth.
“If you can eat it raw you can't under cook it”
User Avatar
Staff
429 posts
Joined: June 2007
Offline
Hi Javier,

The main issue with this file is that it is modeled as a double sided mesh:
there are two layers of cloth for the wing.
You should just use a single layer.
The slow performance is caused by self-collisions between the two wing layers.
You'll see the sim because fast again when you disable self colllision on the cloth object.
But the best thing to do is to just use a single layer of polygons for the wing.

About the “ugly look”: you probably don't want to use the default material settings for cloth, because these are more appropriate for a thin piece of fabric than a dragon wing. You can try to increase the stiffness/damping factors by at least a factor of 10 to make the wing look thicker and stronger.

The attributes you were mentioning are called “animationstiffness” and “animationdamping”. The spaces in the docs are wrong. Thanks for noticing this.

I hope this helps,

Michiel
User Avatar
Member
304 posts
Joined: May 2006
Offline
Thanks Micihiel,

you´re absolutely right.
When self-collision is deactivated the cloth does simulate at a really fast pace (bullet-like fast), and I found that a judicious use of animation stiffness and damping makes it pretty easy to get a visually pleasant result.
Also, to be totally fair, and just to compare I checked Lightwave´s bullet solution and it also had “self-collisions” deactivated!

When comparing both solvers, Houdini looks a bit more interesting regarding the behaviour. There should be a way, though to make it disregard self-collisions that are closer than a given distance. In this way I wouldn´t be forced to remodel the wings just for the simulation (in order to reapply it to the final model with cloth capture/deform).
And speaking of this, what would be your fastest approach to modelling this simulation proxy from the original model?
Javier Meroño
FX TD.
User Avatar
Member
304 posts
Joined: May 2006
Offline
I exported a quick flipbook of an initial sim without self-collisions. It simulates at roughly 1 frame per second

It has a few interpenetration problems but I´m pretty happy about the performance. I can fix the few problems in many different ways.

Attachments:
DragonMembrane_cloth_test1_3.mov (3.3 MB)

Javier Meroño
FX TD.
User Avatar
Staff
429 posts
Joined: June 2007
Offline
Hi Javier,

Thank you for the flipbook. That dragon is looking really nice!

You could use the Proxy shelf tool to create a proxy setup.
One approach you could try, is to simply delete one layer of the wings and simulate the one remaining layer. Then you could use this proxy geo to deform the full double-layered wings. Don't forget to re-enable the self collisions, so that there won't be any penetrations when you use a single layer.

Disregarding self collisions that are closer than a certain distance is not really something that can be done reliably in a solver. It would have many undesired side effects. If you really want to simulate the double-layered wing model directly with self collisions, although I don't recommend that, you could perhaps try lowering the thickness on the geometry.

Michiel
User Avatar
Member
55 posts
Joined: Jan. 2006
Offline
I guess you missed the part where I said turn off all collisions, but I'm glad it worked out for ya.
“If you can eat it raw you can't under cook it”
User Avatar
Member
304 posts
Joined: May 2006
Offline
Michiel, thanks again. I will try that when I get some more time to play with the scene.

Kleer01, lol. For some reason when you posted that I unchecked all collisions but self-collisions thinking “ok, I do need self-collisions”…apparently not so much. My bad, sorry again. I did read you thread.
Javier Meroño
FX TD.
User Avatar
Member
55 posts
Joined: Jan. 2006
Offline
No worries

Next cloth exercise? Paint Tearing!
“If you can eat it raw you can't under cook it”
  • Quick Links