Monday 29 March 2010

Path Animation and Curve Editing

The next task was two things, animation along a path and IPO (Interpolation Psomething Osomething [Curve Editor in Max]). I found a pretty good tutorial for path animation in Max at http://billysalisbury.com/Learn_Max/chapters/lecture9a.htm. I spent a short time fiddling with the Curve Editor and got familiar with the basics but I spent most of my time on the path animation.
I started off making a plane (flat one, not the flying one yet) for the ground and then some random rectangular boxes as buildings to fly in between. I thought I would then add a nice, grey material to them all to make them more building like but it ended up making them all blend in to each other and you couldn't really differentiate between them. I was then astonished that there was no easy way to remove a material from an object! After a bit of searching I found that typing 'Geometry.material = undefined' into the MaxScript Listener (F11) removes all materials from all objects in the scene. A useful thing to know I guess but not really necessary as you can just replace the material with another. Anyway, I now had a nice colourful city to fly through, I just needed the plane. I made a (very) simple model of a plane and then drew a fairly windy line around the buildings [Note: Click for straight lines and sharp corners, click and drag for curves] and went through the necessary steps to animate the plane along the path (the tutorial talks about going to the motion panel and doing something in there but I couldn't follow it so I found out that it can be done by selecting the plane and going to Animation>Constraints>Path Constraint and then selecting the line). Adding a camera was just the same to constrain it along the path but I decided to differ from the tutorial and make a target camera as there were lots of quite sharp corners.
After experimenting with the % along path, the banking and the smoothness options, I finally rendered it:


There were two problems I noticed after rendering and watching it back.
The first was the lighting. In some places it goes quite dark and you can't really see. I was just using the default light source, I hadn't added any myself. Next time... next time, I will have to find out how to add light sources :S
The second was the banking. I don't really understand how the banking was done. I thought at first it would just bank into every curve (eg. in a left turn, bank left and in a right turn bank right) but in a couple places where there was a left then right turn (or right then left turn) the plane banks into the first turn but then doesn't bank into the second. Not a huge problem right now but definately something to check out if I use banking in my final animation.

Saturday 27 March 2010

Animation test #001 - Keyframe animation

Ok, so I finally got my extra monitor that I ordered over a month ago, and believe me, 1920x1080 is so much easier to work with than my tiny 1366x768 on my laptop. Well worth the wait. So, if you were wondering, this is why I post my first animation blog 9 weeks into the semester.

Enough with the excuses, onto the animating! The first step towards making my very own version of Avatar was keyframe animation. It was a fairly easy task to begin with, I watched the Hirsig tutorial just to get a taste of what is expected, and then found a nice tutorial for it in Max. (I decided to go for 3ds max as I heard it was used in the industry, and also a little bit because I despised Blender with a passion)
I did more or less the same thing as the Blender tutorial said. I made a box and a sphere and just made them dance around each other for a few seconds. Here is what it looks like: :)



Seeing as I found that pretty simple animation so easy and boring to make, I thought to try out my own idea for an animation. So I came up with the genius idea to model and animate a Rubiks Cube. Little did I know, this would be incredibly difficult and in the end, would not work. Before we get to that however, I will tell you exactly how I got to that.
I started off making a small box and then cloning it 26 times, and successfully made a Rubiks cubey looking cube. Then came colouring the faces. At this point I didn't know how to assign a material to a single face so after about 10 minutes of finding out, I converted them all to an editable poly and then selecting the face and assigning the colour. I don't know if I was doing it the slow way or the only way, but I had to select and colour each face individually. After 54 individually coloured faces I was quite good at it though.
So I have a pretty good looking Rubiks cube now, with all the colourfulness. But then came the fun part of animating it. Well, I thought this would be fun, and relatively easy. First thing I had to do was move the pivot points of all the cubes, I tried rotating them but they all just individually spun round. So after a bit of Googlizing I found out that I had to go to Heirarchy>Pivot>Affect Pivot Only and then just move all the pivot points to the centre of the cube. Now I thought the rest would be a simple task of just, well, keyframe animating. So I selected the one side of boxes, toggled Auto Key and rotated it by 90ยบ. I watched the animation back and it looked fine. When I tried to animate it any more than that though, it all went horribly, horribly wrong. Random boxes seemed to forget where they were before and some went in wrong directions, some disappeared and then reappeared on the other side of the cube, and there was just a mass of disorientated boxes. So, after trying everything I knew (which I'll admit is very little right now) I could not solve this mysterious problem. I managed to render the best one I could get after I manually set the keyframes, but it is by no means working.



I won't be giving up on this idea, just keeping it in stasis until I have a clue of why it went wrong. I would like to see it done after all that time I spent modelling it.