View Full Version : nCloth as influence object?
wigal 03-05-2007, 09:10 PM I am trying to use a ncloth object as an influence for my skinned mesh.... But, when I try so it gives me a "does not match the type of the influence object" error.... does it work, or is it a known issue? do i have to bake my sim (that would be ***)
thanks in advance...
|
|
wigal
03-14-2007, 09:11 PM
Nobody? Duncan? :sad:
Duncan
03-16-2007, 06:31 PM
After a little investigation it turns out there is a naming bug with the setup on the influence object. It is assuming that the shape nodes have standard naming based on the transform, but it is possible to rename to get around this bug.
If you create the nCloth with the local option(this is the default) then the output mesh is parented to the transform of the original object. You need to have this output mesh named based on the parent transform name... i.e tformShape1. If your cloth was a poly sphere the name will be pSphere1 for the transform and under it will be pSphereShape1 and outputCloth1. You need to change the name of pSphereShape1 to something else( inputShape1) and then you could rename outputCloth1 to pShapeShape1 ( the bit before "Shape" needs to match the transform name... you could change the transform name if desired ). You can now select the cloth and the skin object and create an influence object ("geometry" toggled on).
In order for the cloth animation to affect the deformation you additionally need to toggle on "useComponents" on the skinCluster node that was created for the influence object.
Duncan
Hi Duncan,
what happens with the smoothing?
If I smooth nClothed shape, the smoothness is there, but how to preserve history?
Also are there some problems with applying fields to cloth? I'm getting some strange results.
It would be nice to have some short tutorial for people who used cloth before, and now started using nCloth...
Also I can't find anywhere to buy the fluids DVD...
Thanks
Als
Duncan
03-16-2007, 07:52 PM
If you do a poly smooth on the cloth output mesh it works fine, and keeps history(if history is enabled), unless you are referring to a different smooth. I would recommend using poly smooth on the cloth output mesh before rendering in most cases.
Fields should work fine with nCloth. Note however that the air fields do not understand lift and non-tangential drag. The fields in maya currently don't recieve any normal or surface info... just points. The wind on the nucleus node will thus provide better results than a wind field.
I don't see the Maya Techniques | Fluids DVD on the autodesk store anywhere... perhaps it was discontinued. You could put in a request... perhaps it is still available but not on the website. There are lots of maya dvds that I remember which are not on that site.
An nCloth tutorial for classic cloth users sounds like a good idea, but I'm probably not the best to create it as I'm not an expert in using the old cloth system. The one point I might make is to embrace quad meshes, as opposed to the Delany triangulation in the classic cloth. Quad simulation meshes with a downstream poly smooth can be both efficient and natural looking. There are also some workflows for partially simulating the panel workflow from the old cloth, although if someone really needs a panel workflow(starting from clothing patterns) then nCloth might be too cumbersome.
Duncan
wigal
03-17-2007, 10:17 PM
thank you Duncan, its always good to know you are around!
Thanks a lot Duncan.
I have so many question about nCloth.
It is incredible tool, but there is a lot there to explore.
(I hope you've seen the tornado I made with ncloth)
I'm trying to make effect where fan blows away a lot of falling confettis.
I started with plane 20x20 divisions, then extracted polygons with randomness, translate on Y, and a bit of offset. Since I didn't add randomness on rotation, this resulted in all of them flying really flat.
If I add wind, it's blowing in quite uniform question.
If I added Fan, it didn't really change their vector as you mentioned before...
If I raised value of lift it looked better.
So few questions based on this test.
1. If I need to add more detail in nCloth object, what is best way of doing this?
What is the difference between using smooth polygon after you've created nCloth, of if you used smooth polygon before? I hope this makes sense. Or in other words how number of polygons defines detail of cloth simulation, and how to raise this if needed?
2. Which type of input wind direction can work with?
3. How the "lift" attribute works?
Thanks a lot
Als
Duncan
03-20-2007, 05:39 PM
First of don't use extract. Instead use "detach component" and randomize the faces(not the extracted meshes). This way you only have one mesh and nCloth node to deal with. The cloth creates its connections based on the mesh topology.
From the default cloth settings simply lower the mass a bit (this is like increasing air density or drag+lift). That should be all you need to do. Turn off self collision on the nCloth if you want it to be fast. If you had built with history you could then simply increase the poly plane resolution to get more paper bits.
Use the wind settings on the nucleus node, not a wind field, because the fields only apply a very uniform drag effect. That said the lift and drag from the nucleus simualtion can still provide natural looking effects when the particles are pushed by fields. Just make sure that the major wind direction and drag are approximated using the nCloth and nucleus settings before applying fields. For lift think of a plane wing. When it is tilted a bit the wind deflects off of it pushing it up. This upward push is lift. There is also an effect than simply slows the plane down. This is the drag. The degree to which the drag part is influenced by the cloth angle with the wind is the tangential drag attribute. When this is 1.0 the drag effect is totally uniform( as if the wing were a sphere not a flat plane ). In general for realistic effects set lift and drag to the same value. If you make the lift higher than the drag it is not quite realistic, but it can create animations with lots of character and energy.
If you smooth the input mesh used by nCloth you are simply creating more vertices for the cloth to simulate. Also the cloth simulation could bend these smoothed bits too much in places so you would need to add some bend resistance in addition to higher stretch resistance. By smoothing instead downstream of the nCloth node you can use lower simulation settings and not require this added bend resistance. The difference is perhaps a factor of 10 or more speedup( could be a 1000x speedup for high smoothing subdivisions).
Check out my falling leaf tutorial http://area.autodesk.com/blogs/blog/7/blogpost/4650/. The tree leaves are a single mesh, but each leaf is a grouping of two faces at a bit of an angle. By using some bend stiffness and lift with this one gets that typical leaf or feather falling and looping motion.
I've not yet checked out your tornado, but I can see where cloth could be useful for cloud-like effects.
Duncan
Duncan
03-20-2007, 06:30 PM
In trying to produce confetti, I noticed that one needed a little turbulence(low magnitude, no attenuation, high frequency) to keep things from getting too uniform. This would not be needed if the confetti bits each were not totally flat planes(i.e had more than one face). Also the gravity needs to be high enough for the scale. Also a little tangential drag helps keeps the planes from going too fast( zero drag in the plane direction is not quite natural ). Turning off self collision, lowering substeps and collide iterations as well as lowering stiffness and bend resistance helps keep everything running pretty quickly.
I've attached a file with the above setup. It runs at full frame rates for me(324 confettis) without caching. For more confetti you can simply increase the subdivisions on polyPlane1.
Duncan
Thanks Duncan, that's more then I hoped for.
Plus you answered more questions then I asked, and spot on at that!
Thanks a lot!
I'm still trying to figure out best ways of tunning the level of subdivision which works best.
I discovered then self collision is really slowing down polygons for effect like that, and once I switched it off it run like crazy.
If I need to increase level of detail, upstream, how to do this?
I mean if there is no history on creation of the mesh how to subdivide it, to have pre effect, not just smooth finished simulation?
In confetti's, I'd like to have some which are closer to the camera to have more subdivisions, so that there is bit nicer move on them too.
For tornado I just made quick cone, and constrained top point to locator, which when animated is dragging tornado. With a bit of tweaking I got it to do nice rotations and twisting...
So, I'm just not 100% sure how to smooth downstream?
I will try figure it out with testing, but any suggestions are welcome...
Thanks a lot!
Als
Duncan
03-20-2007, 08:22 PM
If after creating the cloth you do any mesh operations they will be downstream of the simulation, so just select the cloth mesh(after having created the cloth) and do poly smooth.
You can also just smooth individual faces if desired. The stuff downstream of the nCloth is just for render purposes and does not affect the simulation( which could even be cached before you do the smooth ). Any editing of the cloth before creating ncloth is by definition "upstream".
To edit upstream of the cloth after creating it select the cloth and do "nCloth:displayInputMesh". (this hides the output mesh and displays the original input mesh) Any changes to this mesh will be upstream of the simulation. If you wanted particular confettis to have more detailed wiggly behavior you could subdivide just those faces( if you are looking at the file I created ). Note however that those confettis will likely move to diffent locations due to their modified dynamics behavior. If you just want them rendered smoother instead smooth those faces on the output mesh. Do display output mesh when done so that you can see the simulation.
Duncan
To edit upstream of the cloth after creating it select the cloth and do "nCloth:displayInputMesh". (this hides the output mesh and displays the original input mesh) Any changes to this mesh will be upstream of the simulation.
Duncan
This is what I was wondering how to do...
This is great explanation. Thank a lot!
I'm doing few scenes, and I always wanted to do this "American Beauty" plastic bag in the wind shot. Finally I can!!!
I'm still not certain how to get better paper feel.
If nCloth "paper" doesn't do much, but falls on the ground it looks fine. But I need it to do some extra turning and it's with some slow motion, like 75fps. Like if you through paper (A4) in the air, and then if falls down. Also it has this "falling leaf" sort of motion to it...
But main problem is that paper does bend but not as much as cloth does. And I'm still getting this kind of "clooth" feel. I added 3D fluid as a field, and that helps a lot on getting this kind of randomness, rotations, etc. but when the paper falls on the ground it still looks like silk. In a sense it looks like it need "springs". I'd really like to add to the list of presets paper, but I'm still not there yet, just frustratingly close...
Again, thanks for amazing tool, and for this great help! I'm starting to understand how it works...
Als
Duncan
03-20-2007, 09:33 PM
All this should really have its own thread. At any rate to get paper you need quite a bit of bend resistance and lots of stretch resistance( for a detailed mesh you may need stretch values like 1000, in which case you also need to increase the maxIterations on the nCloth node). The mass should also be low so that air resistance strongly affects the motion. You could also add a little damp so it is not too springy. To allow some crumpling you could perhaps lower the restitution angle to a few degrees. Then to get a final look add some detailed crinkles as a bump map, or perhaps subdivide and displace the output cloth mesh.
Bend resistance with a curving surface can give you that typical falling paper motion. Try out the sunsetLeafFall example from my blog. If you edit the bend resistance it changes the motion. It is also fun to play with lift to see how it affects the simulation.
duncan
I will try. Thanks again for so many cool tips.
This thread is now more then enough to experiment/test/play with!
I hope other people find this thread interesting.
Sorry Wigal to hijack thread though, but I hope it was worth it...
Thanks again Duncan!
Als
CGTalk Moderation
03-20-2007, 09:38 PM
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.