Thursday, September 24, 2009

Spinning Logo Animation

Step 1


Since this type of animation is not a big deal I will cover some material and advanced lighting issues in this tutorial. Also, I will describe two alternative methods for such logo animation (one after another).

 

Step 2


First, we should adjust the Pivot point. So, go to Hierarchy panel > enable “Affect Pivot Only” mode > click “Center to Object”.






Step 3

While “Affect Pivot Only” is still enabled, move the pivot point down in the Front viewport as shown. Then turn OFF “Affect Pivot Only” mode.








Step 4

Let’s assign a material to the logo. Open the Material Editor > choose the 1st empty material slot > adjust the Diffuse color as shown.






Step 5

Under the Specular Highlights group, adjust the Specular Level and Glossiness as shown.





Step 6

We’ll assign white background for the logo. So, choose Rendering > Environment.



Step 7

Set pure white color as the Background color.






Step 8

Quick Render the scene. Logo is now simply a glossy one.


Step 9

Let’s add some reflectivity to the logo. For that, open the Material Editor again to edit the logo material. Expand the “Maps” roll-out and assign “Bitmap” to the Reflection map slot.




Step 10

There is a good reflection map which comes with 3dsmax itself. You will find it in the Maps > Reflection folder under your Max installation directory. Choose this map (REFMAP.GIF) as the Bitmap for the reflection map.


Step 11


Render again. Is the specular or the reflection too bright? May be. However, we can adjust this.



Step 12

Click “Go to Parent” button to reach the top-most level of the material.



Step 13

Adjust the Specular color as shown. Earlier one was white, so there was more brightness (or whiteness?).




Step 14

Render the scene again. Do you like it? I liked the earlier one also. May be, I have not very good graphics eyes. So, I like everything.





Step 15

Ok, let’s assign some soft shadow for the logo. For this, we need a Plane object where the shadow will fall on. So, draw a Plane primitive object as shown.




Step 16

Actually, if this Plane object is also seen in final render it will not look so good. It should vanish into the BG color while keeping the track of the shadow etc. of the shadow-casting objects standing on it. This is not only applicable for the logo. You can apply the same rule for visualizing any product in 3D (clear image with some nice soft shadow against a clear BG color, preferably white). So, choose the 2nd empty material slot. Switch the material type from default Standard to Matte/Shadow type. This type of material makes the surface (of the object which it is assigned to) transparent to those areas where other objects’ shadow/reflection does not fall.






Step 17

No adjustment is needed in the Matte/Shadow. Just assign the material to Plane01.


Step 18

Render the scene. The Plane01 vanishes into the BG color. But, where is the shadow for which we are telling these too much words.






Step 19

There are default lights in Max whose source is invisible by default. We can use “Light Tracer” to trace these default lights to get the soft shadow below the logo and on the matte Plane01 surface. So, choose Rendering > Advanced Lighting.


Step 20

In the Advanced Lighting dialogue choose “Light Tracer”. In the later versions of Max, you may have to choose Light Tracer from the sub-menu of the previous step (i.e. Rendering > Advanced Lighting > Light Tracer).


Step 21

Under Light Tracer parameters settings, lower the Rays/Samples to 100 (keeping the value at default 200 will cause taking more times in rendering). Increase the Bounces to 1 (keeping the value as default 0 will lower the render-time, but it will not help to get the soft shadow).



Step 22

Render the scene now. This time you will see some nice shadow below the feet of Mr. X.


Step 23

Let’s start the animation process. At first, we will set-up a camera and animate it around the logo. Then we will render the camera view to simulate the spinning of the logo. For the rotation-path of the camera, draw a circle in the Top viewport as shown.


Step 24

While the Crcle01 is still selected, enable “Align” button.


Step 25

Then, with the changed cursor shape, click on the logo with which we want to align the circle.


Step 26

In the “Align Selection” dialogue box, check all the X, Y, Z positions under the Align Position group and choose “Center” option under both the Current and Target object groups.


Step 27

Now, maximize the Top viewport and draw a Target camera as shown.


Step 28

Open the Select by Name dialogue box and select Camera01.Target object.


Step 29

Click the Align button again and then click on the logo model.


Step 30

Choose the Align options as before this time also.


Step 31

Now, select the Camera01 and choose Animation > Constraints > Path Constraint.



Step 32


You will see a dotted line (coming from the Camera01) telling you to pick the path through-out which you should drive the camera. So, click on the Circle01 to pick it as the camera’s traveling path.




Step 33

Assign the Camera01 to the Perspective viewport.


Step 34

You may notice that some parts are out of the range of the Camera view. We can accommodate the whole logo either by adjusting the lens/focal parameters of the Camera or by adjusting the radius of the Circle. Since the camera is constrained to the circle, camera’s position depends on the circle’s perimeter thus radius. So, when you increase the circle’s radius camera will go far from the logo. And, when camera will go far it will accommodate more areas into its view like real-world’s camera or eye does.



Step 35

So, select the Circle and adjust (increase) its radius until the whole logo can be seen inside the Camera view.


Step 36

Play the animation. The logo rotates a full revolution as we expected. The animation is also seamlessly loopable. But, still there are some problems. One problem is, at the first frame, the logo should face us with its front. But, presently it shows its side to us at the first frame.


Step 37

