adrianr Posted May 21, 2017 Share Posted May 21, 2017 Afternoon all, I have to create a cloth sim, and my experience with cloth and FEM are lacking, as it seems are online resources (Last SideFX Masterclass was 2013), so I'm reaching out for any help you can offer. Hopefully this can be a good general tips resource beyond the documentation. Up shot is I'm being given a sculpted model that will I will have to fracture into organic patterns and simulate flying apart. Straight off the bat we've ran into some problems with the model and self intersections, and whilst this is an obvious issue with any model it's opened up the discussion on other things we should be considering at the modelling stage. For example topology - should we be trying to keep all edges the same length across the model? Does it not matter? Does it prefer quads? There are parts of the model that are best represented with the cloth closely doubling back on itself (like a hood edge) which seems to cause issues - Should we just be trying to represent what we can with single skin geometry and faking depth afterwards? Even if I take a known broken model and run a polydoctor on it to resolve intersections etc, I can still completely break the sim with crazy exploding (and I mean crazy, like pieces going out 1000000 units) - This made me think initially the resolution of the geometry was much too high, when in fact the only reason it was taking so long was having to resolve self intersection leading to mad explosion on the very first frame. Is there a rough poly/point count you will set as a rough limit? Any good guidance on limits for substeps or collision passes? Do you find yourself ending up at a similar sim time per frame for acceptable quality? (Pretty vague as it can change depending on the complexity of the sim but kinda links in with poly count etc). Posting your system spec would be helpful to give context to these answers. Any optimization tips here would be good too - For the tests I've been kicking off so far it hasn't looked like my CPU was being taxed too much, so I'm interested to know where the bottlenecks are and what to look out for. There are many options for collisions - Any you instinctively turn off to get up and running? I want to keep as many collision options on as possible but one (can't remember which, will update post when I'm back at work machine), was really murdering stability. Second point is pre-fracturing. I've been playing with sending fractures straight from a voronoi fracture (and the new edges it creates) compared to using it with an attrib transfer back onto the original topology and fracturing along existing edges. Haven't really decided which is best or if there is even any practical difference, so interested to know your thoughts. Most specifically with more organic patterns using the new boolean and cutting planes - Is there any reason this would be a bad idea if we're just fracturing surfaces rather than shapes? Is there a FEM cloth equivalent of for example bullet convex hulls? Or can we fracture until we're blue in the face? Thanks in advance for any help and information Quote Link to comment Share on other sites More sharing options...
adrianr Posted May 23, 2017 Author Share Posted May 23, 2017 (edited) Ok well further to this post I'm discovering that FEM cloth is a fickle mistress indeed. I feel that I'm getting better results with a remesh than with the quad topology straight from modelling (lots of different length edges, normalising these somewhat with a remesh seems to help). I had high hopes for the Boolean shatter workflow but initial forays into this make way too much mess and again lead straight into explosion town. Rusty trusty voronoi is proving for a much more stable set up despite the artistic drawbacks. On we go. Quick edit: Have found a previous explody setup was remedied by increasing the collision radius on the cloth object. I'm going to revisit Boolean shattering and see if this adjustment helps keep that under control too. Edited May 23, 2017 by adrianr Quote Link to comment Share on other sites More sharing options...
Guest tar Posted May 25, 2017 Share Posted May 25, 2017 Fem collisions aren't multi-threaded yet - if you can avoid that then Cloth runs at an ok speed The other option is to use grain-sheets - pinning becomes your biggest issue, and, haven't looked fracturing yet. Quote Link to comment Share on other sites More sharing options...
adrianr Posted May 25, 2017 Author Share Posted May 25, 2017 Thanks Marty, was asking on the Discord about that as it definitely isn't using a lot of my system resources at the moment. A shame! So far I have only been able to have 'Collide with objects', 'Collide with objects of the same solver' and 'Collide within object' on to get anything resembling stability. Collide within connected components is a sure fire way to break it (for now). Other things I have discovered so far. Edges matter! Using fractured geometry, which is really where most of my problems are stemming from, and all the new edges it creates doesn't seem to be ideal. You can get the odd really tiny edge meeting 2 larger ones which has shown problems. Or a single tri poly held on only by a single point. Of course transferring back a connectivity attribute per prim to your initial geometry leaves you at the mercy of the original topology, which may not be preferred (A low resh remesh for example doesn't look that nice whilst fractured and makes post UV edge work a pain). Booleans exacerbate this as the scatter points and shatter with grids method can quickly leave you with lots of tiny chunks. PolyDoctor can go a long way to fixing some of these issues but it can also be very heavy handed, so you have to be on sharp lookout for it punching any major holes in your mesh. Another thing was adding a second uv set for the individual fracture parts. This changed the behaviour of the sim. The documentation tells about how the solver uses uv attributes to control things like stretch and sheer, but contrary to the documentation the Visualization tab on the Cloth object has no way to show which uv's are being used or their direction. For some reason renaming them from uv2 to something else didn't fix the problem on its own, I had to rename it and then attribute transfer it back for it to not influence the sim at all. Requires further investigation and I would love more visualizers on the cloth object. If I get a bit of spare time today I will maybe try and rebuild the set up with grain sheets but I'll have to call time on it at some point and resort to post sim clean up to pass it on. For reference a page I missed going through the documentation first time round, with some general tips https://www.sidefx.com/docs/houdini/nodes/dop/clothgeometry Quote Link to comment Share on other sites More sharing options...
Guest tar Posted May 25, 2017 Share Posted May 25, 2017 Very interesting! You should run tests with the newer hybrid object - it collides poly and tets and *appears* multithreaded. Worth digging into it. ClothandTets.hiplc Quote Link to comment Share on other sites More sharing options...
bandini Posted May 25, 2017 Share Posted May 25, 2017 I did almost exactly what you are looking for using the grain solver. A few gotcha's. When using prefractured pieces, overlapping points will cause explosive forces. You'll need to roll out your own post-sim deformer to match each prefractured piece to the input points. I ended up ensuring matching point counts and ended up with something more like a Maya N-Particle version of a softbody. Not perfect, but worked for my needs. Cloth solver was terrible for what I was trying to do. Quote Link to comment Share on other sites More sharing options...
adrianr Posted May 26, 2017 Author Share Posted May 26, 2017 (edited) Oooh hybrid objects.. Added to the list, thanks! And regarding the post point deform Adam I was trying to do something similar using point deform and a foreach loop yesterday to loop through the fracture chunks and capture the original pre-remesh geo (but with the same fracture). Didn't finish it but was hoping to steal a second to look back into it today - If you have any other ways I could look into that I'd be very happy to hear them. At the moment I've managed to get a stable sim that I'm fairly happy with. Got some vel fields swirling it around and some good geo from match move (me) to collide with. Just pray the client doesn't come back with many comments as I fear I have a system balancing on a pin head, and any slight breeze will knock it right over Hopefully the near immediate impending deadline will save me, fingers crossed. I'll continue to update with any new findings, and try the hybid mesh as well as the grain solver. Edit: Spoke too soon on stability. Obviously being a Friday fem has decided to say screw it, not today. Edited May 26, 2017 by adrianr Quote Link to comment Share on other sites More sharing options...
adrianr Posted May 26, 2017 Author Share Posted May 26, 2017 Something else, this time post sim. Running P through a simple filter chop has really helped smooth out some of FEM's more jittery parts, especially when the geometry initially breaks off or parts where collisions freak out a little bit. Also upped collision passes to 30. 1 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.