Fall 2016 - mcjAimAnim - Target, Targeter, Rotator, Animate

mCasualmCasual Posts: 4,607
edited August 2016 in Freebies

similar to mcjAutoLimb, but it will work with anything ! 

so

1 - you select a target, for example, a null node near a door handle

2 - you select a targeter, (a bit like an arrow head ), example, Victoria6's index tip

3 - you select the rotator, example, Victoria6's shoulder

note: the Rotator could also be, her foreArm, her Collarbone, her chest, her abdomen, her hip, her root node, a node she's parented to !

4 - you select the range of frames to process, example, the whole play-range

5 - you click the GO button and bam, the script oriented the shoulder bone so that the shoulder to index line points at the target, for the whole range of frames specified !

     
 

since i lost the mcjAimAnim code (hardware issues ) i was saying in a post below

that i will try to re-write it later this fall BUT there's my mcjOptimalPose script here

https://sites.google.com/site/mcasualsdazscripts7/mcjoptimalposea

which may actually be what mcjAimAnim became 

my main animation tool based on goals is mcjAutoLimb

https://sites.google.com/site/mcasualsdazscripts6/mcjautolimb2015

 

 
     

( i hope you did not miss the release of the free niceiful door and wall prop shown here !!! )

 

 

targetMe.jpg
900 x 592 - 236K
targetMe2.jpg
900 x 592 - 236K
targetMe3.jpg
900 x 448 - 195K
Post edited by mCasual on

