Saturday 4 June 2011

Its a bird, it's a plane, it's... a tetropter (tetropters IV)

The nice thing about computer animation is that it allows you to actually see thing that you could only dimly imagine beforehand. One image that has been sitting in my mind for many years is the following: you see a dusty plain, and a herd of handlebars (Latifrons imperator) come galloping in from the right hand side of the image in the distance, and then wheel towards the viewer as if they were performing a well-rehearsed cavalry manoeuvre. I can almost hear them too...

Unfortunately I do not see anyone spending a small fortune to make this a reality, so I will have to content myself with what I can do myself, with my PC, at home. Some visions therefore remain locked in my head, but a few more modest ones do find their way out. Making tetropter flight visible is something I thought I worked on for quite some time; today I can show you a near-final result. Near final, because nothing creative is ever truly finished. In this case, the camera should move, the animals should vibrate in rhythm with the wing beats, there should be more details, there should be motion blur, and there absolutely has to be blurring to mimic a limited depth of field and through that create the illusion of small size.

Still, what I can show you is the principle of the thing. It's not a movie, but an illustration of wing movement in slow motion. Tetropters have been described several times on my blog. A summary of the tasks involved in animating them is found here, and entries on their design and wing movement patterns are here, here and here. In short, they are radial flying animals, whose four wings can do a 'double clap and fling', invented by yours truly, and later also by other people in the flying robot business. By the way, the movement of tetropter wings is not all that different from the complex way in which Earth insects move their wings.

This is an animated scheme to show how it all works: the wings are planes that are warped as they cycle through their movement cycle, so their shape is different depending on were they are. Where they are is governed by rotations along the x-, y- and z-axes, and all these paths can be altered and edited. The Matlab programs that do all this in the end write lots of 'obj' files: those are files describing 3D shapes; one is produced for each wing for each frame of the cycle (there are usually 120 frames in a cycle). A script written in Python then loads in a scene containing a body shape without wings in Vue Infinite, adds the appropriate wings per frame and stores the images. These are then used to form an animation, and those are what you see here.
The 3D shapes of the wings consist of 1600 small triangles, which is more than enough to show supple movement. As they are they do not look like wings at all, but there is another trick to take care of that.

The trick in question is to add transparency and colour. The transparency mainly makes unintersting parts invisible, but it is also useful to make the wing itself partly transparent as here. To create the fly-like animal above (Bombilator musca) I used an image of a real insect wing found on the internet, and used that to create a transparency mask. All of a sudden, the boring rectangular 'wings' produced by the Matlab program take on a biological appearance. Please do not look too closely at the body of the animal: it is a simple shape cobbled together in Vue. As you can see the animal has four legs and two sets of eyes: upper ones, presumably to scan for danger, and lower ones, near the food gathering end at the bottom.

A bit of colour makes a lot of difference, so here is a farfalloid, resembling a butterfly in overall appearance (Farfallapter caeruleus). Indeed, I stole its wings from a real Earth butterfly, albeit with some warping and editing. Mind you, quite a bit is lost in the conversion process.

Click to enlarge; copyright Gert van Dijk

To show that, here is a still of the Farfallapter; better, isn't it? Then again, you can see how crudely the wing is linked with the body...

I guess I now no longer have any excuse to put off work on the 'Flying with...' page. It is probably also time to redesign the site. I have already looked at that, but the days where you could learn HTML in two evenings seem to have gone for good.


Luke said...

This is fantatic, good work! I especially like the butterfly tetropter.

Have you considered using adobe dreamweaver to redo the site? I've heard that it doesn't require you to know html.

Luke said...

Oh, also, are the flygs and ballonts going to be on the "flying with" page?

Sigmund Nastrazzurro said...

Luke: thank you!
The 'flying with..' page will definitely take lighter than air into account (ballonts). For heavier then air there will be a discussion of radial flight (tetropters) as well as bilaterally symmetrical flight, with two and four wings (perhaps even more).

As for Dreamweaver, that is a fairly complicated program that would take me a long time to learn. The beginning of HTML was awkward in the sense that you had to code by hand, but there was only a little bit of code to learn, so you could get to grips with it quickly.

Evan Black said...

First off, I must say it's excellent work. Even if you can see the CG artifacts (imperfect wing connection, etc.) it does an excellent job of realizing the imagination. In fact, if you could put this in an environment moving as it naturally would, with dynamic camera movement, I'd bet many of those artifacts wouldn't even register. If only the money/time was around to realize all the images in your head, 'cause I'm dying to see them! :)

The warping wings have turned out wonderfully. My 3D skills go as far as SketchUp, so I'm always impressed with the quality that comes out of more powerful programs. One day I may have the opportunity to learn such programs and get some of my own ideas a little more realized.

One question, though: if the wing images were stolen from butterflies and other insect wings, what do actual tetropter wings look like? How do they differ? And how do you sleep at knight knowing that the insect victims can't fly now? ;)

I also understand what you mean about HTML not being the tiny little bag of tricks it once was. I keep my website pretty WYSIWYG for just that reason, though one day I'd like to do a little expanding of my own. I look forward to any additions or improvements you have for the site, especially a "Flying With..." page. :) Keep up the good work!

Sigmund Nastrazzurro said...


Thank you. First, if you insist, I'll give the wings back...

Second, I wished to put something up before I had done my own tetropter wing designs. The insect design seems to be one that is hard to improve. Wing profiles matter much less than in bigger animals, explaining why protruding veins do not harm insect's flying skills. A membrane with some stiffening elements is all you seem to need. With that in mind, the question is where to place the veins/spars. I think there will be a central spar with lesser spars going off at right angles in the middle of the wing, but other angles near the tip. They will still look a lot like insects' wings.