Forum Replies Created

  • Miha Zaletel

    September 14, 2015 at 2:16 pm in reply to: export absolute scale and rotation after parenting

    Dan, your method tracks parents perfect! And help me a lot, thank U.

    I use this method to track and than link position and rotation to a precomp. I just have problem that
    I have in main comp this layer linked to one of a parents in my chain. So I got double result.

    I calculate offset to eliminate double transformation when it is position change. But I cant set the proper offset for position of a layer when the animation is done by rotation(it works till it hits the parent layer in main comp ‘pants_ctrl’).

    Is it clear? I can recreate my comps setup.

    regards,

    mz

    on rotation I have:
    (I think that offset works fine, but not sure)

    ctrl=comp(“COMP”).layer(“HEAD”);
    mattP=comp(“COMP”).layer(“pants_ctrl”).transform.rotation;
    all= comp(“COMP”).layer(“position_ALL”).transform.rotation;

    r = ctrl.transform.rotation;
    L =ctrl;
    while (L.hasParent){
    r += L.parent.rotation ;
    L = L.parent;
    }
    r – mattP – all

    on position I have:

    ctrl=comp(“COMP”).layer(“HEAD”);
    mattP=comp(“COMP”).layer(“pants_ctrl”).transform.rotation;
    all= comp(“COMP”).layer(“position_ALL”).transform.rotation;

    off= ctrl.transform.position.valueAtTime(0) – ctrl.transform.position.value; // pure offset from sors position of my head layer
    offM= mattP.transform.position.valueAtTime(0) – mattP.transform.position.value; // offset wen parent 01 transforms position;
    offA= all.transform.position.valueAtTime(0) – all.transform.position.value; // offset wen parent 02 transforms position;

    P= ctrl.transform.position;
    L= ctrl;

    while(L.hasParent){
    if (L.parent == mattP && mattP.rotation !=0 )
    {

    P= ctrl.toWorld(ctrl.anchorPoint) – off; // if we deal with parent layer subtract offset ?
    L=L.parent;
    }
    else;

    P = ctrl.toWorld(ctrl.anchorPoint);
    L = L.parent;
    }

    P + offM + offA ;

  • Miha Zaletel

    September 10, 2015 at 2:59 pm in reply to: export absolute scale and rotation after parenting

    It is complicated a bit.

    my purpose is to create ‘smart’ matte for HAND of a rigged character. Matte will allow to have hand behind the body and in front of the head. I have rigged character in main comp. In comp ‘hand matte’ I have solid, that fill area where both HANDS moves(solid cover hands in any position). On top of that solid I have HEAD with which I will control the shoving of hand in main comp(if hand is in front of head or not).

    So I’m trying to copy animation of the head in main comp to the ‘hand matte’ comp. I realize that your code works just fine, the breaker is the code for head position(I’ll paste it below). The code is beyond my
    knowledge. I changed if to while, but the problem stays the same(I thought that if sentence depends on layer index stack..).

    It is interesting that it breaks in 4ourth parent and not before.

    I know it’s wery confusing. If u have will I’ll be hapy to send you project. my mail is miha_zaletel@yahoo.com

    thank U,

    mz

    //from Felt Tips
    ctrl = comp("LOYZI_").layer("loy_GLAVA_newSCALE"); // head layer in main comp
    offsetP = thisLayer.toWorld(thisLayer.anchorPoint, 0) - ctrl.toWorld(ctrl.anchorPoint,0); //calculate absolute offset ?
    PWrld = ctrl.toWorld(ctrl.anchorPoint) + offsetP; //
    if(thisLayer.hasParent) thisLayer.parent.fromWorld(PWrld); // ctrl is parented not this layer, so how can expression work for first three parents chain?
    else PWrld;

  • Miha Zaletel

    September 9, 2015 at 9:28 pm in reply to: export absolute scale and rotation after parenting

    Thank Dan, rely great code!

    How it counts the parents in while sentence?

    I just don’t understand how it jumps to next layer in chain and checks if has parent.
    For my case it works for 3layers long chain and then when it comes to fourth it breaks.
    The fourth parent layer is not in the line(index stack) with the first three.

    here is a sketch of layer stacking with index:

    lay1/index5 < lay2/inde6 < lay3/index7 < lay4/index15 < lay4/index1

    any idea?

    mz

  • Miha Zaletel

    October 9, 2006 at 10:40 am in reply to: re:flex morph help

    OK! Don’t boder yourselves with anwers, I got it. Now I understand this thengs:), so thanks a lot I write when I got to the bigger troubles.

    Thaks all!

    Miha Zaletel

  • Miha Zaletel

    October 9, 2006 at 10:40 am in reply to: re:flex morph help

    OK! Don’t boder yourselves with anwers, I got it. Now I understand this thengs:), so thanks a lot I write when I got to the bigger troubles.

    Thaks all!

    Miha Zaletel

  • Miha Zaletel

    October 9, 2006 at 6:23 am in reply to: re:flex morph help

    Yes I’m trying to use it in AE. And I didn’t say that I’m trying to use MOTIOn morph .
    I get trought re:flex help, but in my case I get every time I tried to morph, some unacceptable distortions, like the first mouth morphs rotationaly to second mouth, and so…A
    About boundary did I understand it right? First you write FROM boundary an then are 2,4…FROM maskes ande 3,5… are TO maskes, and on the end you write TO boundary. Is it so?

    Thanks every one for help, I’m having hard times behind my computer 😉

    I’m sorry for may bad english :0

  • Miha Zaletel

    October 9, 2006 at 6:23 am in reply to: re:flex morph help

    Yes I’m trying to use it in AE. And I didn’t say that I’m trying to use MOTIOn morph .
    I get trought re:flex help, but in my case I get every time I tried to morph, some unacceptable distortions, like the first mouth morphs rotationaly to second mouth, and so…A
    About boundary did I understand it right? First you write FROM boundary an then are 2,4…FROM maskes ande 3,5… are TO maskes, and on the end you write TO boundary. Is it so?

    Thanks every one for help, I’m having hard times behind my computer 😉

    I’m sorry for may bad english :0

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy