BenBarker
12-05-2007, 04:38 AM
I have a custom dynamics force. It works with particles, hair, nCloth, etc.
There haven't been any problems with particles or hair, but for some reason there is a cycle warning when this force is connected to an nClothShape. The weird thing is though, the warning only happens when caching the cloth, not just playing it normally.
It seems to be related to the per particle attributes connected to the force (since those attributes are the only ones connected in a "circular" fashion). However the per-particle force arrays work fine in a particle system. This could just be a red herring, but is there something particular about nCloth that I am not doing in the plug-in? Also how does evaluation differ when caching then when playing? I'm sure I missed something somewhere, but I thought I would ask around before I start digging.
--Edit: I just did a test with the built in air field and got a cycle warning as well. So it's quite possible this isn't related to the "customness" of the field I am using. I could still be hooking stuff up wrong, has this happened to anyone else?
--Edit2: Sorry, another edit. Here is a reproduction. Run this script to setup a scene:
file -f -new;
//Make some stuff
string $pSphere[] = `polySphere`;
string $pPlane[] = `polyPlane`;
move -r -os -wd 0 0 5 $pPlane[0];
scale -r 10 10 10 $pPlane[0];
//Apply nCloth
select -r $pSphere[0];
makeCollideNCloth;
select -r $pPlane[0];
createNCloth 0;
//Create a constraint
select -r ($pPlane[0] + ".vtx[114:116]");
select -add $pSphere[0];
string $constraint = `createNConstraint transform 0`;
setAttr ($constraint + ".excludeCollisions") 1;
//Apply the force
select -r $pPlane[0];
string $forces[] = `air`;
connectDynamic -f $forces[1] "nClothShape1";
playbackOptions -maxTime 200;
Hit play. Cloth runs just fine.
Select the plane and cache cloth, I get cycle warnings for every frame:
// Warning: Cycle on 'airField1.outputForce[0]' may not evaluate as expected. (Use 'cycleCheck -e off' to disable this warning.) //
// Warning: Cycle on 'nClothShape1.outputMesh' may not evaluate as expected. (Use 'cycleCheck -e off' to disable this warning.) //
There haven't been any problems with particles or hair, but for some reason there is a cycle warning when this force is connected to an nClothShape. The weird thing is though, the warning only happens when caching the cloth, not just playing it normally.
It seems to be related to the per particle attributes connected to the force (since those attributes are the only ones connected in a "circular" fashion). However the per-particle force arrays work fine in a particle system. This could just be a red herring, but is there something particular about nCloth that I am not doing in the plug-in? Also how does evaluation differ when caching then when playing? I'm sure I missed something somewhere, but I thought I would ask around before I start digging.
--Edit: I just did a test with the built in air field and got a cycle warning as well. So it's quite possible this isn't related to the "customness" of the field I am using. I could still be hooking stuff up wrong, has this happened to anyone else?
--Edit2: Sorry, another edit. Here is a reproduction. Run this script to setup a scene:
file -f -new;
//Make some stuff
string $pSphere[] = `polySphere`;
string $pPlane[] = `polyPlane`;
move -r -os -wd 0 0 5 $pPlane[0];
scale -r 10 10 10 $pPlane[0];
//Apply nCloth
select -r $pSphere[0];
makeCollideNCloth;
select -r $pPlane[0];
createNCloth 0;
//Create a constraint
select -r ($pPlane[0] + ".vtx[114:116]");
select -add $pSphere[0];
string $constraint = `createNConstraint transform 0`;
setAttr ($constraint + ".excludeCollisions") 1;
//Apply the force
select -r $pPlane[0];
string $forces[] = `air`;
connectDynamic -f $forces[1] "nClothShape1";
playbackOptions -maxTime 200;
Hit play. Cloth runs just fine.
Select the plane and cache cloth, I get cycle warnings for every frame:
// Warning: Cycle on 'airField1.outputForce[0]' may not evaluate as expected. (Use 'cycleCheck -e off' to disable this warning.) //
// Warning: Cycle on 'nClothShape1.outputMesh' may not evaluate as expected. (Use 'cycleCheck -e off' to disable this warning.) //
