created February 7, 2005

<== Alle Maya-Befehle in diesem Buch - Alle! In Deutsch!

Basic things you should know (and maybe never dared asking).

Grundsätzliches, was Sie wissen sollten (aber vielleicht nie zu fragen wagten)

Can I Drive a Key?

Kann ich einen Key fahren?

Good idea! Driven Keys are such a fine and actually quite old feature in Maya that we should spend a couple of minutes to explore them. Here's the Maya 6 Binary Scene.

Driven Keys are neither conventional keyframes (where you tell an object to be here at time X and there at time Y) nor direct and rather rigid connections of attributes. If you don't know about the latter, never mind. A typical application for Driven Keys is one object manipulating another.

Let's create a cube and a cone. The cone will serve as our lever.

Gute Idee, denn Driven Keys, deutsch wörtlich: "getriebene Schlüsselpositionen", sind ein so feines und übrigens ziemlich altes Feature in Maya, dass es sich lohnt, ihnen einige Minuten Zeit zu widmen. Hier ist die Maya 6 Binary-Szene.

Driven Keys liegen thematisch zwischen konventionellen Keyframes, wo man einem Objekt sagt: Jetzt bist du hier, später bist du da, und der strengen direkten Verknüpfung von Attributen. Wenn Sie letzteres nicht kennen - keine Sorge. Ein typischer Fall für Driven Keys ist, wenn ein Objekt ein anderes manipulieren soll.

Fangen wir mit einem Würfel und einem Kegel an. Der Kegel wird uns als Hebel dienen.

What we want to automate is this: When we rotate the cone clockwise from left to right like a lever the cube shall move from left to right. We will achieve this goal with just a few clicks and without a single conventional keyframe.

Unser Ziel ist es, dass wir den Kegel wie einen Hebel im Uhrzeigersinn von links nach rechts drehen und sich der Würfel dabei automatisch von links nach rechts bewegt. Wir werden diese Automatisierung mit nur wenigen Klicks und ohne einen einzigen klassischen Keyframe erreichen.

First we need to know which parameter changes when we rotate the cone. In my case it's the Rotate Z channel. See the Channel Box.

Zunächst sehen wir uns an, welcher Parameter sich ändert, wenn wir den Kegel drehen. In meinem Beispiel ist es - schön sichtbar rechts in der Channel Box - der Eintrag Rotate Z.

And it's the Translate X value which changes when I move the cube from left to right:

Und es ist der Wert von Translate X, der sich ändert, wenn ich den Würfel von links nach rechts bewege:

Equipped with this knowledge we press the F2 key to bring Maya into its animation mode. We open the Set Driven Key option box: Animate --> Set Driven Key --> Set [o]. Remember: We need the option box here!

Mit diesem Wissen ausgestattet drücken Sie die Taste F2, um Maya in den Animationsmodus zu bringen. Jetzt können Sie die Options-Box von Animate --> Set Driven Key --> Set [o] öffnen.

The Set Driven Key window is not exactly a beauty. But quite practical. We will load the cone into the upper section because it will serve as our driver. It will drive the motion of the cube. So, with the cone selected, choose: Load --> Selected as Driver.

Dieses Fenster strotzt nicht gerade vor Schönheit, aber es ist ganz praktisch. Wir wollen den Kegel in den oberen Bereich laden, weil dies der Bereich für den Driver ist, den, der antreibt. In unserem Fall soll ja der Kegel den Würfel antreiben. Wählen Sie also den Kegel aus und lösen dann den Befehl Load --> Selected as Driver aus. Zu deutsch: "Lade --> Ausgewähltes als Antrieb."

You see the cone and its main attributes appear in the top section. With the cube selected choose: Load --> Selected as Driven.

Sie sehen, wie der Kegel (Cone) und seine Attribute im oberen Bereich auftauchen. Wählen Sie jetzt den Würfel aus und laden ihn als Driven ("Angetriebenen") ins untere Fenster: Load --> Selected as Driven.


