I am completely SPENT! i am sick in my stomach from battling for 2 days to get a simple TARGET Tag and some COFFEE Code to do what i want it to do.
Here is my dilemna… in two parts.
I have built a Camaro NEW GEN V8 engine (all the major internal components) for animation and simulations and i want to Rig/set it up for animation, so to do so…
First off i got a free COFFEE script which automatically positions the Piston to the cranks rotation (i only set the Con-rod lenght and the Journal offset to crank center), this works MUCH better than any IK rig and its so much faster to set up than Xpression with Trig, but when i assign a target expression to the CON-ROD so it always points to the piston the damn thing MIRRORS (or turns 180 degree BANK) itself and messes up the animation for every 180 degree that the crank turns.
Some of you may have done this type of animation before and are thinking, how the heck do you know the conrod spins 180 degrees or mirrors every TDC and BDC - well because the parts are built from the real engines parts they are not your average QUICK con-rods that have a basic shape and thats it. These particular con-rods have a flange or lip that has to point away from the journal and when it mirrors or rotates it is VERY obvious! and absolutely infuriating!
If somebody can PLEASE, PLEASE tell me how to get the Target tag from spinning or mirroring my con-rod every 180 degrees crank rotation, i’d be eternally grateful!
This one is not quite as straight forward, but i’ll try to explain it as best i can.
The COFFEE code/formula which i downloaded to control the piston has one small issue - It was only intended for SINGLE piston engines, not multi-piston motors like the V8 i built. It WORKS absolutely perfectly until i start to rig the second piston, then this happens…
Piston one is set up to move accordingly to the crankshafts rotation, it knows where to opsition itself based on the LOCAL or Object Y axis of the crank. Sadly a V8 Crank has 3 more journals that are offset 90 degrees from the first journal - and here is the trouble…
the second piston that i set up acts as if its part of the first journal, when infact it is Piston #3 in the real engine on Journal #2. It is basically Lagging 90 degrees worth of crank rotation because it uses the Local Y axis of the crank.
I have already tried to move the piston to where it would normally be without the 90 degree lag but no go, when i rotate the crank it teleports back to 90 degree lag and makes me wanna cry.
Now i thought i would be real smart and use Null Objects that are parented by the crank and only rotate them to offset the Crank Y axis causeing the lag, i updated the COFFEE code to use the nulls but now it cant find them - it finds the CRANK when i enter the cranks name but not anything that is a child of the crank.
I am not completely lazy so i consorted the manual and read about a method for Xpresso in which you can target a Parent objects child by using a D as a constant - The D refers to Down the Hierarchy and will find bjects that are lower or children of Higher or Parent objects.
I just need to know how to update the CODE to find children objects in the hierarchy. If somebody can help me with this i would really really appreciate it.
If you need copy of the code just ask, or wait let me paste it in here…
var cr= 46.2;
var cl= 144.8;
var p= op->GetPosition();
var ofw= doc->FindObject(“Crankshaft”); if (!ofw) return FALSE; <—
var rfw= ofw->GetRotation();
//get position of piston
<— See that Crankshaft next to the find object, how do i modify that to find the NULL under that Crankshaft???
thanks alot for any help or suggestions.