Every airplane has many parts, that can be moved or rotated – in particular, its control surfaces. On the ground, or in the flight, they are often out of their neutral position. During creation of the La-5 model I have tried to find the easiest way to control its moveable parts. This article describes the solution, I would like to propose. If you want to repeat or check the operations described below, load the La-5 model. Do not forget to read the description of its structure – it will allow you to follow this text.

For the current Blender version, download the Handle Panel add-on file, described in the 4th section of this tutorial.

For Blender 2.4, download the HandlePanel.py script file, described in the 3rd section of this tutorial.

1. Simplest case - canopy hood

Canopy hood on the La-5 slides backwards, along the rails, while it is being opened (see Fig. 1.1).

Fig. 1.1. Canopy hood, and its rails.

Of course, the cockpit canopy can be moved manually along its rails, in this model. Yet following such a trajectory always requires a special precision. Is there something in Blender, which automatically would restrict the movement of this element to its rails?

Yes it is. There are constraint object modifiers. I decided not to apply them to the canopy hood directly. Sometimes it can be difficult to select such an object among the others. In the real machine, the cockpit canopy assembly was built from four parts: the skeleton, made from a steel tube, the outer frame, formed from a dural tin, the layer of organic glass between them, and a small release handle. All these parts have been reproduced in this model. The steel tube inner frame is the parent of the rest. It is very easy to select unintentionally the glass object, instead of this frame. When you move it, the rest of the canopy assembly will remain on its place. Thus, it is better idea to create an artificial "handle" that would be located in a more accessible place. It will be the parent of the inner frame. The solution is shown in Fig. 1.2 and in Fig. 1.3:

Fig. 1.2. Additional, artificial objects: handle and its base.

I have added a canopy handle – 019.Hood.Handle. This object is the parent of the whole canopy assembly – it follows its movements. Hood.Handle object is located relatively far away from the the model, for easier selection.

Fig. 1.3. The hierarchy of this fragment.

My idea is to use the Hood.Handle object to move the canopy. It is located on a separate layer, which should be excluded from the rendering. To restrict its movement to one-dimensional slide along the rails, I have added an empty object – 019.Handle.Pos - to this model. It is the "base" of the Hood.Handle movement, and its parent. Handle.Pos object is fixed to the body of the airplane. Hood.Handle object has a constraint, which restricts its movement to the segment matching the rails. It is shown on the Fig. 1.4.

Fig. 1.4. Constraint, restricting the handle movement to a segment along Y axis (as it was in Blender 2.45)

Examine the settings of the constraint shown in the Fig. 1.4. It is a Limit Location constraint. (The Fig. 1.4 shows how it looked like in Blender 2.45. Its ranges are expressed relative to its parent. I think that it is easier to explain the idea using this old version of this constraint. The more "novel" one is shown in Fig. 1.5). The only allowed movement of the Hood.Handle object is along the Y axis (note that only the minY and maxY values create a non-zero range). Because the Local option of this constraint is turned on, range distances are measured from the parent of the Hood.Handle – the Handle.Pos object. It is the only reason of the Handle.Pos existence – to mark the handle neutral position. It is sometimes impossible to use any model part for this purpose – they have their centers in other places, ant not always they can be displaced. That's why it is easier just to use an Empty object here.

In later Blender versions, the convention of specifying the limit ranges has changed. Currently you have to write there the same coordinates, which are visible in Transform Properties window (Fig. 1.5):

Fig. 1.5. The current Limit Location constraint (as it was in Blender 2.49)

So – here is the first effect. You can easily grab the handle, from any view, not worrying about the distance nor direction of your movement. The handle "knows" its path, and will never exceed its limits:

Fig. 1.6. The handle can be moved “carelessly” now – it knows, where to go, and does not allow for any mistake.
2. Complex case – the engine cooling system

Canopy handle is a simple case. You will learn the real power of movement handles, analyzing the solution devised for the engine cooling system. It is demonstrated on Fig. 2.1:

