//--------------------------------------------------
//
// Create a cylinder, rotate and position it on the floor.
// Delete the History and Freeze Transforms
// Group the cylinder.
//
// The Group can be animated using Translation Z and
// the wheel will Rotate automatically
//
//--------------------------------------------------
if(frame==1)
{
// reset the wheel and global group back at the origin
globalTransforms.translateZ=0;
wheel.rotateX=0;
}
else
{
// translate the global group
globalTransforms.translateZ+=0.1;
// rotate the wheel according to global group
translateZ value
wheel.rotateX=360*(globalTransforms.translateZ/
(2*$PI*$wheelRadius));
}
Wheel Roll back and forth
Type :
Expression
Description :
A wheel rotates according the
distance translated along a single axis.
//--------------------------------------------------
//
// Create a cylinder, rotate and position it on the floor.
// Delete the History and Freeze Transforms
// Group the cylinder.
//
// The Group can be animated using Translation Z and
// the wheel will Rotate automatically
//
//--------------------------------------------------
if(frame==1)
{
// reset the wheel and global group back at the origin
globalTransforms.translateZ=0;
wheel.rotateX=0;
}
else
{
// translate the global group
globalTransforms.translateZ=
(sin(deg_to_rad((frame)*$frequency)))*$magnitude;
// rotate the wheel according to global
// group translateZ value
wheel.rotateX=360*(globalTransforms.translateZ/
(2 * $PI * $wheelRadius));
}
Turbulence (Random Vibrations)
Type :
Expression
Description :
Add some random turbulence to an
Object. The main object is Grouped and a local
turbulence Expression is applied. This Group is
then Grouped again to allow GlobalTransforms or
even a Motion Path.
This
Expression has interesting possibilities when
considered for other Attributes than Translation
and Rotation.
eg. Light Intensity, Colour, Bump Depth
//------------------------------------------------------
//
// Create a model. Group it twice and name it as indicated
// in the Outliner above. Apply the Expression below to the
// localTurbulenceExpression Group.
//
//------------------------------------------------------
// noise(time*frequency)*magnitude
// frequency = speed
// magnitude = value
// rotate the
model between -3 and 3 degrees
local_turbulence.rotateZ = noise(time*0.8)*3;
//
translate the model between -1.2 and 1.2 in X
axis
local_turbulence.translateX = noise(time*0.8)*1.2;
//
translate the model between -0.6 and 0.6 in Y
axis
local_turbulence.translateY =
noise((time-10)*2)*0.6;
Crawling Insects (Automated Legs)
Type :
Expression
Description :
Add some random turbulence to an
Object. The main object is Grouped and a local
turbulence Expression is applied. This Group is
then Grouped again to allow globalTransforms or
even a Motion Path.
This
Expression has interesting possibilities when
considered for other Attributes than Translation
and Rotation.
eg. Light Intensity, Colour, Bump Depth
//------------------------------------------------------
//
// Create a model. Group it twice and name it as indicated
// in the Outliner above. Apply the Expression below to the
// localTurbulenceExpression Group.
//
//------------------------------------------------------
//////////////////////////////////////////////////////////////////
//
// MIDDLE LEG : LEFT
//
//////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
//
// MIDDLE LEG : RIGHT
//
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
//
// BACK LEG : LEFT
//
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
//
// BACK LEG : RIGHT
//
///////////////////////////////////////////////////////////////////