Problem Wheel Expresion


#1

Hi,

I’m a French student and I have a problem with my Robot. He move with a wheel, similar to a solowheel.

I created an expresion to when I move my ultimate controler on Z my wheel turn correctly but on some shots when I animate my controler frame 1 to 85 in viewport they are no problem my wheel turn always but on a playblast or when I rendered all frames during the beggining of the animation the wheel don’t turn and all of a sudden at maybe frame 23 the wheel beggin only to turn and it seems like she catch up. This problem are only on the beggining of animation. I think is a time problem not a rigg problem. I have this on only 3 shots/12

This is a reference file.

I try to import my reference, switch between real-time and every frame, start my animation at 0 or 1 and 40, change my start keys to linear or other, recreate my expression.

Thanks in advance,


#2

can you post the expression?
Keep in mind, if you rotate the control in any way, your expression must take that into account.

Best would be to not rig the rotation in the source scene, only in the final scene after the animation is all done. At least this is my conclusion.
And the expression should query the previous rotation, and calculate the current roatation on every frame. Slow and annoying, full of potential problems, this is why you add it when the animation is all done.


#3

Hi Leionaaad,

This is my expression :

if (wheel_move_ctrl.auto == 1 )
{
$diff = SAM_Wheel_grp.translateZ - SAM_Wheel_grp.Offset ;
SAM_Wheel_grp.rotateX -= $diff * -360 / (wheel_sizeShape.distance*3.14) ;
};
SAM_Wheel_grp.Offset = SAM_Wheel_grp.translateZ ;

If I rotate my Ultimate any way my wheel turn corectly.


#4

You expression expects certain sequence of execution (the “offset” attribute). You can’t guarantee this to behave correctly in playblast or especially rendering.

Try baking this animation. It will convert your expression into animation keys. This will help ensure that you’re not getting any evaluation surprises.


#5

Hi
Since the animation is on a referenced file, you can make changes in the rig file.
Use this script for wheels rotation when you translate to robot