CaZaBa

Home

About

Tutorial

Gallery

Download

Purchase

Contact

Czech

English

Animation

Keyframes - Global body transformations - Morphing - Perpetual animations - Texture animations

Static modeling is only one part of the work with CaZaBa program. Next level to enrich our work is to animate models, opening up new interesting horizons.

Keyframes

As the building block for each animation are used the keyframes. The whole shape of the model with all the transformations is always stored in keyframes, and the program interpolates the parameters and appearance between them. At the same time, you need to control timing. Animation in CaZaBa will be timed by the number of frames of the animation and by the rendering frequency of the entire animation.

The length of the entire animation determined by the number of frames is set in the animation properties. These will be displayed by selecting Animation - Animation properties... or by Ctrl + Shift + P shortcut. Then in the Frames count field adjust the value as you wish. On the other hand the rendering frequency is set in the render settings window (F10) where we set the number of frames per second in the Video FPS field.

Tip: You can find the FPS animation setting again in the programs properties Tools - Preferences... but beware of the Animation FPS in design view being a rendering frequency value only when you start the animation in the design viewport.

Each model already has one keyframe at the time we create this model. We need to create other keyframes in the animation where we can properly modify the model in order to move the bodies. This is done by setting the animation to a specific point - the Frame no. and then pressing the Insert keyframe button. This is explained in the following paragraphs.

Tip: Each model has its keyframes and there is only one keyframe available for each model in each animation frame. Multiple models can have their keyframe in the same animation frame at the same time.

Global body transformations

To make it easier to start, download here the heart model that we use for a simple animation. In order to get it into the program scene, you need to import it either by selecting Model - Import... or by Ctrl + I shortcut. The model is in the .OBJ file format, so also select the Wavefront .OBJ file format in the dialog and navigate to its location on the disk. In the dialog boxes that follow, select Replace by materials obtained from File and import properties - simply press OK.

Tip:In case of importing more complex models, it may happen that the program will be retrieving the data for a longer period of time when it will not respond.

Now we have one red heart in the scene that we can animate. First we will try to animate the global transformations of the whole model. We set the motion of the model along the straight path back and forth. Select the heart model in the Model list or click the left mouse button on it. Then select Translation on the toolbar and move the heart to 10 in the X axis. Either dragging the mouse or setting the exact value in the X field at the bottom of the program window.

Because we want the animation model to end in this state too, set the current animation frame for example to a position 100 in the Frame no. field and create another keyframe here with the Insert keyframe . So the animation of our heart will take 100 frames. For the mentioned movement along the straight path back and forth set the third keyframe - set the animation to Frame no. = 50 and then again create the new models keyframe with Insert keyframe button. Now, in the X field, with Translation turned on, set the model to position -10. This creates the desired movement. Attention: Note that when you set the animation to a different frame than the keyframe, the model does not respond to the required edits. This can only be done in keyframes.

You can navigate through the animation of the currently selected model using the buttons on the bottom panel of the program window. To the start of the animation , Previous keyframe - jumps to the first preceding keyframe, Next keyframe - jumps to the first following keyframe, To the end of the animation . For a complete list of all the keyframes of the model, click the Keyframe list... button. In this list, each frame displays its name and the frame number in the parenthesis where it is located in the animation. Frame name can be changed in the field right to the left from the keyframe list button.

Let's go back to our heart animation. In addition to the translation, we can enrich it with further transformations. Let's try to rotate around the Z axis for 360°. The first and last frame should remain the same, so we will not touch them for now, but using the buttons described above we get to the middle keyframe on Frame no. 50 in the animation. On the toolbar, choose Rotation and in the field Z at the bottom of the screen set the value 180. That would not be enough in itself, because now we have a difference in rotation of 180° between each of the two keyframes. The program would not know whether to interpolate between them by adding or subtracting the difference between the individual frames. Therefore, set the animation to Frame no. = 25, insert another keyframe and set the Z value to 90. The same is done on Frame no. 75, but Z axis is rotated to -90. The program always interpolates between the two closest values. By creating keyframes with a rotation difference of just 90°, we gave the program a clear guideline in which direction the rotation will be performed.

