Thursday, June 28, 2012

Animation in 3D Studio MAX (Part 2).


Setting up an animation using keys and schedules

In the lesson on animation, we examined an automatic way of placing the keys.
Now we will study a more complicated way - manual placement of key animation. Why is it needed?
Automatic method involves a smooth change of parameters of the object from the key to the key. But what if we want to change the intensity of the changes? Or just want to do is not smooth, but dovolnorezkoe change? In this case, we need to manually install the keys.It is this way - manual placement of keys we consider in this lesson.
As an example we will create a simple scene: a bouncing ball. First, create a Plane with dimensions 200x200, and the coordinates of X = Y = Z = 0 and Sphere with a radius of 20 and the coordinates X = 0, Y = 0 Z = 60.
Z = 60, we have to object to the beginning of the animation hung at some height from which it will subsequently fall.
Plane and sphere - zagatovka future of animation.
In Fig. A plane and a sphere - zagatovka future of animation.
We do not need 100 frames, as the ball will be repeating the same movement. Consequently, the roller can be <loop>. To do this, we can do less than 100, the number of frames. Reduce the number of frames in the strip of TimeLine. Call the box Time Configuration.
Button Time Configuration.
Figure 2. Button Time Configuration.
Change zanchenie Length (number of frames) is 50.
Now, on to the alignment of key animation. First you need to install the key in the 0-th frame, thereby fixing the initial position of the object.To do this, select the sphere and go to the tab Motion.
Figure 3. Location tab of Motion.
Here we see two columns: Create Key (a key) and Delete Key (delete key). It is in this section and are key animation parameters of the three objects: Position (position), Rotation (rotation) and Scale (scale).
Tab key to create animation
Figure 4.

Note:

There are many other types of keys. For example, the keys of the material editor.
At this point we need only Position (as we will change only the position of an object in space, without affecting its rotation around its axis and scaling). Click on the appropriate button in the column Create Key.
Then you will see that the band appeared on a temporary key in the 0-th frame. It is highlighted in red.
Figure 5. Put the key in the zero frame (frame on the time bar is highlighted in red).

Note:

Key icon may sostoyatiz three colors: red, green and blue. If this key parameter is changed only Position, the color key - the red, if theRotation - Green, Scale - Blue. If all three parameters are changed, it will be a key icon, like a traffic light, tri-color.
See the key parameters supplied in two ways:
1) In the Motion tab buttons for Position, Rotation, Scale (the active button shows what it is setting display properties). Since in this vein, we just stepped Position, it is something we are interested.
Figure 6. Key properties of the parameter Position.
You must first select the axis of the section Position XYZ Parameters. By default, the active X-axis, but since we changed the position of the object height, so you want to enable the axis Z (as shown in the figure). Then look at the key parameters in the section Key Info: Time- the current frame, Value - the value of the selected axis. In our case, we see that in the zero frame (Time = 0) the object is at a height of 60 along the axis Z (active axis Z, Value = 60).
2) can in the time zone by right-clicking on the key and get a drop down menu where you need to select <object name>: Z Position. Do not forget that all these operations performs with the selected object (otherwise the program is not clear what the keys Owned object in the scene you want to adjust).
Now we need 2 more keys: the down position and then the top. Accordingly, the staff of the 25th and 50th. So: in the 0-th frame already has the value of the ball: X = 0, Y = 0, Z = 60. In the 25th frame back in the Motion tab, click Create Key -> Position and Value of Special wall along the Z axis in the parameters key: Value = 20. In the 50th frame: the axis Z, Value = 60.

Quest for reflection:

Note that the initial position and final match (think why). In the 25th frame, we move the object is not in the 0 to Z, and 20 (think why).
Now, if we lose the animation, the ball will fly back and forth. If you look at the animation, we see that it is unrealistic to fly. No effect of impact on the plane, flying the plane, the ball slows down his movement. This implies that in addition to key animation there is something that can speed up, slow down or to make a uniform change in the parameter (in this case, the value peremscheniya axis Z) from one key to another.

Graphics animation