Your Set Driven Key window should look like in the following illustration.

Now, the fun part begins. In the Perspective Window move the cube into its most left position and rotate the cone to a left position.

Back in the Set Driven Key window we'll do three things.

  • Choose the appropriate attribute of the Driver in the upper right section (rotateZ in my case),
  • choose the attribute of the Driven further down on the right (tranlsateX in my case) and
  • finally click Key.

Leave the window open for now. We're not quite done yet.

Ihr Set Driven Key-Fenster sollte jetzt ungefähr bestückt sein wie das in der nächsten Abbildung.

Nun fängt der Spaß an. Bewegen Sie im Perspektivfenster den Würfel in seine linke Position, und drehen Sie den Kegel nach links, dahin, wo Sie sich den Anschlag vorstellen würden.

Zurück im Set Driven Key- Fenster erledigen Sie nun drei Dinge:

  • Wählen Sie im oberen rechten Bereich das betreffende Attribut des Antreibenden (Driver) aus - in meinem Beispiel ist es rotateZ.
  • Klicken Sie unten rechts auf das betreffende Attribut des Angetriebenen (Driven) - in meinem Fall translateX.
  • Schließlich klicken Sie auf Key.

Schließen Sie das Fenster vorerst einmal noch nicht. Wir sind noch nicht ganz fertig.


Maya has now linked the left rotation of the cone to the left position of the cube. If you move the cube to another position and then turn the cone, the cube will snap back to its original left position.

In the last step we'll link the lever's right rotation to the cube's right position.

Turn the cone clockwise to its right "limit". Move the cube to a corresponding right position. With the previously selected attributes still selected in the Set Driven Key window, click Key again. The right rotation and position are now connected. Time to close the Set Driven Key window.

Maya hat jetzt die linke Drehstellung des Kegels mit der linken Position des Würfels verbunden. Wenn Sie den Würfel woandershin bewegen und dann am Kegel drehen, schnappt der Würfel zu seiner linken Position zurück.

Wir bemühen das Set Driven Key-Fenster nun ein zweites Mal, diesmal für die rechte Position. Drehen Sie den Hebel (den Kegel) im Uhrzeigersinn in seine Rechtsstellung, und bewegen Sie den Würfel in eine dazu passende Stellung nach rechts. Im Set Driven Key-Fenster sollten die Parameter von vorhin noch ausgewählt sein. Klicken Sie nun noch einmal Key. Damit wird auch die rechte Extremposition des Würfels und Kegels verknüpft. Zeit, das Set Driven Key-Fenster zu schließen.

Now, when you turn the lever (the cone) the cube will move. Turning it counter clockwise moves the cube to the left until it reaches its final position. Turning the lever clockwise moves the cube to the right until it reaches its final position.

In an animation you could now set standard keyframes for the lever's rotation and don't have to care about the cube. Its position will update automatically - a present from the Driven Keys.

Wenn Sie jetzt den Hebel drehen, verschiebt sich der Würfel: gegen den Uhrzeigersinn bewegt er sich bis zum Anschlag (aber nicht weiter) nach links, mit dem Uhrzeigersinn entsprechend nach rechts.

In einer Animation könnten Sie nun normale Keyframes für die Drehung des Hebels setzen und müssten sich nicht um die Position des Würfels kümmern. Die bekommen Sie durch Driven Keys geschenkt.


Final Note.

Driven Keys are an excellent tool for semi-automation. You can perform complex operations by just turning a lever. Driven Keys don't depend on time and give you more flexibility than a hardcore Expression or a direct connection of attributes would.

Abschlussbemerkung.

Driven Keys sind ein hervorragendes Werkzeug für eine Halbautomation. Sie können komplexe Dinge ausführen lassen, indem Sie nur einen Hebel drehen. Driven Keys sind unabhängit von der Zeit und bieten mehr Flexibilität als harte mathematische Expressions oder die direkte Verknüpfung von Paramtern.