In this tutorial you will learn how to use images as textures to add detail to a character.
For this tutorial, we'll start with a project file that's almost finished. It's named "Tutorial 4.4" and it's located in the "Tutorials/4 - Images" subfolder within the main Moho folder. Open this file in Moho, and you should see something like this:
Starting point for this tutorial.
Play back the animation to see what's going on, and then be sure to rewind the animation to frame 0. What you're going to do is hand paint some texture details to go on this character.
The first step is to paint some textures to go on this headless animal's body. Select the File->Render menu command to create a full-quality view of the animal's current state:
Rendered animal.
In the popup menu at the bottom of the Render window, select "Copy To Clipboard". Then, start up your favorite image editing program (we recommend Adobe Photoshop) and create a new document the same size as the Moho project (320x240 in this case). Paste the copied image into the new document.
Create a new layer in your image editing program and paint some kind of texture details onto the animal's body parts. It's very important that the texture be on a layer of its own. If you're using Photoshop, the layer arrangement would look something like this:
Layers in Photoshop.
You can paint whatever details you want. Here's an example of something you might paint in your image editor. Don't worry about painting outside the lines:
Painted on texture.
When your texture is finished, get rid of the background layers so that only the texture is left with a transparent background (you're still working in Photoshop or similar program at this point):
Background removed.
Finally, you need to save the texture as three separate files - one for the back legs, one for the torso, and one for the front legs. For each version of the texture, delete the parts of the texture that are not attached to the corresponding body parts. Save the images in PNG format, since PNG properly stores the transparent background. Name the files "back_tex.png", "body_tex.png", and "front_tex.png". Here's what the three textures should look like:
Back legs texture. back_tex.png
Body texture. body_tex.png
Front legs texture. front_tex.png
You're done working with the image editor - it's time to bring the textures back into Moho.
Note: If you're having trouble creating the image textures, the files used in this example are available for you to examine. Look at the file "Tutorial 4.4 Texture.psd", located in the "Tutorials/4 - Images" subfolder within the main Moho folder - this is the Photoshop file. Also, look at the files "back_tex.png", "body_tex.png", and "front_tex.png", which are the finished texture files.
Back in Moho, create a new Image layer, and select "back_tex.png" as the source image. Place the layer inside the bone group, just above the "Back Legs" layer. Create another image layer for "body_tex.png" and place it just above the "Body" layer. And finally, create a third image layer for "front_tex.png" and place it just above the "Front Legs" layer. Here's how the new image layers should be arranged:
Three new image layers.
At this point, the textures are finished and in place, but they are a little messy, and go outside the bounds of the actual body parts:
Textures applied in Moho.
The final step is to clean up the texture edges using layer masking. Double-click the "Skeleton" layer in the Layers window to bring up the Layer Settings dialog. Go to the Masking tab, and set the group mask to "Hide all":
Turn masking on for the group.
Next, double-click the "Back Legs" vector layer to bring up the Layer Properties dialog for that layer. Go to the Masking tab, and set the masking mode to "+ Clear the mask, then add this layer to it":
Set the masking mode for the Body layer.
What this masking mode does is make all objects invisible, except where this layer has solid areas. So, the "back_tex.png" image layer will only be visible directly on top of the "Back Legs" vector layer, preventing the texture from going outside the lines of the back legs. Set the masking mode for both the "Body" and "Front Legs" layers to "+ Clear the mask, then add this layer to it", just like you did for the back legs. At this point, all the textures should be forced to stay inside the lines:
Textures cleaned up with masking.
Play back the animation again and you'll see the image layers warp along with the vector layers in response to bone movement.