Tutorial 6.9

Moon and clouds effect

Introduction

This tutorial shows you how to create the effect of clouds moving in front of a moon. Layer masking and blurring is used to create an effect that is not only good for a moon and clouds, but may inspire you to think of new ways to use layer masking.

Examine a Finished Animation

For this tutorial, we're going to examine an animation that is completely finished. Open the file "Tutorial 6.9", located in the "Tutorials/6 - Effects" subfolder within the main Moho folder. The layers in this file are arranged as shown below:

Starting point for this tutorial.

This animation relies on masking and blurring effects that aren't apparent in Moho's editing view. To see what the final effect is, either export the animation as an AVI or QuickTime movie. (Because blurring is a key part of this effect, exporting to SWF is not an option - SWF export does not support blurs.)

The final result.

Notice that the moon appears sharp until the cloud moves in front of it. Then, the parts of the moon obscured by the cloud become blurry. This effect is easy to achieve using layer masking.

How It's Done

There are two parts to this effect. First, there are actually two moons in the animation: The "Moon" layer is the regular, sharp version of the moon you see in Moho's editing view. Two layers up is the "Blurry Moon" layer - this is a duplicate of the "Moon" layer, with some layer blur applied.

The trick is to control which moon is visible at which point in time in the final exported movie. To do this, we use layer masking. Try double-clicking each of the layers in turn to bring up the Layer Settings dialog - then, go to the "Masking" tab. You'll find that the "Sky" group has masking turned on - by default, all objects are invisible. The "Moon" layer is set to be immune to masking, while the "Cloud" layer adds to the layer mask.

The result of these mask settings is that first the "Moon" layer is drawn - this is the regular, sharp moon - and is not affected by any masking. Next, the "Cloud" layer is drawn on top of that. When the cloud moves in front of the moon, it covers up the moon. Finally, the "Blurry Moon" layer is drawn on top of the cloud. Because of the mask, the blurry moon only appears on top of the cloud, it is not visible outside of the cloud object. Even though the blurry moon is in front of the clouds, the effect looks like the moon shining from behind the clouds.

Here's another example of the same technique. In this case, we see a character who appears to be blurred by the smoke passing in front of him. The exact same blurring and masking trick is used as in the case of the moon:

The final result.