mayaAnimation

The mayaAnimation node can load animation files created in Maya, and use them to animate objects in YG. Currently this node only supports animation of transforms (position, orientation, and scale). You can use it to animate motion of objects, but not deformation. For example, you could use it to create a segmented, animated character, but not a smooth-skinned one.

Node Syntax


mayaAnimation (file("anim file"),start(clipnumber))
{
	object (file("model file"))
}

Animating a Bird in Maya

Exporting the model file

Select the bird and both wings. Export Selection as a .B3D file. Set the Hierarchy to Full. Export it as "bird.b3d".

Exporting the .anim file

Select the bird and both wings. Export Selection as a .anim file. Export it as "bird.anim".

Set up the YG Scene


mayaAnimation (file("bird.anim"),start(1))
{
	object (file("bird.b3d"))
}

Make the animation loop

The wings just flap once and then stop. To make them loop, change the post-infinity setting in Maya.

(click to enlarge)

Animate the bird's flight

Using Multiple Clips

the mayaAnimation node can load multiple .anim files as different clips, so one object can switch between different motions.
mayaAnimation birdanimation ( file("flight_1.anim"),file("flight_2.anim"),file("flight_3.anim") ) { object (file("bird.b3d")) } wandTrigger ( when(button1,birdanimation.start(1)), when(button2,birdanimation.start(2)), when(button3,birdanimation.start(3)) )

(c) Ben Chang