# elliotwoods/VVVV.Tutorials.Fundamentals

Switch branches/tags
Nothing to show
Fetching contributors…
Cannot retrieve contributors at this time
37 lines (34 sloc) 4.37 KB
 Annotations

0 - Transforms

Let's setup a Quad with a Renderer.

If we try and manipulate the input pins on the Transform, then we can see how we can move, scale and rotate the object in a simple way

1 - Vector transforms

The Transform (2d) is good to get started and for a range of tasks, but let's also have a look at a different way of dealing with transforms which can be more elegant.

Select your Renderer and Quad by dragging a selection box around the 2 nodes. Then duplicate these 2 nodes using Ctrl+D to duplicate. You should now have a copy of the Quad and the Renderer. Move these further down the patch.

Now lets add a Scale (Transform Vector) and a Translate (Transform Vector). Connect the Transform Out of Translate into the Transform In of Scale and connect the Transform Out of Scale to the Transform input of Quad.

Now create 2 Vector 3D IOBox's using the double right click quick menu.

Connect these 2 new IOBox's to the Scale and Transform node's XYZ inputs.

Since your scale's input value is set to 0,0,0 your quad has no size. Increase this to 1,1,1. (Note: a quick way of doing this is to on the IOBox's Input Value Y and type 1 then Enter. This will set all slices in the spread to 1.

3 - Rotation

Now let's add another transform to the Transform stack. Let's add a Rotate at the top in the same way we added the Translate and Scale.

The units of rotation in VVVV are :

• 0 = no rotation
• 0.25 = 90 degrees (quarter rotation)
• 0.5 = 180 degrees (half rotation)
• 1 = 360 degrees (full rotation), back to the beginning

This normalisation of rotations may seem strange, but it becomes very useful for quickly doing maths with rotations and imagining them yourself.

In VVVV, simple rotations are about 3 axes (corresponding the input XYZ on Rotate (Transform Vector)). These are:

• X - Rotation about the positive X axis (the axis pointing right)
• Y - Rotation about the positive Y axis (the axis pointing up)
• Z - Rotation about the positive Z axis (the axis pointing out of the screen towards you)

For standard 2D rotations, you'll want to spin the object in the axis pointing out of the screen.

4 - Transform order

In computer graphics. The order in which transforms are performed is important, e.g.:

• Rotate then translate - Spin the object around the origin (the center of the object), then move it
• Translate then rotate - Move the object (hence move the center of the object), then spin the object around the origin (This causes the object to orbit around the center of the space).

Try to put the transforms in different orders to understand how this works. More on this later.