Comments

  • mCasualmCasual Posts: 4,607
    edited July 2015

    Example of a clever trick

     

    create a null node at the exact location of your figure's right toes

    ( this can be done easily using mcjParent or mcjMakeTarget )

    parent the figure to this null node

    Use this null node as the rotator

    Victoria will tilt her whole body while maintaining her toes location

    --

    Still reading?

    ok now the parent node is animated

    but that's a bit awkward to carry along

    so, create a null node, lets call it the H node 

    use mcjParent to make that node follow Victoria's hip node position and rotation for the duration of the animation

    unparent Victoria from her Rotator node

    use mcjParent to makeVictoria's hip node  follow the position and rotation of the H node for the duration of the animation!

    ---

    but yes she's more likely to simply adjust her arm or abdomen to reach the door handle )

     

     

     

     

     

    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited July 2015

    so as i was saying ... today we'll have mcjAimAnim

    which just re-orients a joint to solve an Aim, 

    it will work for Pose work

    and it will work for animations

     

    TTR.jpg
    1318 x 744 - 396K
    Post edited by Richard Haseltine on
  • mCasualmCasual Posts: 4,607
    edited July 2015

    even ifthis system needs only 3 nodes selected 

    you can select more, this way you can adjust , for example, a shoulder then a forearm, then a hand

     

     

    TTR2.jpg
    1023 x 578 - 256K
    Post edited by Richard Haseltine on
  • mCasualmCasual Posts: 4,607
    edited July 2015

    when there's no locked rotation axis, the maths is easy, but ... well, i'll do it !

    here, the target is the yellow ball, the targeter is the light-blue ball, the Rotator is the cube ( to which the light-blue ball is parented

    and we want the Aiming to be solved using only the Y and X rotations

    -----

    when we dont lock the z axis we get XYZ rotations -30,40,10

     

    ratateme.jpg
    1036 x 584 - 201K
    Post edited by Richard Haseltine on
  • mCasualmCasual Posts: 4,607

    when there's no locked rotation axis, the maths is easy, but ... well, i'll do it !

    here, the target is the yellow ball, the targeter is the light-blue ball, the Rotator is the cube ( to which the light-blue ball is parented

    and we want the Aiming to be solved using only the Y and X rotations

     

    mCasual said:

    when there's no locked rotation axis, the maths is easy, but ... well, i'll do it !

    here, the target is the yellow ball, the targeter is the light-blue ball, the Rotator is the cube ( to which the light-blue ball is parented

    and we want the Aiming to be solved using only the Y and X rotations

     

    i dont understand the forum's commenting protocol yet

    ---

     

    anyway, it worked !

    luckily i had a project-point-on-normal plane function stashed :)

     

    //==================================================================////==================================================================function projectPointOnPlane( p, n ){	var t = p.dot( n );	var v = DzVec3(   p.x - t * n.x,  p.y - t * n.y, p.z - t * n.z );	return( v );}

     

     

  • mCasualmCasual Posts: 4,607

    you would think that

    limbRoot.getWSRot( t ).getZAxis();

    would return a normalized vector, wouldn't you

    well you would be wrong

    so, remember that

    and you too, me

     

  • mCasualmCasual Posts: 4,607

    well ... tomorrow :)

     

  • DigiDotzDigiDotz Posts: 515

    oi oi subcribe to thread...

     

    So_happy_smiling_cat2.jpg
    300 x 350 - 15K
  • mCasualmCasual Posts: 4,607
    edited July 2015
    removed
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited July 2015
    DigiDotz said:

    oi oi subcribe to thread...

     

    and who knows, maybe the 'tomorrow mentioned in the title is today :)

    oops that picture is for the other similar script

     

    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited July 2015

    ( looks like the prefered image width is 800 )

     

    bluray.jpg
    1920 x 1080 - 642K
    blingaddabling.jpg
    1920 x 1080 - 848K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607

    ( looks like the prefered image width is 800 )

     

     

  • mCasualmCasual Posts: 4,607
    edited July 2015

    var joint = Scene.getPrimarySelection();

    var r = joint.getWSRot();

    var o = joint.getOrientation();

    o = o.multiply( r );

    there, now we have the current rotation axis for the selected node;

     

     

    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited July 2015

    the rotated joint orientation was the missing piece

    function getWSAxis( joint, axisNo ){	var v = new DzVec3( 0, 1, 0 );	switch( axisNo )	{		case 0:			v = joint.getOrientation().getXAxis();		break;		case 1:			v = joint.getOrientation().getYAxis();		break;		case 2:			v = joint.getOrientation().getZAxis();		break;	}	var r = joint.getWSRot();	return( r.multVec( v ) );}

    rotata.jpg
    1249 x 695 - 128K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited July 2015

    removed

    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited July 2015

    well that's odd

    i'm pretty sure that, as long as there's no rotation limits

    one can aim a vector anywhere using 2 rotation axis

    it almost works perfectly when i do, say, rotateY followed by rotate Z

    but not quite !

    in fact in one test situation it took 50 cycles of RotY/rotZ

    until i reached the limits of the float() precision

    imblue.jpg
    1464 x 826 - 219K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited July 2015

    maybe if i measure the needed angles first then apply them

    instead of measuring-applying them in turn

     

     

    ... nope same results

    rez1.jpg
    834 x 368 - 66K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited July 2015

    when i'm free to use all 3 axis, no problem

    with 2 axis, in 2 operations i get very close to the result, but i have to use successive approximations to get perfect results

    i hope to solve the 2 axis cases today ( as i did in recent todays :) )

    yz.jpg
    1920 x 1080 - 633K
    Post edited by mCasual on
  • JigSaw73JigSaw73 Posts: 80

    Subscribing for updates - thank you!

  • The script is looking really good, I've been wanting to do this for so long.
  • Hello

    Script seems nice but where can i download it ?

     

    Thanks for your hard work mcj

  • mCasualmCasual Posts: 4,607
    edited August 2016

    Hello

    Script seems nice but where can i download it ?

     

    Thanks for your hard work mcj

    i dont think i posted it

    i cant remember exactly why i didnt complete it , last summer

    i'll try not to forget it !

    well i do remember there were some vector/maths problems to solve, but usually i dont just stop!

    for now i have other projects i dont want to stray away from 

    but i'll get back to it soon'ish

    note that you can follow my current works here http://mcasual.deviantart.com/gallery/

     

    problem - i searched for that script on my drives and i fear it's one of the programs i lost in a hard drive incident ( hard drive, motherboard, cpu, monitor incident actually )

     

     

    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607

    i started resuscitating the mcjAimAnim script but it will be posted only later this autumn

     

     

  • ZaarZaar Posts: 3

    Hello mCasual.  Can't seem to find the script download link. Does the script still exist?  Would love to try it.

  • mCasualmCasual Posts: 4,607
    edited August 2016

    since i lost the code (hardware issues ) i was saying in the posts above

    that i will try to re-write it later this fall

    BUT there's my mcjOptimalPose script here

    https://sites.google.com/site/mcasualsdazscripts7/mcjoptimalposea

    which may actually be what mcjAimAnim became 

    my main animation tool based on goals is mcjAutoLimb

    https://sites.google.com/site/mcasualsdazscripts6/mcjautolimb2015

     

     

    Zaar said:

    Hello mCasual.  Can't seem to find the script download link. Does the script still exist?  Would love to try it.

     

    Post edited by mCasual on
Sign In or Register to comment.