This tutorial shows you some of the 3D-related features of Moho. Moho allows you to move layers in three dimensions to create an accurate simulation of depth. In addition, Moho has the option of sorting layers by depth, allowing layers to move in front of and behind each other during the course of an animation.
For this tutorial, we'll start with a project file that's almost finished. It's named "Tutorial 5.4" and it's located in the "Tutorials/5 - Animation" subfolder within the main Moho folder. Open this file in Moho, and you should see something like this:
Starting point for this tutorial.
This file contains two layers and a simple animation of a circle moving back and forth in front of a square. Try playing back the animation to see what it looks like.
Now we're going to try moving a layer in 3D - towards and away from the camera. Set the current frame to 12 and activate the Translate Layer tool. Make sure the "Circle" layer is active. Now, while holding down the <alt> key, drag downwards in the editing area. You'll see the circle get larger - this is because it is moving closer to the virtual camera. The <alt> key modifies the Translate Layer tool to move a layer forward and back. Drag the Circle layer until it looks about like this:
Circle moved forward.
In the tool options area at the top of the main Moho window, notice the value of the Z field. It should be somewhere around 1.0 (the exact value isn't important here). Positive depth (or Z) values are closer to the camera (in the direction out of your screen), while negative values point away from the camera (into the screen).
Next we'll try moving the circle away from the camera. Set the current frame to 36. Again holding down the <alt> key, use the Translate Layer tool and drag upward in the editing area. Keep going as the circle gets smaller (farther away), until it looks like this:
Circle moved backward.
The Z value in the tool options area should now be close to -1.0. Try playing back the animation again - the circle should now grow larger and smaller as it moves towards and away from the camera. However, it always appears in front of the square. As it moves farther away, it should be going behind the square, which brings us to...
If you do move layers forward and back, as in this tutorial, you may also want layers to move behind and in front of each other. Moho can do this automatically - all you need to do is to turn on a single checkbox. Select the File->Project Settings menu command. In the dialog that appears, turn on the "Sort layers by depth" checkbox and click OK. This tells Moho to ignore the layer ordering in the Layers window, and instead draw layers in order from furthest to nearest. Play the animation again, and you'll see that the circle is drawn behind the square during the time that it is farther away.
To get a clear idea of what's going on, use the Orbit Workspace tool to turn the scene to an oblique angle. If you play back the animation from this point of view, you can clearly see the circle moving forward and back as it moves around the square. Once you have a good view, activate the Translate Layer tool to display the path of the Circle layer's motion.
View from above.
A note about depth sorting: The checkbox we turned on to sort the layers by depth only sorts the top-level layers in a Moho project. If you want to sort the sub-layers in a group, double-click the group layer to bring up the Layer Settings dialog. There you will find a tab labeled "Depth Sort" - in this tab is a checkbox that you can turn on to depth-sort the sub-layers of the group.