Have you noticed that in addition to the parameters of the key values ​​in the tab Motion (selected for the Z axis and the active buttonPosition) there are large buttons with graphics
Graphics animation.
Figure 7. Graphics animation.
This is a standard chart types to customize the nature of the change parameters, to the value of the keyframe - In, and then the values ​​-Out.
Now try to imagine what a graph of the animation.
The intensity of the object from zhvizheniya klyuchak key.
Figure 8. The intensity of the object from zhvizheniya klyuchak key.
1) Black schedule - what we have now. The smooth change in the motion of the keys to lyuchu.
2) Blue - what to get. The acceleration of the ball as it approaches the plane, and deceleration with distance.
3) Green - something that can happen (wrong move).
What would cause our schedule to the right to view graphs of In and Out in 25 - m frame to do the following:
Altered schedules In and Out in the 25th frame.
Figure 9. Altered schedules In and Out in the 25th frame.
Now it's our ball is repelled from the surface, accelerating while approaching and after hitting the surface and slowing down in the upper position.

Graphics editor, and keys.

To edit the graphics in the process of changing the parameters of the animation in 3D Studio Max there is the editor of graphs Graph Editor -> Track View - Curve Editor
Window Track View - Curve Editor.
Figure 10. Window Track View - Curve Editor.
In our case, we immediately see a graph of the parameter Z. That may not happen if a lot of animations. You can filter the graphs by clicking on the Filters, and thereby causing the corresponding window.
Button Filters window Track View - Curve Editor.
Figure 11. Button Filters window Track View - Curve Editor.
Window Filters
Figure 12. Window Filters
There's a rollout Show Onl y select Animated Track
Scroll of Show Only
Figure 13. Scroll of Show Only
Will now show only the parameters of animated objects.
But back to the graphics animation. On it we see a small <squares> - the animation keys. They can add their own, using the tool Add Keys; You can also choose the standard types of charts
Button Add Keys.
Figure 14. Button Add Keys.
You may receive the key when you click on the right mouse button.
There is also a window for editing only key animation. It is located in the menu Graph Editor a Track View Drop Sheet.

Assignment:

Create an object in addition to the impact of the plane yet and its distortion (Squashing).

Recommendations:

It must be remembered that the animation takes place only on the key to the key, and we will not be enough to put the key type Scale in the frame 25, making the parameter Z equal to, for example, 60%. In this case, the object will gradually flatten from the 0th to the 25th frame .. We need to have at least two key types Scale around the 25th frame. Use the 23rd and 28th frames, in order to flatten the ball between 23 and 25 overs, and "flatten" between 25 and 28.
You also need to flattening did not occur with respect to the center of the sphere:
The ball flattened uniformly about the center.
Figure 15. The ball flattened uniformly about the center.
A relative to the bottom of the sphere (which relates to the surface):
The ball flattened relative to the zone of contact with the plane.
Figure 16. The ball flattened relative to the zone of contact with the plane.
Need to shift the local coordinate system (in any frame) down to Z on 20. All of the following coordinates in the other keys are automatically changed. Editing the local coordinate system is in the tab Hierarchy -> Pivot -> Affect Pivot Only. About. That provided details to the lesson on arrays of objects. Do not forget to exit the Affect Pivot Only after moving the local coordinate system!

Animation in 3D Studio MAX (Part 1)


A general approach to animation in 3D Studio MAX

You've probably seen a lot of beautiful animation made on a computer in a variety of graphics packages. For example, the cartoon "Shrek" or "Ice Age" or "Robots", etc.
Having mastered this section, you will be able to create their own motion of objects in 3D Studio MAX. This may be animation for computer games, cartoons, screen savers, illustrations, presentations, etc. Using 3D Studio MAX you will be able to handle any such challenge.
The basic principle of animation is fairly simple. It is used by nearly all programs associated with the creation of moving objects (such as 2D, and 3D). You specify different values ​​for the parameters of the object at different times.
You can animate almost any parameter: the object's position in space (X, Y, Z), rotation, scaling, object, etc. You can also animate the color of the material parameters and modifiers.

The principle of animation