Fig. 2.1. Moveable parts of the engine cooling system in La-5.

Although in the real airplane every of the elements, shown on the Fig. 2.1, had its own control, their position was always similar: opened at the low speed (or on the ground), and nearly closed at the high speed. It would be the best, if it all these parts could move, following a single control handle. But how to obtain such effect? The outlet shutters rotate around a skewed axes. The oil radiator flap has two actuators, which should follow its movement. And there are two rings of inlet shutters, each of them rotating along its own axis – one ring clockwise, the second – counterclockwise. How to join all these different movements with one handle?

Well, the solution is presented below, on the Fig. 2.2:

Fig. 2.2. The “virtual machine”, that moves the cooling system.

The movement of the handle is restricted by Limit Location constraint, relative to its parent – another empty Handle.Pos object. The displacement of the handle moves other helper (empty) objects. They are tracked, using Lock Track constraints, by the “transmission gears”, located between the outlet shutters. The cylinder mirrors the movement of right shutter to the left shutter (using a Stretch To constraint). The double wheels use Locked Track constraint to transfer the handle movement into a rotation – one clockwise, the another – counterclockwise. Their rotation is repeated by the wheels inside the rings of inlet shutters. For every inlet shutter there is an empty “target” object, “fixed” to the control wheel. Each shutter rotates along its axis, tracking its “target” through Locked Track constraint.

This "virtual machine" uses the constrains that were available in Blender 2.43 (in the time when I created this model). In the newer Blender releases Aligorth (the Blender developer responsible for the constraints) has added their new types. One of them is Transformation, which you can use as the “universal transmission gear”. You can obtain the effect, described above, with simpler constraint system that uses a few Transform constraints. (Example of such you can find in my later P-40B model).

What’s more, in Blender 2.43 the Limit Location worked always along the global coordinate system axes, even with in the Local mode! When I tried to rotate my model, this constraint would create mess with the engine cowling elements… This gave me the first impulse to write a Python script that would overcome this problem. In effect, I created an universal “control panel” to pose the models. I named it Handle Panel. Although the Limit Location is already fixed, I still use this script. It is easier to control the model using the GUI controls, than to search for the handle objects, dispersed in many different places.

3. Using the Handle Panel script (Blender 2.4)

I use this script for convenient control of the moveable parts. It is named HandlePanel.py, and available from here. Download it, and save into your Blender scripts directory - it will appear in Blender Scripts Window, as Scripts=>Misc=>Handle Panel menu command. It is also included as one of the Text Editor datablocks of the La-5 model, used in this tutorial. You can open it there and run by pressing [Alt]-[P].

(For Blender 2.5 there is the Handle Panel add-on - see the next section.)

For the La-5 model, Handle Panel screen in Blender 2.4 looks like on Fig. 3.1:

Fig. 3.1. Handle panel for the La-5 model (Blender 2.4).

