Wednesday, 25 May 2011

Crazy golf! The animating process

Below, you will find a detailed description of the animating process for my 'Crazy golf!' CGI project- and what a difficult process it was! I have already detailed the basics of setting up my scene for animating here, so I shall begin now from where I last left off. 

After realising I would have to animate the rolling golf ball manually, I decided upon a plan of action- with being able to edit the key frames and animation paths once they have already been set, I decided to create a basic ball animation first, consisting of nothing more than key frames at the important obstacles, at the time the ball should be there. Naturally, Maya interprets these keys to give a direct, rough indication of how the ball got to each new location, and so you have a simple sequence whereby the ball moves from one point to the next. The only issue here is that Maya, by default, has an 'ease in' and 'ease out' feature applied. It is up to the animator to adjust the speed of the ball. A good example would be when the golf ball bounces off the flagpole. With this action, the ball moves in one direction, then (when it impacts) immediately moves in the opposite direction. With ease in and out however, the ball slows down before impact, then needs to speed up once more afterwards. Left unattended, this movement is very unrealistic and breaks the believability of the animation. The ball has no sense of mass. You can see this basic animation path in an early playblast video below:

video

Please excuse the quality- I had to reduce the file size somehow to upload the video. Nevertheless, you can see my point from above. Perhaps the most noticeable area for improvement is in fact the last section, when the ball rebounds off the yellow wooden blocks. Here, the timing is very strange! So, with the basic animation completed, I was able to focus on polishing everything, adding finishing touches before finally focusing on sound. You will notice a big improvement between the last and following videos! 

video

I made a number of changes to my animation following my first test. Perhaps my favourite is the detail when the golfer steps forwards. Initially, this had been quite a robotic movement, the legs simply moving forward. I had made sure to pivot them slightly to give the impression of a knee joint just off screen, but was this enough? I questioned it's believability for some time, wondering how I could create a more realistic movement without modelling the entire upper legs too. In the end, I grabbed my putter and acted out the movement, and was surprised that I had overlooked a fundamental factor. The golfer steps forward from standing still, and I had forgotten to make him shift his weight from one foot to the other as he does so. In reality, to not do this means to fall over! We do this without thinking of course, which is likely why it did not occur to me at first. My solution was to add a steady 'rocking' to the golfer, one side to the other, which gives the impression his centre of mass is shifting as he steps. The resulting animation is far better than before!

In addition, I improved the speed of the ball and also added a small series of bounces after the ball is hit. This again gives the impression of weight, showing the object hitting it (the mallet, golf club, etc.) is heavier. Either way, golf balls have a tendency to be bouncy.

A more minor change came with the squash and stretch on the purple ball as it hits the golf ball. I realised that for this ball to knock another so far following the impact, it would have to be pretty solid, otherwise the energy from the impact would be almost entirely dissipated by the deformation of the purple ball. For this reason, I toned down the level of deformation to something far more suitable. The golf ball, being very solid, does not squash at all.

I made several further tests following these improvements, in which I made the ball move faster and thus had to speed up several camera movements as well. I shan't post the playblasts for these since the difference would be almost unnoticeable, but rest assured that when I was finally happy with the animation, I was ready to render. And this is where my real problems began.

Ok, so the first problem was my own fault- sixteen hours of rendering led to the discovery that the golf ball was floating above the floor for a while, something I couldn't see before without the rendered shadows. I was able to quickly change this, and re-render- this time using Maya '.iff' format, since this didn't separate the channels. See, my first render I had used 'targa' format, and I had ended up with two sets of images for every frame, the regular and also depth images. To avoid having to composite the two later, I chose a different format for my second render.

All was going well. The second render was taking significantly less time than before as I made the perspective camera no longer renderable. But then Maya crashed. I had left the machine to render, not realising that for several hours it had been doing nothing. When I restarted the process from the correct frame, I had lost a few hours. What followed was no better- a very unstable 'fcheck' program that crashes after doing anything whatsoever. Eventually, after a long and exhausting two days, the video was complete. Well, except for sound that is.

Searching through free online sound effect archives yielded less than impressive results, so in the end I resorted to recording my own sounds using my dictaphone. This worked very well, resulting in a collection of unique sounds to compliment my animation. I hadn't anticipated having to do this however, and thus I was set back further, closer to the looming deadline.

On to Adobe After Effects, where I was able to relatively easily add the sound effects to my animation. Seeing the rendered visuals complete with sound was a joy, the efforts of months of hard work paying off! I will include the final video in a separate post. I am certainly very proud of this project due to the amount that was required to complete it- not just in terms of the project content but in having to learn multiple complicated computer programs from scratch. In doing this so successfully, I have exceeded my own expectations for this task.

No comments:

Post a Comment