The animation is based on the principle of human vision. If before the eyes of man are changing rapidly on one another still more similar images, a person has a sense of movement. Every single picture is called a frame (farme).
The sequence of frames. With their rapid change of an effect of moving dots.Figure 1. The sequence of frames. With their rapid change of an effect of moving dots.
The main difficulty in creating any animation - creating a huge number of frames. One minute animated film requires 720 to 1,800 individual images, depending on the quality of the animation. Creating images by hand - a very time-consuming work. So come to the aid of machinery key framing.
Its essence is as follows. Most of the frames in the animation - it is a slightly modified the previous frames. If you create only the principal, key personnel (key frame), in which there is a fundamental change in the position of the object, its shape, color, etc., can greatly accelerate the process of creating animation. In this case, those shots that need to be among the key (called tween), can be easily created with the help of simple calculations. Then all the key frame and tween dock and get ready animation.

Animation keys and their settings

The program includes 3D Studio MAX you create only the main frame (key frame). 3D Studio MAX itself calculates and creates something that should be between the keys, so that in the end we got a whole animation. This method of animation is based on the notion of <key>. In addition, 3D Studio MAX also has another way to animate objects - with the help of <path> or <on the path>.
The key - is a fixed value of a parameter at a given time. Basic animation keys - to move, rotate and resize. The keys are set in the right frame. They can be any number, but not more than number of frames.
change in the object
a key ------------------------------------------------ ----- key 2
Before you strip with the numbers of personnel and the slider Time Slider (time band).
Temporary band with spaced keys on her animation
Figure 2. Temporary band with spaced keys on her animation
Green squares opposite the frame numbers 0, 10, 23, 40, 55 - are the keys animation. In the frames of these numbers are subject to some change.
These changes may be, as mentioned above, very different: change the object's position, size, change materials, sound effects, etc.
The slider allows you to navigate between frames.

Methods for setting keys in 3D Studio MAX

A. Automatic

You go to a frame of animation, and include a special mode Auto Key (automatic placement of keys), change in any way an object (for example, move it). At the time the band have the key.
When you switch to automatic creation of key animation, the time the bar turns red.
Auto Key mode is enabled
Figure 3. Auto Key mode is enabled
In the Keys, which are located on the time zone, contains information on the status of an object in space (move, rotate), and change its size. All other keys can be seen in a special editor, key animation, which will be discussed later.
If the key is the first in the current animation for this parameter, the second key is automatically created in the zero frame to preserve the original values ​​of the parameter. So, if you press the Auto Key, select the object, drag the slider and the modified object - you will automatically receive two keys: in the frame where the slider, and the zero frame.
When you install the key in the 15th frame will automatically appear in the zero key frame.
Figure 4. When you install the key in the 15th frame will automatically appear in the zero key frame.
Create a simple animation of a primitive object. "The falling cylinder."
A. Create a cylinder
. The object is ready for animation.Figure 5. The object is ready for animation.

Two. Turn on Auto Key
Turn on Auto Key
Figure 6. Turn on Auto Key
Three. Move the slider, for example, the 20-th frame
The slider moved to the 20th frame.
Figure 7. The slider moved to the 20th frame.

4. Rotate the object using the Select and Move tool
Turn the cylinder.
Figure 8. Turn the cylinder.
Five. There will be two keys: the 20th and in the zero frame.
Automatically has 2 key animation, in which the recorded changes in the rotation parameter on the Y axis of the object Cylinder.
Figure 9. Automatically has 2 key animation, in which the recorded changes in the rotation parameter on the Y axis of the object Cylinder.
To start the animation and see what happened, click on Play.
Buttons play the animation.
Figure 10. Buttons play the animation.

Two. The alignment keys manually.

This method gives more control than the method Auto Key, because you have a chance to try out a new idea and then just give it up without destroying the work. When you like what you see, you click the big button or press the Set Keys <K> on the keyboard to set the key. If you do not, the keys will not be installed.
Enabled Set Key.
Figure 11. Enabled Set Key.
In order to increase the number of frames in the line (after the standard 100 frames - about 3 seconds), you must click on the Time Configuration
Location Time Configuration button
Figure 12. Location Time Configuration button
A dialog box appears.
Time Configuration dialog box
Figure 13. Time Configuration dialog box
Consider the most used options.
Frame Rate - Frame rate. Here are three standards to choose from:
NTSC - 30 frames per second
PAL - 24 frames per second
Film - kinostandart, 24 frames per second
and Custom - any number of frames set by the user. The number of frames affects the speed of what is happening in the animation. For example, if an object permeschaetsya from one point to another for 90 shots at 30 frames per sekudnu, it will last for 2 seconds. If the frame rate - 24 c / s, the duration of the move will be almost 4 seconds. Now you understand how to create slow motion effects in the movies. The desired scene is recorded with high frame rates (eg, 120 instead of 24), and played with a standard speed of 24 frames per second.
But the window verenmsya Time Configuration.
The next section - Animation, animation.
Start Time - a frame that will be the first in a line of frames
End Time - a frame that will be the last in a line of frames
Length - the nominal number of frames in the scene. It is this parameter, we change if we want to increase or decrease the number of frames.
Frame Count - the actual number of frames in the scene (at a higher, since the beginning not the first, but with a zero)
After. as the necessary changes made, click OK.

