6.5 Using sliders

There are no custom interface elements in Universe for user defined actions. We will use the morph window instead to build our own custom control slider panel to control our animation. To do so, go into Modeler and create a simple line with the line tool. Name the line "Controller" and save it to a fact file "controller". Add the line model to Animator. Select the controller model file and go to the morph window.

When you need a new custom slider you go to the finder and make a duplicate of the controller model and name it like the channel you want to control - "scale" for example. We go back to Animator and add a new morph group to the controller model and add the duplicated model as a morph target. We will get a slider which is named "scale"

Click the image to get a larger view.

With this method you create as much sliders as you need with an understandable naming. In the example we have added a morph group named "torus" to the controller model and have named the sliders rotateX, rotateY, rotateZ, scale and twist. With each of these sliders we are going to control the corresponding animation channels of the Ubershape torus. Since the morph channels of a model are also available in Xpressionist, we can use them as custom variables to drive the torus properties. We write this expressions:

Torus.Pitch_X = controller.torus.rotateX * 90;
Torus.Yaw_Y = controller.torus.rotateY * 90;
Torus.Roll_Z = controller.torus.rotateZ * 90;

Torus.XScale = controller.torus.scale;
Torus.YScale = Torus.XScale;
Torus.ZScale = Torus.XScale;

Torus.Region1.Twist.Angle = controller.torus.twist * 90;

Now if you move the morph sliders of the controller model file, you control the properties of the Torus object. With multiplicators behind the morph variables you can set ranges for the sliders in the morph window.

You can build complex custom controls for characters, hands, fingers or any other aspect of any other thinkable animation you want to control with a slider.

get project file sliders.prj

Xpressionist 3.5