Make 1 Element Stay Fixed In Chain

I have a chain, lets say with 3 elements, connected with parentConstraints.
When I rotate the second element, element 3 is rotated with it, of course.

what I need:
When element 2 is rotated, element 3 should stay fixed, and all other elements are rotated, accordingly.
The system should behave as if there would be counterrotations applied, so that one element (here element 3) keeps stationary.

What I tried so far gives a cycle. I used a particleShape as the last child to get its worldPosition, then multiply it with -1, and apply that to null2, the master transform. null1 should be rotated. Actually the counter movement of null2 should make particle1 stay fixed...but it doesn`t.

Here`s a example scene with two elements

CODE
particle -p 0 0 0 -c 1;
setAttr particleShape1.particleRenderType 4;
addAttr -is true -ln "radius" -at "float" -min 0 -max 10 -dv 0.5 particleShape1;
setAttr "particleShape1.radius" 4;

group -empty;

group -empty;
move 0 0 10;

parentConstraint -mo -weight 1 null2 null1;
parentConstraint -mo -weight 1 null1 particle1;

createNode multiplyDivide;
setAttr "multiplyDivide1.input2X" -1;
setAttr "multiplyDivide1.input2Y" -1;
setAttr "multiplyDivide1.input2Z" -1;

connectAttr -f particleShape1.worldCentroidX multiplyDivide1.input1X;
connectAttr -f particleShape1.worldCentroidY multiplyDivide1.input1Y;
connectAttr -f particleShape1.worldCentroidZ multiplyDivide1.input1Z;

connectAttr -f multiplyDivide1.outputX null2.translateX;
connectAttr -f multiplyDivide1.outputY null2.translateY;
connectAttr -f multiplyDivide1.outputZ null2.translateZ;

So, has anybody a idea how I could succeed in making one element in a chain chain stay fixed whereas all other elements are rotated?

Okay but why parent contain it then? Instead constrain it with Point constraints instead. If you need hearachy then just unchek inherits from the transform (this speeds the computation up as theres no need to counter rotate or counter move)

I need the parentConstraints for other reason.
The whole system should behave as a normal parent-child relationship system.
But I need to tell it which element has to stay fixed.
Just imagine I would permanently set the location of one element of the system permanently to the world null during modifying rotation values in the chain.

Do the shapes share the same transform (if they are just children its easy)? If so i have example of this.

If not then your mixing 3 things that SOUND equal but arent.

its like this:

CODE
particle -p 0 0 0 -c 1;
setAttr particleShape1.particleRenderType 4;
addAttr -is true -ln "radius" -at "float" -min 0 -max 10 -dv 0.5 particleShape1;
setAttr "particleShape1.radius" 2;
duplicate -rr;
select -r particleShape2;
parent particle1 particle2;
select -r particle2;
duplicate -rr;
move -r 19.64751 20.185798 0;
duplicate -rr;
move -r 10.496615 -19.64751 0;
duplicate -rr;
move -r 9.958327 19.109222 0;
duplicate -rr;
move -r 9.420039 -18.840078 0;
select -r particle2|particle1;
select -add particle3;
parentConstraint -mo -weight 1;
select -r particle3|particle1;
select -add particle4;
parentConstraint -mo -weight 1;
select -r particle4|particle1;
select -add particle5;
parentConstraint -mo -weight 1;
select -r particle5|particle1;
select -add particle6;
parentConstraint -mo -weight 1;

select -r particleShape2;
select -add particleShape3;
select -add particleShape4;
select -add particleShape5;
select -add particleShape6;
doDelete;

select -r particle2 particle3 particle4 particle5 particle6;
group;

