bbFX
Hi there,

I've got an issue on maya 2014 (can't test on older version) when I do the same that in the video "Soup - Scatter/Shatter > nCloth - Basic video"


My problem is that even though all the transformations are set to 1 all the voronoi cells (shards) are centered on a point of the scatter but the border edges of the shattered mesh are too big.
I've got double transform for translate too

The only way to have the good mash is to change the size of pCube1 within his history (I mean polyCube1) but no transforms here.

scatter_shatter_bug.jpg
Reply 0 0
pshipkov
connect the pCube1.worldMatrix to scatter.inMatrix (not sure what the exact name of the input attribute is).
Reply 0 0
bbFX
Thanks for the answer,

Whatever I connect pCube1. (or pCubeShape1.) worldMatrix[0] to scatterShape1.inWorldMatrix the problem remains the same as long as I control the size of pCube by scaling it like in the video (in my case -sx 10 -sy 0.5 -sz 10).
I don't want to shatter a cube of 1 1 1, bake it and then scale it 'cause obviously the shape of the shards will be stretched.

I think the best way is to use only the polyCube1 dimensions in order to have correct shards, and then bake it to be able to change its transforms.

//GOOD
file -f -new;
polyCube -w 10 -h 0.5 -d 10 -sx 1 -sy 1 -sz 1 -ax 0 1 0 -cuv 4 -ch 1;

createNode scatter;
connectAttr -f pCubeShape1.worldMesh[0] scatter1.inGeometry;
connectAttr -f pCube1.worldMatrix[0] scatter1.inWorldMatrix;
setAttr "scatter1.pointDensity" 200;

createNode shatter;
setAttr "shatter1.autoEvaluate" 1;
connectAttr -f pCubeShape1.worldMesh[0] shatter1.inGeometry;
connectAttr -f scatter1.outPositionPP shatter1.inPositionPP;

createNode mesh -n shatteredCube;
connectAttr -f shatter1.outGeometry shatteredCube.inMesh;

//ERROR
file -f -new;
polyCube -w 1 -h 1 -d 1 -sx 1 -sy 1 -sz 1 -ax 0 1 0 -cuv 4 -ch 1;
xform -s 10 0.5 10;
createNode scatter;
connectAttr -f pCubeShape1.worldMesh[0] scatter1.inGeometry;
connectAttr -f pCube1.worldMatrix[0] scatter1.inWorldMatrix;
setAttr "scatter1.pointDensity" 200;

createNode shatter;
setAttr "shatter1.autoEvaluate" 1;
//connectAttr -f pCubeShape1.worldMesh[0] shatter1.inGeometry;
connectAttr -f scatter1.outGeometry shatter1.inGeometry;
connectAttr -f scatter1.outPositionPP shatter1.inPositionPP;

createNode mesh -n shatteredCube;
connectAttr -f shatter1.outGeometry shatteredCube.inMesh;


NB:The weird thing in the picture I posted is that the pattern of the shards seems to be correct for those which are around the center of the cube but not at all just for those which share edges with the border corners.

Again thanks for all of these awesome tools !
Reply 0 0
pshipkov
I see what do you mean. When one starts mixing up xform and shape level transformations the shatter node is not doing the right thing. For now avoid doing that. I will fix it in the next release.
Reply 0 0
Reply