Animated texture parameters

Now let's create an animation material which will be imposed on our Cylinder. Carefully look at the panel Material Editor (material editor) and find a group of parameters Blin Basic Parameters.
The group parameters Blinn Basic Parameters in the editor window materials
Figure 14. The group parameters Blinn Basic Parameters in the editor window materials
We find there is a parameter Diffuse ("Scattered"). On the other hand it is possible to see a rectangle, which defines the color of the material.
Diffuse parameter group Blinn Basic Parameters.
Figure 15. Diffuse parameter group Blinn Basic Parameters.
If you click it, you will arrive at a choice of color.
Window Color Selection: Diffuse Color - select color.
Figure 16. Window Color Selection: Diffuse Color - select color.
Now try to make the animation changes color. The principle of operation is the same as the previous animation, just by moving the sliderTime Slider, we will change the color of the object. Thus, the procedure is as follows:
A. In the material editor assign the material color.
Two. Turn on Auto Key
Three. Move the slider Time Slider in the last frame.
4. Change the color of the material.
Five. Assign a material object.
6. There are two keys: the first and last frames.
Assign the color of the material and turn Auto Key.
Figure 17. Assign the color of the material and turn Auto Key.
Move the slider to the last frame, change the color of the material, assign material object.
Figure 18. Move the slider to the last frame, change the color of the material, assign material object.
Note that the indicator color around the front of Diffuse a red frame. This box shows that the parameter is animated.
The result of any animation - video. That is, must provizualizirovat animated scene to a file. Just go to the familiar menus Rendering => Render.
Window Render.
Figure 19. Window Render.
Must select Files, which is located in Render Output. To do this you just have to scroll down the contents of the tab.
Section Render Output Window Render Scene
Figure 20. Section Render Output Window Render Scene
After clicking on the Files button opens a dialog box Render Output File, in which we ask the name and file format, which will be rendered. The format of video files among Windows - *. Avi. That's it, we choose in the list Save as Type.
Window Render Output File.
Figure 21. Window Render Output File.
Once you click Save, a window will open AVI File Compression Setup - choose the method of video compression.
Window AVI File Compression Setup. The main point - the drop-down list of Compressor.
Figure 22. Window AVI File Compression Setup. The main point - the drop-down list of Compressor.
What is video compression, and what does it need? The fact that the video - this is a very large amount of information. After the video - this set of successive static pictures. The file size is obtained by a huge (average 1:00 uncompressed video resolution of about 780 * 576 - 20 gigabytes). In order to reduce this to an acceptable size, using a variety of programs (called codecs), which are due to more or less imperceptible deterioration in the quality of images reduces file size. Codecs are installed separately, as any other program, but a number of codecs built into Windows.
In the Compressor are all installed on your computer codecs. The best option - DivX. If it does not, of the standard codecs, we recommend that you Cinepak.
Then select the number of frames that need to be provizualizirovat. This operation is performed under Time Output.
Section Time Output tab Common. Option is active Active Time Segment.
Figure 23. Section Time Output tab Common. Option is active Active Time Segment.
Single - will be rendered one frame, one on which at present stood slider. The option we used when visualized by static images.
Active Time Segment - will be rendered all the frames of animation.
Range ... To ... - specify at what at what needed to render a frame. This option is used when needed provizualizirovat only part of the animation.
In our case, we need to choose Active Time Segment, as we need to provizualizirovat entire animation.
After the rendering process turns AVI file that plays a standard player, Media Player by Microsoft.