Once again, we can solve this by negotiating with the circle. So, select the circle. Enable the “Rotate” button and the “Angle Snap” option in the main toolbar. Make sure, you are at the 1st frame of the animation. Then, in the top viewport, rotate the circle -90 degree around the Z view axis. See the Camera viewport at the same time. Now the said problem is solved.



Step 38

But, if you play the animation, you will see that the logo is rotating to the wrong direction (right-to-left instead of left-to-right).




Step 39

To correct this situation, in the Front/Top viewport, select the circle and click the “Mirror” button in the main toolbar. Leave the Mirror Axis as “X” and Clone Selection option as “No Clone”. Then click OK.




Step 40

Everything is now well & good. We can now set-up the render issues. Click the “Render Scene” button in the main toolbar. Then, in the Render Scene dialogue box, set both the Width and Height values as 480 to get a square-shape output. Then, right-click on the Camera01 viewport label and choose “Show Safe Frame” to anticipate the render view from before.



Step 41

It seems that we can zoom more onto the logo to get its maximum volume in the render.



Step 42

Once again, we can do it by adjusting the Circle01’s Radius value. So do the same as shown to zoom-in on the logo as long as it stays within the Safe frame’s inner-most mark.




Step 43

Let’s tweak the angle of the camera view a little to have a better view. Just select the circle (if it is not selected) and move it down a little.



Step 44

Now, settle the final render issues. In the Render Scene dialogue box, choose “Active Time Segment: 0 to 100”. Then click on the “Files…” button; give a filename; choose “AVI” as file-type and click “Save”.



Step 45

For getting maximum output quality, choose “Full Frame (Uncompressed)” as the Compressor (codec). However, it may cause the output size to be the largest (but, quality will be the best). Click OK.



Step 46

Now, hit the “Render” button and relax. After rendering is finished, navigate to the folder where you saved the output to see it by opening with your preferred player.



Step 47

The above procedure is especially useful when the whole logo is animated. The logo itself wasn’t animated (rotated) here. However, there are some cases when we may have to rotate the logo itself. Say, there are more parts in your logo and only one part will be animated (for example, a text-logo is made with the word “Max” and only letter “x” will be animated). In that case, we should not animate the camera to represent such animation. Rather, we should animate the rotation of the logo (or part of the logo) itself. Well, we will learn that process now. First, select the Camera. Then, in the Track Bar, region-select the two keys as shown.




Step 48

Make sure, you are at the first frame. Then, right-click in any place of the track bar and choose “Delete selected keys”.



Step 49

Select the logo model and choose Graph Editors menu > Track View-Curve Editor.



Step 50

Highlight “Rotation” under Transform in the left side pane. You can see that its type is NOT Euler XYZ. Presently, it is set as TCB controller. This is because, I originally exported the X-logo to .3ds format after modeling it in another Max file and then imported to the current Max file. Such imported .3ds file is assigned TCB Rotation controller by default. We need to convert this controller to Euler XYZ to have the explicit control over the individual rotation axis (X/Y/Z).




Step 51

Make sure, “Rotation” is still highlighted. Then choose Controller > Assign from the Track View menu



Step 52

Choose “Euler XYZ” from the list and click OK.



Step 53

Now, you will see that the Rotation controller is optioned with three sub-options (X + Y + Z Rotation). Well, highlight “Z Rotation” now and then enable “Add Keys” button.



Step 54

On the straight graph, click at the place above the Frame number 0 to introduce a key over there.



Step 55

Do the same at the place above the Frame number 100 to create a key at the end of present animation range as well. Look, you do not have to place the keys precisely. Because you can set the exact time of any key and the related value by typing those in the text-field below the graph area. You will see this fact shortly.



Step 56

Enable the “Move Keys” button to disable the “Add Keys” mode and drag-select the 1st key. Note that you cannot select the key(s) in “Add Keys” mode.



Step 57

There are two type-in box below the graph area. Left one is for the Time and Right one is for the value for the selected controller-track (here, value for the Z Rotation). Ensure the proper time and value for the selected 1st key by typing 0, 0 in the respective boxes (1st 0 is for frame no. 0 and second one is for setting the Z Rotation value to 0 degree).



Step 58

If both the keys are not within your view click the two Zoom Extents buttons.



Step 59

Now, drag-select (or click-select) the end key one at/near the 100th frame.



Step 60

Use the frame type-in box to ensure that the key is set to 100th frame exactly. Then type 360 in the right type-in box for the Z-Rotation value at this frame. We know that one full revolution of any object is equal to a rotation from 0 degree to 360 degree of that object. So, for an animation range of 1-100 frame, the rotation around the appropriate axis (here, Z) at frame 0 will be 0 degree and at frame 100 will be 360 degree



Step 61

After typing 360 in the previous step the end of the graph-curve will go beyond the view again to reach that value in the graph area. So, click again the two Zoom Extents buttons (or at least the “Zoom Value Extents” button).



Step 62

If you play and see the animation in the viewport you will see that the motion of the rotation is not smooth over the time. Because, by default, Max assign some Ease-in and Ease-out to the animation. You can also see this in the starting and the ending of the Graph. That is why the graph is curved. To smooth the rotation (for getting a seamlessly loopable animation), we need to straight-out this graph, thus make the animation linear.



Step 63

Drag-select both the keys as shown.



Step 64

Now, click on the “Set Tangents to Linear” button in the Key Tangents toolbar. You are finished with the animation process.


Step 65

Choose a new filename for the output and render-out the animation. That’s all. Thank you for staying with me in this tutorial.