Yes in that case your mixing 3 things:

  • parent linkage
  • transformation inheritance
  • and parent constraint
  • Just because NORMALLY parent linkage and transformation inheritance follow each other does NOT mean they actually do need to be together. Stop and think, your digging your self a grave because your using limitted vocabulary.

    Ok so do you need the FIRST one to rotate the rest? But not the second one. Or do you need the second one to no t ritate next but all the rest?

    Anyway unfortunately you cannot do this with parent constraint (feasilbly) as its NOT rotating the child its moving AND rotating it even on simple rotation what you want is to work on the dorect matrices alas for particles it dont work but does for shapes.

    Because once its trascripted to the other space its nolonger just rotation

    PS can the hierarchy have extra shapes?

    PPS: come to think of it you could separate theese things but youd still need a point constraint and a few matrices. or 2 proxy objects.

    oh,oh......

    so, every element has to be able to deal with its childs as in typical parent-child relationships.

    QUOTE
    PS can the hierarchy have extra shapes?

    yes

    QUOTE(hansesurfer @ 02/04/08, 05:44 PM) [snapback]280555[/snapback]
    so, every element has to be able to deal with its childs as in typical parent-child relationships.

    Thats easy you can have normal parent linkage no matter whet the position of stuff even without constraints.thats no problem

    just unclek the inherits trasform of the transform then they have right linkage but no transform inheritance. example:

    CODE
    {
    proc particleM(){
    $par=particle -p 0 0 0 -c 1;
    setAttr ($par[1]+".particleRenderType") 4;
    addAttr -is true -ln "radius" -at "float" -min 0 -max 10 -dv 0.5 $par[1];
    setAttr ($par[1]+".radius") 2;
    }
    file -f -new;
    particleM;
    particleM;
    setAttr "particle1.inheritsTransform" 0;
    setAttr "particle2.inheritsTransform" 0;
    parent particle2 particle1;
    move -r 19.64751 20.185798 0;
    particleM;
    setAttr "particle3.inheritsTransform" 0;
    parent -relative particle3 particle2;
    move -r 19.64751 20.185798 0;
    move -r 10.496615 -19.64751 0;
    particleM;
    setAttr "particle4.inheritsTransform" 0;
    parent -relative particle4 particle3;
    move -r 19.64751 20.185798 0;
    move -r 10.496615 -19.64751 0;
    move -r 9.958327 19.109222 0;
    particleM;
    setAttr "particle5.inheritsTransform" 0;
    parent -relative particle5 particle4;
    move -r 19.64751 20.185798 0;
    move -r 10.496615 -19.64751 0;
    move -r 9.958327 19.109222 0;
    move -r 10.496615 -19.64751 0;
    }

    now the next part is VERY tricky id estimete it takes a few hours to get it all in right place when you know what your doing. I wouldnt bother.

    BUT maybe this can help you on your way:

    CODE
    {
    proc particleM(){
    $par=particle -p 0 0 0 -c 1;
    setAttr ($par[1]+".particleRenderType") 4;
    addAttr -is true -ln "radius" -at "float" -min 0 -max 10 -dv 0.5 $par[1];
    setAttr ($par[1]+".radius") 2;
    }
    file -f -new;
    particleM;
    particleM;
    parent particle2 particle1;
    move -r 19.64751 20.185798 0;
    group -em;
    setAttr "null1.inheritsTransform" 0;
    move -r 19.64751 20.185798 0;
    parent -r null1 particle2;
    particleM;
    parent particle3 null1;
    move -r 19.64751 20.185798 0;
    move -r 10.496615 -19.64751 0;
    particleM;
    parent particle4 particle3;
    move -r 19.64751 20.185798 0;
    move -r 10.496615 -19.64751 0;
    move -r 9.958327 19.109222 0;
    particleM;
    parent particle5 particle4;
    move -r 19.64751 20.185798 0;
    move -r 10.496615 -19.64751 0;
    move -r 9.958327 19.109222 0;
    move -r 10.496615 -19.64751 0;
    connectAttr -f particle2.translate null1.translate;
    parentConstraint -mo -weight 1 particle1 null1;
    }

    modify the connection from last example away and point constrain the second particle to the third should bring you one step closer. Now binging 4 and 5 to the fold is aparent costrain form 3 out. but add the matrix in trough a matrix multiply and multiply the 3 ones matrix in to that.

    Should work.

    thanks for your suggstions, joojaa, I will check that later today