Sunday 30 December 2012

Tetropters V: a livelier animation

Regular readers may know that I return to the subject of tetropters from time to time, in a slow and fragmented effort to produce a documentary video showing the little beasties hovering through the air as if they were real, perhaps with an appropriate narrator (as I wrote earlier, David Attenborough would be perfect).

New readers may however respond by saying "What on Earth is a tetropter!?". Part of the answer lies in rephrasing that as "What on Furaha is a tetropter!?" Well, tetropters are small exoskeletal insectoids with a radial base-four Bauplan using a double clap-and-fling wing movement. That is about as short a description as can be given, I think. Those who wish to read more can find the latest instalment ('Tetropters IV') right here, with links to the previous three chapters.

'Tetropters IV' had reached the stage where I could simulate tetropter wing movement, resulting in animations showing a completely immobile body in a completely immobile environment and a fixed camera position. To get there had required a lot of work, but so much more was needed: the animals' bodies should be detailed -and should probably have internal movement as well-; there should be a larger variety of wing shapes; the animal should tilt a bit in the direction of movement, and larger tetropters with slow wing beats should bob up and down in flight, like a butterfly does when flying. And to mimic the effect of a macro lens the scene the depth of field should be narrow, with blurring of nearby and far objects.

 Copyright Gert van Dijk

I used some time in the holiday season to work on the animation, pushing against the limitations of time and capability. The first result of that push stage is shown above, and had the animal moving about freely in three dimensions. To do so I wrote a program in Matlab to define a 3D path in x, y and z-coordinates. The movement is based on the number of frames per second and the numbers of seconds the film should last for. To keep the wings moving there is the number of frames per cycle to consider. I added a little tremor to the vertical component of the movement, so the animal bobs up and down a bit, in phase with its wing beats. All this resulted is a text file with a lot of numbers stipulating where the animal is and at which phase its wings are. The more difficult part was convincing the rendering program 'Vue Infinite' to accept all these numbers and produce a nice image per frame. I had to work on a program in the language 'Python', which I am hardly familiar with, but which can be used to control almost any function in Vue Infinite. I got over that and made the animation above. Not too bad, is it? In an earlier version Evan Black commented that an improved animation might have the effect that the coarser aspects of the design, such as wing attachment, would be less noticeable if the animation would be developed more. I think that that now proves to be true. By the way, the three axes and the balls are there to tell me whether the animal is with regard to local space. I also did not bother to set the wing cycle to match with the movement; in a real scene the wings should beat much more often over the course of such a movement.

Copyright Gert van Dijk

The next stage, shown above, involved 'lens blurring' and body tilting. After various tries and errors Vue Infinite could do lens blurring, but in a very complicated manner: there was a variable that had to entered as a percentage, so I stopped at 100%. The blurring only worked as intended when I set it to 2000%, something I learned after having received help from the Vue Infinite forum at E-on software.
  As for the body tilting, that involved rotations around all three axes. I wrote the program so i could control the rotations by hand, but added an automated feature that differentiated a position path. There should probably be a time delay in that the body should probably start to tilt in a given direction slightly before it starts to move that way, but the lack of such a delay is not noticeable. There could be various way for tetropters to change direction; they could change the aspect ration of specific wings or during specific phases of wing movement, or they could bend their bodies to change their centre of gravity. Regardless, I think the tilt adds a nice touch, rendering the flight a bit like that of a helicopter.

Copyright Gert van Dijk 

The animation above shows where I am now: camera movement. The camera follows the tetropter. As all this is a simulation that could be done perfectly, so every bob up and down would be followed, and the body would stay centred on the image with mathematical perfection. That would look very artificial: a human camera operator would lag behind the movement and would not follow tiny variations. I mimicked that by having the camera follow a smoothed path rather than the actual one, but I do not think the smoothing is good enough yet; it probably needs a delay function as well.

Oh well, there are enough things left for the next stage, such as adding a suitable body. I will probably sculpt one in Sculptrix or build one in Vue itself. The latter option will result in an artificial technical look but has the advantage of colouring the animal with ease. The Sculptrix option will produce a much more biologically looking body, but requires colouring in some other program, another new task to learn (apparently Photoshop can be used to paint 3D objects). So, do not hold your breath, but 'Tetropters VI' will probably be the final documentary, adding all the items mentioned earlier.

Except for the narrator, I am afraid...

3 comments:

Anonymous said...

very good advancing; bravo.

> in a real scene the wings should beat much more often over the course of such a movement.

Slow-motion/capture video cameras.

Spugpow said...

This is going to look amazing! Fantastic work so far.

My only quibble at this stage is that the blurring effect is too subtle to be really noticeable. Still, I got chills watching it.

Petr said...

fantastic post again! I hope this gets posted, I tried to comment multipple times on your other recent blog posts, but the comments didn't get through... =(