This tutorial will show you how to build and move around in a 3D scene in Moho. Moho isn't a full 3D program - layers in Moho are 2D planes that exist in a 3D space. However, by positioning these 2D layers carefully, and moving around them using the 3D camera, you can create a convincing 3D environment.
For this tutorial, we'll start with a project file that's almost finished. It's named "Tutorial 5.8" and it's located in the "Tutorials/5 - Animation" subfolder within the main Moho folder. This file has some simple artwork that we'll use to build a 3D scene. The layers in this file are set up as shown:
Starting point for this tutorial.
The editing view should look like this to begin with:
Starting point for this tutorial.
The first step in creating our 3D scene is to set up the ground plane. Select the "Background" layer - this layer has already had a simple terrain drawn onto it, we just need to position it correctly. Activate the Rotate Layer X tool, and in the tool options area at the top of the main Moho window, enter an angle of -90. Even though the Background layer is just a flat 2D object, it can still be rotated and positioned in true 3D space:
Adjusting X rotation.
Next, activate the Translate Layer tool, and in the tool options area, enter -0.25 as the Y value:
Adjusting position.
Finally, activate the Scale Layer tool, and in the tool options area, enter 5, 5, 5 as the layer's scale values:
Adjusting scale.
What these settings do is to rotate the Background layer so that it lies down horizontally, lower it a bit, and spread it out wide to cover a large area. Perfect settings for a ground plane. The scene should now look like this:
Ground in position.
The next step is to create and position foreground objects. A simple tree has already been created for you - let's set it up in 3D. Often, positioning objects in 3D can be easier done from an overhead view. Use the Orbit Workspace tool to rotate the view of the scene so that it looks something like this. (Notice the little blue wedge in the scene - this represents the camera.)
View from above.
Now select the "Tree" layer, and make the Translate Layer tool active. Double-click the Tree layer. In the Layer Settings dialog that comes up, turn on the "Rotate to face camera" checkbox (you'll see why this is important later). Now, in the tool options area, set the Position X value to -3.25, and the Z value to -2.25. The tree will be moved to the far corner of the scene:
Moving the tree.
OK, that's one tree - now add several more. Duplicate the Tree layer, and set new values for the X Position and Z Position. Repeat the process several more times, just scattering trees across the landscape. Any values for X and Z Position will do, as long as they're roughly in the range between -3 and 3. Keep going until you've created about 12 more trees. Position them all over the place - close to the camera, far away, behind it, etc. When you're done you should have a small forest:
A forest.
Here's a trick: if you have a mouse with a scroll wheel, instead of typing in numbers for the X and Z values, try holding the mouse over those text fields and turning the wheel. The value in the field will change, and you can watch the layer move - just keep turning the wheel until the layer is where you want it.
Now the "Rotate to face camera" checkbox may be clear. The Tree layer (and all of its duplicates) automatically turns to face the camera - notice how each tree is turned in a slightly different direction. This makes sure the camera always has a full view of that layer. This may not always be what you want, but for scenery objects, it can be a good trick, especially when the camera starts moving.
The last step to finish off the forest is depth sorting. Double-click the "Foreground" group layer. In the Layer Settings dialog, click the "Depth Sort" tab. Turn on the "Sort layers by depth" checkbox and click OK. Now all the tree layers in this group will be sorted according to their distance from the camera.
Now that we've got a filled-in scene, lets take a tour. Select the View->Reset menu command. You are now looking at the scene from the camera's point of view:
Camera view.
Set the current frame to 48 and activate the Track Camera tool. While holding down the <alt> key, click and drag downward in the editing area. (The <alt> key tells the Track Camera tool to move the camera forward and back.). Keep dragging downward until you've moved forward almost to the edge of the ground layer.
Forward movement.
Now activate the Pan/Tilt Camera tool. Hold down the <shift> key and drag to the side to turn the camera around. (The <shift> key prevents you from rotating the camera up and down.) It doesn't matter where you turn to - just point the camera in an interesting direction:
Turn the camera.
Set the current frame to 96, and use the Track Camera tool to move forward again (be sure to hold down the <alt> key to move forward). After moving forward, turn the camera in a new direction (be sure to hold down the <shift> key). Continue this process (advance the current time, move forward, and turn the camera) as much as you want, taking a little tour of your 3D scene.
When you've moved around as much as you want, try playing back the animation. While playing back the animation, use the Orbit Workspace tool to view the scene from above. There are two things to notice here: first, if you activate the Track Camera tool again, the path of the camera is visible when viewing the scene from above. This can be useful when planning out camera moves. Second, watch how the trees turn during the animation to always face the camera. That way, the camera never catches an edge-on view of any tree, which would kind of spoil the 3D effect.
View from above.
Feel free to experiment with more camera moves, or to add objects of your own to the scene.