Layer Palette

A Moho document is composed of layers, each of which can be independently edited and animated. Layers can be thought of as transparent sheets of plastic. You can draw separately on each of these sheets, and the final picture is the composition of all the sheets stacked on top of one another.

Layers can be added, removed, copied, and re-ordered. The layer palette is the window where all these operations take place in Moho, and is the topic of this chapter.

Overview

The layer palette is a sub-window that is always visible when working on a Moho project. The layer palette has two sections of interest. As seen below, these consist of the toolbar and the layer list.

The Layer List

Most of the layer palette is taken up with the layer list. This is a vertical scrolling list of all the layers in the document. The layers are stacked in order from bottom to top. That is, when the project is displayed, the lowest layer in the list is drawn first, followed by the second from the bottom, and so on up to the top. When two layers contain objects that overlap, this ordering determines which object is in front and which is behind.

Each layer is represented in the list with an entry that looks something like this:

Only one layer can be edited at a time in the Moho working area. The layer currently selected for editing (the active layer) is displayed in a highlighted color. To select a different active layer, just click on its entry in the layer list. A layer's entry provides you with three pieces of information: what type of layer it is, its name, and whether the layer is visible.

The leftmost icon indicates what type of layer each entry in the layer list is. The different types of layers include vector, image, group, and bone layers. At the right side of a layer's entry in the list is a visibility control, which controls whether a layer is visible or not. If a pair of eyes is visible in this box, any objects drawn in the layer will appear in the main Moho window, as well as in any rendering of the project. If you click this box, the layer will turn invisible and will not appear in the main Moho window. This can be a convenient way to remove clutter in the main window when you don't need to see all the layers at once. Also, only visible layers will appear when you render a view of the project or export an animation - you can generate test movies much quicker if you turn some layers invisible that don't involve what you're currently working on. Note: the visibility box of the currently active layer behaves differently. The currently active layer is always visible (how could you edit it if it wasn't?), and clicking its visibility box (while holding the <Alt> key) will turn all the other layers in the project visible or invisible.

Certain types of layers act as "groups", and can contain other layers within them. (You can think of them like folders on your hard drive.) These layers have a triangle on their left side. Clicking this triangle opens and closes these group layers, allowing you to access or hide the sub-layers they contain.

Layers can be re-ordered simply by dragging one layer above or below another layer. Just click and drag the layer you want to move - you will see a red insertion bar indicate where the layer will be placed when you drop it. When the insertion bar appears at the location you choose, just drop the layer and you're done. You can also use this method to drag sub-layers into or out of group layers. Layers can be re-ordered at any time, although their order is not dynamic over time. That is, the layer ordering cannot change in the middle of an animation, for example to make one object appear to move in front of another object.

The last thing you can control in the layer list is the property set of any layer. By double-clicking a layer in the list, a dialog will appear with various options controlling the appearance of the layer. This dialog is described in the Layer Settings section below.

Layer Toolbar

At the top of the Layer palette is a toolbar that provides several layer operations. The buttons in the toolbar are described below:

New Layer
Adds a new, empty layer to the project. A popup menu allows you to choose the type of layer you want to add. The new layer is placed directly above the current active layer.

Duplicate Layer
Makes a copy of the current active layer and adds it to the project. This new copy is placed directly above the current active layer. If you duplicate a group layer, all of the sub-layers inside it will be duplicated also.

Delete Layer
Deletes the current active layer. This operation cannot be undone, so you will be asked to verify if this is really what you want to do.

Layers Options
This command brings up a dialog with various controls to modify the layer's appearance. The next section, Layer Settings, goes into detail about these options. The layer settings dialog can also be invoked by double-clicking the current active layer in the layer list.

Layer Settings

The Layer Settings dialog can be invoked either by double-clicking a layer in the layer list, or by selecting a layer, then clicking the Layer Options button in the Layer toolbar. The various controls are grouped into sections that we'll describe in order.

Layer

This section controls some general properties of the layer. At the top of this section is the name of the layer. You can type in any name for the layer you want here, and the name will appear in the layer list after you click the OK button. Good names make working with large projects much easier. Examples of layer names might be "Background", "Body", or "Head".

Next is a checkbox, labeled "Cycle animation". If this box is checked, then when a layer's animation ends, it will start back at the beginning. For example, if you have an animation of a car driving for 10 seconds, and you want a wheel rotating the entire time, it is much easier to animate the wheel for one second and turn on this checkbox, rather than animating the wheel for ten seconds. When this box is checked, Moho automatically determines when to jump the animation back to the beginning - you don't need to tell it how long the loop cycle should be. Just set up the animation for as long as you want, and it will loop back to the beginning when it's done. Note: when this box is checked, everything in the layer will repeat its animation, so in the example above you'll probably want to place the wheel in a layer of its own.

The next two checkboxes are "Flip horizontally" and "Flip vertically". Clicking these boxes flips the entire layer in the direction specified. (If the layer is a group layer, then the sub-layers inside it get flipped as well.) This can be convenient in the case where you want to duplicate a layer and have the second copy face the first one as a mirror image.

The last checkbox in this group, "Scale compensation", is only available for vector layers. When this box is checked (as it is by default), and you scale an entire layer larger or smaller, the lines in the final rendered output will automatically get thicker or thinner so that they retain their relative weight in the overall image.

Animated Effects

This group of controls allow you to change certain layer properties over time. When you modify any of these while in animation mode, you will add a keyframe to the layer effects channel. For example, if you go to frame 1 and un-check "Visible", then go to frame 20 and re-check Visible, that layer will not appear in the final animation until frame 20.

So, that explains the first checkbox - it controls whether a layer is visible in the final output. It is important to note that this checkbox is totally independent of the visibility box displayed in the layer list: these are two separate notions of visibility, and don't affect each other at all. The visibility control in the layer list is meant for your editing convenience: you can turn one layer off while you work on another. The visibility checkbox in this dialog is meant to allow certain effects during an animation. For example, if you had a layer with a drawing of a glowing lightbulb, you could un-check the visibility of this layer at frame 1, then turn it on at frame 10, off at frame 20, on at frame 30, etc. to create the effect of a blinking light.

The "Blur radius" field lets you apply a blur (in pixels) to an entire layer to simulate such effects as camera focus. The blur can be animated over time to make a layer look like its coming in and out of focus.

Finally, the "Alpha" field allows you to modify the transparency of an entire layer. An alpha value of 255 will not affect the layer at all, while a value of 0 will make it totally transparent. By changing the value from 0 at frame 1 to 255 at frame 10, the layer will seem to gradually appear out of nowhere, which in some cases is more desirable than the type of on/off visibility provided by the "Visible" checkbox.

Layer Shadow

This section lets you apply a drop-shadow effect to a layer. Checking the "Shadow on" checkbox will make all objects in the layer cast shadows on the layers underneath.

"Shadow direction" controls the direction the shadow is cast. Just drag the knob in circles to change the direction of the shadow.

"Offset" controls how far the shadow appears from the actual objects. A larger offset makes objects appear higher up above the layers below them. "Blur" determines how hard or soft the edges of the shadow appear.

Finally, clicking on the "Shadow color" color swatch lets you change the color of the shadow that is being cast. You can also modify the transparency of the shadow with this control.

Layer Shading

This section is similar to the "Layer Shadow" section above. However, instead of producing a shadow effect behind the layer, these controls let you apply a shading effect on top of the layer. Checking the "Shading on" checkbox will make all objects in the layer appear shaded, giving them a rounded edges effect.

"Shading direction" controls the direction the shading appears. Just drag the knob in circles to change the direction of the shading.

"Offset" controls how far inside the layer objects the shading appears. A larger offset makes objects appear to have more "rounded" edges. "Blur" determines how hard or soft the edges of the shading appear.

Finally, clicking on the "Shading color" color swatch lets you change the color of the shading that is applied. You can also modify the transparency of the shading with this control.

Noise Effect

The last group of controls is labeled "Noise Effect", and is available only for vector layers. By adding "noise" to a layer, you can make it look more hand-drawn, or at least get rid of some of that pesky computer precision. Of course, that's up to artistic interpretation: if you like computer precision, the noise effect may not be the feature for you.

The first two checkboxes turn on noise for outlines and/or shapes. If you turn on both of these, all the shapes in the layer will become distorted. However, if you check only one, the effect will look like someone was coloring but didn't stay in the lines. The circle displayed on the right side will show a preview of what your Noise Effect settings will do to the final drawing. (The best way to understand this feature is to just start clicking the checkboxes and watch the circle.)

The third checkbox, "Animated", controls whether the noise factor will vary over time in your animation. This can lead to either a very distracting look, or a very sketchy, free-form one, depending on your tastes. Again, experiment with this and watch the circle.

Finally, there are two input boxes: "Offset" and "Scale". Offset determines how far in pixels (on average) your drawing will be distorted from its original shape. Scale determines the "jaggedness" of the distortion. Larger scale numbers will result in smoother, lumpier distortion, while smaller numbers will give you a more scribbled look.