Saturday 2 August 2014

More cloak and dagger stuff: cloakfish IV

Cloakfish have been discussed here previously; for the latest instalment, go here. Before I go on, I wonder how to call them; the plural of 'fish' is still 'fish' when you are talking about the same species, but as far as I know 'fishes' is correct when dealing with more than one species. So should I write sentences like 'Clown cloakfish are founds in their thousands under floatreefs' and 'The many cloakfishes of all shapes and sizes in the peri-Archipelago seas'?

Anyway, cloakfishes (!) were developed as animations before I painted them. So far, they were animated using MS-DOS, believe it or not, but the result was a bit two-dimensional. I later used Matlab too, but only as a painting aid, not to produce animations. Their bodies were very simplistic and the cloaks themselves were just sheets, without any thickness to them. But when I saw large cloakfishes in my mind's eye, they floated majestically into view, with cloaks as substantial as those of a manta ray. In fact, the one I will show now is a 'shortsleeved cloakfish' so it does look a lot like a ray, but with four-sided radial symmetry, obviously. So how could I realise such a vision?

Click to enlarge; copyright Gert van Dijk
Well, with difficulty... The overall strategy consists of several steps: the firsts relies on Matlab to design the overall shape of a cloak, as shown above. The various curves are combined to form the outline of the cloak as well as of the part of the body -the dagger-  it is attached to.

Click to enlarge; copyright Gert van Dijk
Then, flesh out the form by creating two surfaces for each cloak so it smooths into the dagger. What you see above are two such half cloaks, together making up one cloak. If you were to stick four such ensembles together you would have a full cloak and dagger assembly.

Of course, there is movement to think of, and the shape of the cloak has to be changed over its movement cycle. I divided the cycle into 200 steps to have some temporal resolution. For each stage of the movement there are eight half cloaks, so we are now at 1600 files. All these shapes are written to store as 3D obj files, again, using Matlab.

Click to enlarge; copyright Gert van Dijk
Meanwhile, design a head in a suitable program such as Sculptris. There you are; it is not very detailed, but more details would probably not be visible anyway. Also create an underwater landscape in Vue Infinite with a simple animation to allow the cloakfish to glide through the water. Open the programming language Python and write a script for Vue Infinite; from within Vue, use the Python script to load the eight appropriate half cloaks for each frame, the head too, assign textures, transport the lot to the correct positions, render an image and store it. At a reasonable resolution of 640x360 that will take about 30 hours.

Copyright Gert van Dijk

All that remains then is to create a film, perhaps add sounds, etc. What you see above is a trial version in which the cloakfish is just white. I rather like the movement. For a better view, visit Loncon3, where I intend to show a good version... 


PS 1: this is post #200...
PS 2: I am considering returning to blogging regularly after Loncon3.


(PS 3: this is to stop a particular site from copying my blog: 7InDB4PgQaCddePKQEqA )

9 comments:

Mike said...

I'm curious about the "1600 files" for half-cloak animation. Is there really no symmetry here, such that one frame of animation for one cloak can't reuse another one by reflecting/rotating/timeshifting? Or is that just more faff than it's worth?

Sigmund Nastrazzurro said...

Mike: I could indeed have used fewer files. If all four cloaks have the same shape and the same overall movement, it is not necessary to predefine all phases for all four cloaks: it is possible to define a cycle for one cloak and use rotation to obtain a the others. The smallest number of surfaces needed would be one of the left and one for the right half of one cloak for each phase, so '2n', where n is the number of phases to describe a cycle. As I chose 200 phases to describe a cycle, 400 files would be enough. But doing it that way would require writing the rotation routines in Python or to try to get Vue to do it through Python, both of which are tricky. The way I chose it I could do the heavy work all in one go in Matlab and keep Python to control Vue in a fairly simple way.

Spugpow said...

It's surprising to see the cloak fish using what looks like a "walk" cycle for its cloaks.

Petr said...

i somehow imagined cloakfishes(!) as small animals only, so seeing a "cloak manta" was a real surprise to me. I am amazed by your skill, the animal moves very gracefully. it is also obvious it's an animal of substantial size, great work!

Sigmund Nastrazzurro said...

Spugpow: well spotted. On my site I explained that having the cloaks touch one another would improve propulsion, but with this large 'mantacloak' they do not touch one another anyway, so there is room for other gaits, even one as simple as this (although I will make another one too..)

Petr: I though it was time to have a big one. I chose a slow finbeat with thick fins and small eyes as indicators of large size. Judging from your comment, it worked!

Petr said...

It surely did Gert! :)

SingYu said...

I think your animation looked absolutely fantastic! I can only hope that one day I'll be able to transcribe something from my imagination into a video like you did so here. I wish I could go to Loncon to see the full version.

Jan said...

Cloak manta is a magnificent beast! But may I ask if you want to reveal more about their strange mouth and filter-feeding apparatus? Are the cloak fishes somehow related to the animals from "Swimming with tubes" page?

Sigmund Nastrazzurro said...

SingYu Lam: thank you!

Jan: Actually, the details of the filter system are a bit vague at this point, even to me. Cloakfish are not related to the 'peristaltic pumpers': their way of propulsion is too fundamentally different. Of course, all animals are related to one another, as you know, but for practical purposes the answer is no.