top of page

Augmented Reality from A to Z using Blender, Unity and Vuforia | part 7 : Animation

Video transcript :


Assalamualaikum. My name is Widhi Muttaqien.

This is part seven of the video tutorial series. In case you stumble upon this video directly be sure the check out the previous videos before moving on. The tutorial series is about developing augmented reality product from A – to – Z using Blender, unity and vuforia.  These tutorials are all based on my previous experience developing my own augmented reality product which is this flashcards Arabic letters and numbers augmented reality. Basically a flashcards to help children learning Arabic alphabet using augmented reality. I leave links below in the description if you like to learn more or purchase the flashcards from amazon.

In this video we’ll be focusing on creating the animation. First lets setup our scene so its better suited for creating animation. For animation we need at least 2 windows or panels open. One is timeline which we have in here already open. The other one is dope sheet panel. So lets just drag the top corner of the timeline to create a new panel. Then change the panel type to dope-sheet. We actually don’t need to see the time line view. Only the header so we can drag this down until the header of the dope sheet attached to the timeline header. Okay now lets go to frame one. In this frame, we want to record the pose of carny in keyframes. First select the armature. Make sure you are in pose mode. And to reset all of the bone transformation to its original. First press A to select all of them. Then press Alt G to reset their position. Then we press Alt R to rest their rotation as well. So again I repeat, press Alt+G will reset position of the bones. And press Alt+R to reset its rotation. We never use scale on the bones but incase you want to reset the scale also you can press Alt+S to do that. Now while doing animation mostly we only want to select the bone, not the actual skin object. We can make the skin object to be unselectable by first selecting it. And in the outliner expand the armature object. Find carny 3d model, then click on this arrow icon which is basically will avoid carny 3d model from being selected.

Okay now go to side view by pressing 3. And lets make the body or the trunk posing like letter S. Pick this bone rotate it like so. Select the child bone by right click on it or by pressing closing bracket. Rotate again. Then the next child also. Okay lets make the mouth a bit closed.

Okay now we want to save this pose as keyframes. To do that we can select all of the bones by pressing A. Then press I. I keyboard shortcut is for inserting keyframes. Because it will work only on selected object, therefor you should already select the whole bones before pressing I okay. Very important. Okay when we press I blender give us so many options of what you want to save to keyframes. There are actually more things that blender can keyframe, but that will be outside the scope of our tutorial. Okay now we want to save the movement and the rotation of each of the selected bones. So the fastest way to do this is to select “loc-rot” which is stand for “location and rotation”. Now as you can see every bones we selected will be recorded in a form of keyframes in here in term of the position and the rotation values. Now, these bones are officially animated bones. What this mean, when in animated mode, every time you make changes to  the rotation or the position of the bone, it will always snap back to the previous pose defined by the keyframes . If you need to make the transformational changes become permanent you need to insert keyframes again at that frame location.

Another way to add keyframes is to turn on this button down here “automatic keyframe insertion”. If this button is on, whenever you move to a certain frame and do any transformational changes. Those changes will be recorded as keyframes automatically. So for example lets create a breathing sequence two times for carny. Move the slider to frame 20. Then rotate this bone a bit. Then this one. This one also. Finally the head bone. Notice when we make changes, these keyframes created automatically. If we scrub the dope sheet we have a breath-in animation.

Okay now to create the breathe-out animation, we simply need to copy the pose in frame 1 and then paste them in frame 40. We can do this in several ways. Here is one way to do it. Go to frame 1. Move the mouse on the 3d view. Press A to select all of the bones. Press ctrl + C to copy pose. Remember when you do this you need to move your mouse on the 3d view not in the dope sheet. This is because Blender’s shortcut system is very dependent on where your mouse cursor is located. Okay. Now move the play head to frame 40. Again, move the mouse on the 3d view, not on the dope-sheet and then press ctrl+V. As we can see the pose from frame 1 copied to frame 40 and the keyframes automatically generated at that frame. Now we have breathing-in and breathing-out animation.

Another way to copy paste frames, is by using Shift+D inside the dope-sheet. To see how this can be done, first lets select these two columns of keyframes which are in frame 20 and frame 40. To do this we can press B to use box selection. And click drag like this. Now, these two columns of keyframes are all selected. Beside using box selection, to select multiple columns of keyframes you can also use the master keyframes up here or also known as summary keyframes. To show you how this work, let me press A first to unselect everything. Okay. If we right click on this summary keyframe it will select the whole column of keyframes bellow it, which is nice. To select another column simply press and hold shift and right click on another summary keyframes, which is this one. Okay. After we have these two columns selected we can use shift+D and then move these new copied keyframes about 20 frames forward from the last keyframes. So it should be at frame 60.

I think that’s pretty much cover the basic techniques of creating animation. For the rest I will speed up the video as there is nothing new to discuss. You can create any type of animation as you pleased from this current step. For me I’m going to create a biting animation from frame 80 to frame 130.

Okay guys, we now have something like this. Save the file with incremental number by pressing ctrl+shift S and then press plus in the numpad, then enter. In this way we have backup for our previous file. This is important In case we want to go back undo some changes and also for backups. in the next video we’re going to cover importing this model to unity and adding vuforia engine and publish our augmented reality app. In sha Allah.

Thank you for watching. Don’t forget to subscribe. Wassalamualaikum

#unity #blender #tutorial #augmentedreality #vuforia

bottom of page