For every handle that exists in the model, this script displays a single panel containing 3 tabs: Pos, Cockpit, Label. You can see ten of such panels in Fig. 3.1.

  • Pos tab: use it to set position of the moveable part (in fact: the handle). Move the slider Position, or just type its value - between 0% and 100%. Observe the model – it will adapt to your changes. You do not need to remember, where the neutral position of the handle is. Just press the Reset button, to set the moveable part into its "rest" state. Usually, this neutral position is at 0% or 100%. Some control surfaces have it at 50% (because they can be rotated in two directions). The "rest" position is always in the origin of the handle parent;
  • Label tab: optional. Use it to set the label, assigned to the control, as you like (see 05. Flaps item on the Fig. 3.1). Initially, the labels are identical to handle object names. Thus, we would have a panel named "019.Hood.Handle", for the canopy hood. You can change it to any more "user friendly" text. I would suggest to use the numeric prefixes, because panels on the screen are sorted alphabetically. This prefix would allow you to control the position of the particular panel in the Scripts Window;
  • Cockpit tab: [*Deprecated since Blender 2.48 - it is better to use the Transformation constraint*] optional – may be left blank. Use it to “synchronize” position or rotation of selected object with the position of the handle slider control. (See 02. Rudder item on the Fig. 3.1). I have used this tab for assignment of the cockpit controls, which have to follow the movements of airplane’s rudder, elevator, or ailerons. The OB input box let you to type the name of the object, that has to be synchronized. (When you click the […] button on its right side – the name of the active object will be pasted to the OB field). From menu button, below, you can select one of 6 possible transformations, that will be synchronized with the control movement. Finally, the Min and Max input boxes allows to set the displacement range. Cockpit tab can be also used for the controls outside the cockpit. When you examine the 00. Propeller panel, you discover, that there is a base (Handle.Pos) and a handle object, but they directly change nothing. The propeller axis rotates, because it is synchronized with the handle, through the Cockpit tab. It was the easiest way to set up a rotation bigger than 360 degrees.
  • 4. Using the Handle Panel add-on (Blender 2.5 and later)

    I use this add-on for convenient control of the moveable parts. It is named scene_handle_panel.py, and available from here. Download it, and add to your Blender. (Here you can find the description how to do it). Once installed, you will find this add-on in the Scene category of the Blender User Preferences:Add-ons window.

    When you activate this add-on, it adds the Handle Panel to your Scene properties tab: Fig. 4.1:

    Fig. 4.1. Initial state of the Handle Panel (Blender 2.5).

    When you press the Show/Refresh button on this panel, it will search your file and display the control panel for each found handle (Fig. 4.2):

    Fig. 4.2. Handle panel for the La-5 model (Blender 2.5).

    Each control panel contains 3 controls: Pos, Reset, Label. You can see ten of such panels in Fig. 4.2.

  • Pos: use it to set position of the moveable part (in fact: the handle). Move the slider Position, or just type its value - between 0% and 100%. Observe the model – it will adapt to your changes.
  • Reset button:use it to set the moveable part into its "rest" state. Usually, this neutral position is at 0% or 100%. Some control surfaces have it at 50% (because they can be rotated in two directions). The "rest" position is always in the origin of the handle parent;
  • Label button: optional. Use it to set the label, assigned to the control, as you like (see 05. Flaps item on the Fig. 4.2). Initially, the labels are identical to handle object names. Thus, we would have a panel named "019.Hood.Handle", for the canopy hood. You can change it to any more "user friendly" text. I would suggest to use the numeric prefixes, because panels on the screen are sorted alphabetically. This prefix would allow you to control the position of the particular panel in the Scene properties;
  • 5. Creating a handle panel for your model.

    On startup, Handle Panel script searches the current scene for the handle objects, that should be presented as the panels. This means, that you can utilize it for your own models. It will show a panel for every object, that:

  • has a name, that ends with “.Handle” suffix;
  • has a parent object (parent object origin is treated by this script as the neutral position of the handle);
  • has a Limit Location constraint, with toggle [Local] set on;
  • The 019.Canopy.Handle, presented in details on Fig. 1.2 – 1.6, is an example of such an object. Create similar ones in your model. It is up to you, what will be "connected" to the movement of this object. Test the newly created handle, moving it along the predefined track, with the Limit Location constraint active. Handle Panel script will use the information from this constraint, to determine the path for this object.

    6. Animating the airplane.

    “Handle” objects are also usable for animations: connect them to a set of IPO curves. Use Handle Panel to prepare handle position for every keyframe. Notice, that many La-5 handles (the rudder, the elevator, propeller, ailerons and slats) have IPO curves assigned. Their keyframes were created using the Handle Panel script.

    Fig. 6.1. IPO curve, assigned to the propeller axis (004.Prop.Axis), in the La-5 model.

    Fig. 6.1 shows the IPO curve, that controls the rotation of the propeller. Keyframes for this curve were prepared using the Handle Panel script. This motion is responsible for the motion blur of the propeller blades. This effect occurs, when you turn the MBLUR Renderer toggle on.