tutorial #1

 

interactivity

 
 

Adding some Motion

First, select the matrix out connector of the identity matrix module.

Then, create a rotation matrix module by activating modules > matrix > rotate.

The new rotate module will be inserted between the identity matrix and the cube module.

Select the middle value in connector "rot(ation) y" and activate
variable > add > add modulated variable.

This creates a chain of three mathematical operation modules:

add <- multiply <- variable

The add module (green) adds the output of the multiply module (red) to the value of the "y rot" field. The multiply module multiplies the value of the variable module (blue) with the value at it's second value in connector, which is currently zero, because nothing is connected to it.

For a full rotation of the cube, set the variable's value to 360.

Note, that you can also see in the inspector that there is a value missing for the multiply operation (0 + * 360).

Let's provide some input for the multiplication by creating a modulator.

Creating a Modulator

Select the global modulator and create a new modulator module by activating variable > modulator.

Now, select both, the empty value in connector of the multiply module and a value out connector of the new modulator by clicking on them while holding down the SHIFT key.

Activate edit > module > connect to connect them. The appearing line indicates a successful connection between the two value connectors.

If you now select the rotate module you should see the complete calculation "rot y [0] + <F2> * [360]" in the inspector.

A rotation around just one axis is a little bit boring, so let's rotate around the z-axis as well. But try to do it in the following way:

Zoom on the selected rotate module (view > projection > zoom on selection).

Then select the value out connector off the add module while holding down the the ALT key. This will select all three modules: the add, multiply and variable module.

Copy the selection (edit > copy) and select the right value in connector of the rotation module ("rot z").

When you now activate edit > paste, you should get something like this:

(don't worry if your new operation chain isn't completely white, in this screenshot I just selected every part of it to highlight the pasted modules)

Animating the Cube

In play mode, you will see the cube rotating, after activating the modulator by pressing it's activation key F2 and starting the modulation with RETURN (Alternatively, you could activate and start the global modulator by pressing F1 and RETURN).

Change the speed by pressing * or / on the numberpad or reset the modulation by pressing PG_DOWN. For a complete list of keys that alter an activated modulator consult the modulators reference page.

You have now learned the basics of working with kodisein: how to create an object and animate it. In the next chapters I will skip the already learned steps and concentrate on more complex editing tasks.

 

SourceForge.net Logo