Animation Update #1 – “And yet … it moves.”

Galileo Galilei

And yet … it moves.

After a rather hectic first week back at university it was great to have the group all together for the first time, even better that we managed to commandeer a free room for ourselves for the week and we made the most of it! It’s great to be working in mixed-discipline teams because whenever I am having a problem with something modelling or design related there’s always someone nearby with the relevant knowledge to give me a quick answer.

My task this week was to take a fish mesh and come up with a variety of solutions of how it could be animated within the level, this needs to be completed by the time we have our first presentation demonstration but should be functional and testable by the designers long before then in order to get feedback and to suggest further improvements or different directions for the systems.

“Fish swim by contracting the muscles down each side of the body in turn. The muscles pull on the vertebral column and produce wave-like undulations which travel down the length of the fish pushing sideways and backwards against the water. The sideways components cancel each other but the resistance of the water to the backwards component causes the fish to move forwards. The thick arrows show the movement of the body. The thin arrows show the reaction of the water.”

I started out by looking at how to create a fluid motion in the swimming, after doing a little research in marine biologist journals and learnt how fish move through the water, I visited YouTube and did some visual research then progressed onto technical research on the UDK & 3DS Max forums. I learnt that fish’s bodies move in a pattern similar to that of a sine wave. So my first goal was to see if I could simulate a sine wave in 3DS Max – and after looking in the help files I discovered that there was a modifier which produced a wave animation, brilliant!

Mackerel Swimming Loop

So after a little tweaking with the modifier’s values I had the desired effect created, exported and… not working in UDK.

Back to the drawing board; First I tried capturing each frame out as a copied version of the mesh in order to build morph targets, it worked but looked highly irregular and was over-budget with 20 hidden meshes being called upon and swapped out simultaneously every time the fish was rendered.

I tried creating a vector spline with 100 points, a plane with 20 points in the hopes that I could simulate the wave on the spline and drive a CAT rig through it with a spline constraint. That didn’t work either.

So my eventual answer was to Roto-scope my simulated sine wave by animating a rig over the top frame by frame to approximate and exaggerate the animation based on the deformation of the mesh volumes. I then skinned the mesh and imported into UDK. This time it worked a charm!

Here is the final rig & mesh in 3DS Max, and then again after importing animating perfectly in UDK.