Tip: When creating keyframes at position 25 and 75, you might have noticed that the model is shifting according to a previously set translation transformation. Yes, when creating a new keyframe, preserves all existing model transformations and stores their interpolated values at a given time in the new keyframe.

Now we have a beautiful red heart that moves straight and backwards while rotating around its Z axis. This means that uniform keyframes are used in the program to modify any properties on the model. Therefore, it is not necessary to plan forward what type of keyframe to insert for which transformation, etc.

For example, we can render the animation like a video. By pressing Render or by F10 hotkey we open the render settings window. Here, set the Video resolution, output type Video, File path, File name, Animation - part and set the fields From = 0, To = 100 and Video format - for example XviD or x264.

Morphing

In addition to the animation of global transformations, the CaZaBa program can animate even the shape of the model itself. It is very simple and we will try it by creating a pulsating heart. Save the scene and create a new one - either by the File - New menu or by the Ctrl + N shortcut and again selecting the option Model - Import... import the heart model from the Heart.obj file. Now leave the model where it is, but create again its keyframes in animation frames no. 0, 25, 50, 75 and 100.

Set the value in the Frame no. field to 25. In almost all cases, imported models are immediately converted to general geometry, so now we can switch to the Vertices edit tab on the left panel right now. Here select vertices in only one half of the heart, then in the Pivot section at the bottom of the tab switch to the radiobutton Use synthetic. Then choose the Scale transformation and into all three fields X, Y and Z enter the value 20. This means that thanks to the synthetic pivot, the whole half of our heart enlarges from its center by 20 percent. Repeat the same procedure for the other half of the heart in the keyframe at position 75 so that both halves of the heart will alternately expand and shrink.

This is actually the whole trick to animating models shape changes. Just always insert a keyframe and alter any part of the model, easy. But CaZaBa can do even more. If the shape of the model in both keyframes interpolation originates from the same shape and has the same number of vertices, the same vertices interpolate with each other. But if the number of vertices of the model in each keyframe differs, the program attempts to deform the shape from one keyframe to the other according to which vertices are closest.

We will try it again very easily. Next to the heart model, create the Elipsoid model from the 3D bodies category on the left panel with the following parameters:

  • Radius A: 4
  • Radius B: 4
  • Height Seg: 8
  • Round Seg: 16
  • Cutting angle: 360

Then, re-select the heart model and go to its keyframe on Frame no. 50 in the animation. Now we copy the shape of the ellipsoid, its particular keyframe, into this keyframe. To do this, press the Copy keyframe... button. The list of models appears, there you select the ellipsoid and press OK. Subsequently a list of keyframes of the ellipsoid will appear instead of the model list. We did not animate anything on it, so it has only one keyframe. Select it and press OK again. Now in the heart model we have a ball shape in one keyframe. You can delete the model of the ellipsoid itself - select it and press the Delete button on the left panel.

When you try to run the animation, you see that the program transforms the shape of the model between the shape of the heart and the sphere and then backwards. It may happen that the transitions between too different keyframes are too sharp. For example, try deleting keyframes from positions 25 and 75 from the model. Use the Previous keyframe and Next keyframe buttons to scroll to the desired keyframe, then press the Delete keyframe . When running the animation again, it looks more acceptable.

Tip: If the shapes of two adjacent keyframes are too different, the transition between them may be too sharp or jump. You need to manually manipulate such animation by inserting other keyframes and correcting the continuous shape of the body in them.

Perpetual animations

In some cases, we may need to repeat the animation all the time or control it more precisely as a whole. For this reason, the scene in the CaZaBa program can contain several separate animations with its own space and its own timeline. At the beginning of the work, one animation named Main is always pre-set in the scene, which as the only one can't be deleted. We will now create a second animation in which we will have our recurring (perpetual) animation. Select Animation - New Animation... or Ctrl + Shift + A shortcut. You can enter Name of the animation, the Frames count will be sufficient as 100 in the dialog box, because our heart animation is also 100 frames long, and press OK.

