Fall 2016 - mcjAimAnim - Target, Targeter, Rotator, Animate
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 !!! )
Comments
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 )
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
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
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
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 :)
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
well ... tomorrow :)
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
( looks like the prefered image width is 800 )
( looks like the prefered image width is 800 )
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;
the rotated joint orientation was the missing piece
removed
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
maybe if i measure the needed angles first then apply them
instead of measuring-applying them in turn
... nope same results
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 :) )
Subscribing for updates - thank you!
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 )
i started resuscitating the mcjAimAnim script but it will be posted only later this autumn
Hello mCasual. Can't seem to find the script download link. Does the script still exist? Would love to try it.
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