View Full Version : ncloth Q: Collision Layers...again..
HowardM 04-27-2009, 11:39 AM Ok guys, my workmate is doing hair using ncloth ribbons to drive the hair curves.
He wants to know is there a way to make 1000 individual ribbon objects collide with a sphere (head collision) but not collide with each other... besides setting up nConstraints to disable collisions for 1000 individual objects, which really slows the sim down or throwing them all into one object and turning off self collision...
Cheers!
|
|
The way I would suggest is to make the all ribbons one piece of geomerty as to have 1000 ncloth nodes with different collisions layer Ids would be crazy. If you're finding that its too slow to calculate everthing in one go, maybe you could create several groups of ribbons containing a couple of hundred ribbons each - then combine them and turn them into nCloth. That way you would have say only 5 ncloth nodes and it would be a lot easier to manage. Of course you would only cache on at a time. :-)
HowardM
04-27-2009, 01:10 PM
Afraid with the pipeline he cannot make it one object.
IMHO there should be an easy way to set everything on a layer so it doesnt collide with anything on that layer....
nConstraint method is too slow and convoluted...
I just remember another ways that might work. Create a set containing all ribbon/hair geometry (excluding the main collision object - which I guess is the head) then with all the set members selected, go to nConstraint> Exclude Collide Pairs and click the options box. Then make sure 'Use Sets' is ticked. Let me know if this works.
Rich
HowardM
04-27-2009, 02:46 PM
I appreciate you trying to help Richard, but if you read my post, I am looking for a simple way to tell ncloth to allow 100s of objects to collide with one object, yet not collide with themselves... NOT using nConstraints (which are slow and imho a convoluted way to exclude collisions) nor making it all one object.
Ive used other engines that basically work opposite than Maya, where anything with the same Layer will collide with everything but the same Layer... so simple.
Even Maya rigids seems to have this problem. Its as if they expect you to use these methods with only one or two objects.... which is foolish in a film pipeline.
I honestly think Autodesk needs to rethink when it comes to the way to exclude things.
In Syflex, you simply paint a vert map if you dont want cloth to collide with a part of an object. nCloth, you use a nCosntraint, which is very slow, as if its actually calculating the collisions, THEN removing them...
Anyway, the issue at hand is how to do this without nconstraints or one object... if its possible... if not they didnt think this through...
Sorry, my bad! I should have read your first post properly. I'm not really sure there is a way to achieve what you are after with nCloth as I suppose it isn't really designed to simulate hair or anything simliar to that scale - It would be nice though. It would definitely be handy if you could control the collisions on a layer basis.
Let me know if you ever find a solution with nCloth!
HowardM
04-27-2009, 03:23 PM
well this doesnt have anything to with whether or not its hair.
imagine only 50 ribbons.. ncloth.. and one sphere to collide with.
again yes you can use nconstraint with disable collisions, but it is very slow to sim.
look at maya rigids, how wrong it is too... make 4 balls and one plane. make them all rigid, plane passive.
drop the balls on the plane, they all collide.
lets say you want to have only 2 balls collide with each other and the plane, but not the other 2.
you cant.
you can set collision layer to something different than the 2 balls or plane, but then they fall right thru the floor....
other fx engines are smarter, and realize you want to do the opposite, by setting X # of objects in Layer 1, and others in Layer 2 and 3... all objects in Layer 1 will collide with Layer 2 and 3 but not 1.... simple.
anyway, cheers!
Castius
04-27-2009, 06:55 PM
I'm interested to see the conclusion to this issue.
We use ribbons for hair. But we split it into reasonable groups. So it's not been a problem.
Castius
04-27-2009, 09:38 PM
Well I tried 360 poly strips with 10 segments each. The time to start the sim is awful. 30 second just to get to frame 2. Sim was pretty slow as well and that's only at 3 substeps.
Combined into one mesh it fly's.
I suggest you find a way to rig the 1000 mesh strip you need. Just wrap them to your simed mesh or something. Anything would be better than what i just saw.
john_homer
04-27-2009, 11:12 PM
Castius is correct, you are really going to suffer with the multiple nCloths.
sim times get exponentially slower.. ;(
It would be worth spending the time to get your pipeline to handle it as 1 cloth.
it will be a lot faster and handle your problem, and to be honest, should be pretty easy to do. Unless you need very different properties on the nCloths... in which vase yoiu can handle them in bunches...
.j
HowardM
04-28-2009, 08:43 AM
will see what he can do.
still think AD need to rethink the way they deal with excluding collisions or self collisions... simply paint maps like you can with syflex... not these slow constraints...
cheers guys!
Castius
04-28-2009, 05:23 PM
Data is data. I'd rather nCLoth look up a indexed bit table than rounded weight values in a vertex map.
But it does show how nCloth does have problems scaling. There is a lot that goes on on the first frame. It gets very slow. It also complicates trying to append caches as well. if that cached data is not there append does not work properly. I'm not exactly sure what nCloth is caching on that first frame. But i know it's one of it's week points. Added alot of constraints makes that first frame pretty slow. I make sure Constraints that have alot of individual points in it. Have the display turned off. But the more you add the more i wish nCloth was multithreaded.
AlphaJoe
05-01-2009, 04:12 AM
look at maya rigids, how wrong it is too... make 4 balls and one plane. make them all rigid, plane passive.
drop the balls on the plane, they all collide.
lets say you want to have only 2 balls collide with each other and the plane, but not the other 2.
you cant.
you can set collision layer to something different than the 2 balls or plane, but then they fall right thru the floor....
other fx engines are smarter, and realize you want to do the opposite, by setting X # of objects in Layer 1, and others in Layer 2 and 3... all objects in Layer 1 will collide with Layer 2 and 3 but not 1.... simple.
anyway, cheers!
Set the plane to collision layer -1, two of the balls to layer 0 and the other two to layer 1. Collsion layer -1 collides with everything, that leaves teh other two sets of balls. Each set on the same layer will collide with each other and the floor, but not with the balls on the other layer.
HowardM
05-01-2009, 09:24 AM
sweet ;) didnt know that because we use in house rigid bodies.... nice tip!
now wouldnt that be great if you could do the exact same thing in nCloth, quick simple and fast to sim without overhead of nConstraints? ;)
CGTalk Moderation
05-01-2009, 09:24 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.