There is shown a new empty animation space. In it we copy the heart model from the main animation. Use the Model - Copy... option. In the animation list shown, select the Main animation - our original animation, and select the heart model from the list following. Thanks to this we copied the heart model with all its keyframes into a new animation. Attention: Originally, we did not use any texture at heart. However, if otherwise, we would now see that no texture appears on the copied model in the new animation. This is logical because new animation has its own material palette. In order to get the original used materials with the possible texture into the new animation, you need to do the following. Use Animation - Select animation... to make sure you're in our new animation. Then choose Animation - Copy materials from animation... and select the original Main from the list. You can now check out the material palette to see copied materials.

Now, again by option Animation - Select animation... go back to the main animation Main. You can delete the heart model here - never mind, its animation is reserved in the New animation. Instead select the Animation in animation from the Complex geometry tab on the left panel, then press Create. This is an object that allows us to play another animation as if it were one model. Several parameters appeared in the lower half. The first one is the [...] button, which you press and in the animation list shown select our new animation. From the other parameters, the most important are now Start frame and Stop frame. Leave the first one at value 0 and the other set to 100. It is said by this that the Animation in animation will play an inserted animation from the 0th to the 100th frame. At the same time, we must not forget the last parameter - Repeat animation, which you set as checked. Only then will Animation in animation play all the time in the loop.

When you play the animation, you will surely see that it was repeated only twice. This is because the main animation has from the beginning a preset length of 200 frames and the animation inserted by us is long 100. Length of any animation, not only the main, you can edit in animation properties. Use option Animation - Animation properties... or Ctrl + Shift + P shortcut and change the Frames count for examle to 500. At the same time, as said above, the Animation in animation is a separate object in the scene, so it can be further animated by adding other keyframes and changing its parameters or global transformations. For example by the means already known to us we can place a whole Animation in animation to the position Y = 10 in one keyframe and after that to position Y = -10 in the other keyframe. The result will be the moving animation of the heart even though we did not create any movement in its original animation. Animation of the other models in the scene will remain untouched.

Tip: Be careful not to delete the New animation until you have an Animation in animation object linked to it in the main animation. The Animation in animation object only works with referring to the specified animation, so it would not draw anything just by itself.

Tip: Each Animation in animation object is a completely separate object in the scene. So you can have one or more Animation in animation objects in the scene. Any of them can play another animation or all can play the same animation, but each according to their parameters.

Texture animations

Texture can be animated in two ways on the model. The first is very simple by using UV coordinates of the vertices. During animation, all model parameters, including transformations, including all the parameters of the individual vertices, are interpolated in both 3D space and texture space. The disadvantage is that it is only a shift of a vertex within the texture, so it is impossible or difficult to simulate such an approach like for example screening a movie on a TV model and so on.

For example, if you want to project an animation with a story directly as a texture on the model, you can use option to stream video into the texture. Again, this is a very simple procedure. Use the Animation - AVI stream material... option, select File path using [...] to select your video file. Then select Animation - the animation space to which you want to project the video and then select Material, which you will not use for anything else and you can spare it in your scene - for example Material 30. If you want the video to be repeated in the texture again, check Repeat checkbox and close the window with the Close button.

Tip: If the load of the stream to the material fails, try to encode the video in another video compressor and try the load of the stream into the material again.

This is how we set the video stream into the material and we will now use it. In the 3D bodies category on the left panel, for example create Box and assign the Material 30 to it. You will immediately see that the video content is visible on the walls of the box. Then, you can play the animation in design view to check that the video is actually playing, or even render it to a new video file. Again, use the Render button or keyboard shortcut F10 and in the Render settings window set the output parameters as described above.

<< Return to topics

Copyright (c) 2013 - 2023

General terms and conditions

End user license agreement