Friday, 17 April 2015

2D cutout animation in Blender - written tutorial

2d cutout animation in blender written tutorial
2D cutout is a fun, quick way to turn 2D art into moving images. Here is my workflow for doing this with the free 3D package Blender for the animation and some preparation work in Photoshop.


First of all, of course you need to have your 2D drawing that you are going to animate. And you need to have all the elements that move individually as seperate images, saved as .PNG files with transparency. Be sure to name the .PNG files clearly.

To save the PNG's from Photoshop with transparency, I have all the elements for the character as seperate layers in Photoshop, and simply turn off the other layers, then save as .PNG. This will save it with transparency around the painted part. Do this for all the layers.

Exporting the layers as PNG files from Photoshop

Next, you import them in Blender. Create a new project, remove the standard cube, light and camera by selecting them (right-click) and deleting them (Del or "X" key).

If Blender is not responding correctly to these commands, make sure "emulate 3-button mouse" is turned on in the Preferences, as well as "Select with Right".

Correct mouse settings in Blender
While we are in the preferences, go to Add-On, and from the long list turn on "Import Images as Planes". This will greatly speed up our next steps.

Import Images as Planes add-on
Go to File > Import > Images as Planes and turn on "Shadeless", "Premultiplied", "Use Alpha" and "Z-transparency". This will make sure we see the images correctly and with transparency. You don't need lights in the scene because the materials are Shadeless, they show up as you've drawn or painted them. Note that the image planes all have the correct names automatically assigned to them, taken from the image file names.

Settings to import images on planes with transparency

Make sure "Textures" is turned on in Viewport Shading.

Make sure your viewport shows textures!
Now you have all the object in the scene. They might be lying flat on the 3D floor, since you should have them all selected, press R + Y + 90 to rotate them 90° on the Y-axis, making them stand up. (Or R + X + 90, in case that didn't work out correctly).

Freshly imported images on planes with transparency
Now move the object in their initial correct place by selecting them individually and moving them (G) and if necessary scaling them (S) to their correct size. You can move objects on a specific axis by pressing G+X for example for moving exclusively on the X-axis. It may be easier to align the objects this way in an orthographic front view. Press "1" to go to the front view. "5" toggles between orthographic (flat) and perspective view.

The planes are all exactly on the same place in the Y-axis, we need to give them a small amount of space in between each other, otherwise it will "flicker" a bit when rendering. Place the objects on the Y-axis in a logical way, so the right objects are in front of the others.

Sideview of the planes
Okay, so far so good! Now, we need to make sure these objects have correct pivot points. That's the point from where their rotation or movement originates. This is easy, just left-click in the viewport on the object where you want the pivot point to be and then hit this bone-breaking keyboard shortcut: SHIFT+ALT+CTRL+C. Select "Origin to 3D cursor". Do this for all the objects.

Setting the pivot point of the legs

Next, we need to parent the objects. What this means is, if you move the main body part of a character for example, the arms will follow while still maintaining the possibility of individual movement. To do this, select the object that needs to be the "child", then hold SHIFT and select the object that needs to be the "parent". Press CTRL+P. Choose "Object (keep transform)". Note the dotted line between the objects, showing the child-parent relationship. If you make a mistake, you can remove this relationship with ALT+P (remove parent).

Parenting everything to an Empty
It would be nice to be able to move the whole character at once. For this we will use an "Empty". Press SHIFT+A and choose "Empty", then "Plain axis" or something else (doesn't really matter, it's just the appearance). Place the empty somewhere near your character. Now select all the parts of the character, then finally SHIFT+select the Empty and parent to it with CTRL+P. You can also do this in the Outliner (the list of items in the scene on the top right of your interface), especially if there are a lot of parts this is easier.

When you've finished this, you've done the hard part! Now you can select individual parts and see how they move, with the R (rotate) and G (move) keyboard shortcuts.

Now you can start animating. It might be easiest depending on what kind of character you've set up, to do the big movements first (for example, moving from left to right) by grabbing the Empty and moving everything at once with this. You can then go back and animate the legs and arms. Animating is easy now: just move the parts in the position you want, and press "i" to make a keyframe. Choose "LocRotScale" from the keyframe menu. Move to another position in time on the timeline (bottom part of your viewport), create a new pose and press "i" (LocRotScale) again. And so on! Check your animation by playing it back with the play buttons below the timeline or just press ALT+A to play and pause.

Adding a keyframe by pressing "i" and selecting "LocRotScale".

If you want to record this incredible masterpiece, just add a camera with SHIFT+A (choose "Camera", obviously). Do this in the front orthographic view so it already points the right way. Move the camera back in a perspective view or a side view. Set up another window as the camera view so you know what it's seeing. To do this, just click and drag left on the little triangle corner in the top right of the view. This will open another view. Press "0" (zero) to change this to the Camera view.
You might need to make the "lens" of the camera longer to emulate an orthographic view. Do this by selecting the camera, and go to it's data tab (has a little camera icon) in the properties on the right side of the screen. Change the focal length: the default is 35mm, something like 100mm to 200mm will probably work better, depending on your scene. Check the camera viewport until it looks good.

Making the lens "longer" to flatten the Camera image (click to enlarge).
Now that you have a camera, you can render it. In the Properties panel on the right side of the screen, click on the "camera" icon (not the film camera icon, but the photo camera icon). Click on "animation" to start rendering, and it will render it to your chosen file and specifications.

Watch the final animation here:



Let me know if you have any questions, if anything is unclear! Hope you enjoyed this written tutorial.

Possible trouble:

  • An object renders completely black: Make sure "Shadeless" is turned on in the object's material settings.
  • The transparency doesn't look the way it did in the 2D software (like Photoshop): Try changing the transparency in the object's material settings from "Premultiplied" to "Straight".
  • There's no transparency in the viewport: Make sure you are in "Blender Render". If that doesn't work, try "Blender Game". If that does nothing, check your Image Plane import settings, you need to turn on "Shadeless", "Premultiplied", "Use Alpha" and "Z-transparency".



Useful keyboard shortcuts:
Set pivot to 3D cursor: SHIFT+ALT+CTRL+C (do you have enough fingers?)
Create something new: SHIFT+A (then select what you need)
Parent an object to another object: CTRL+P (select one, then SHIFT+select the other then hit CTRL+P)
Remove parent: ALT+P
Set a keyframe: I (i)
Select: right-click
Delete; X
Move: G
Scale: S
Front view: 1
Camera view: 0
Toggle orthographic / perspective view: 5
Play/pause timeline: ALT+A

You can follow R&C on Facebook, follow me on Twitter, or hang out on our R&C Forum!

Download Blender here.

3 comments: