Saturday 14 March 2020

Work in progress: A cloakfish documentary, with music!

Cloakfish have featured before in this blog, for instance here and here. With their four undulating fins, the 'cloaks', they lend themselves well to animation. Actually, like some other shapes and ideasm they really NEED animation. The movements of the cloaks are calculated with matlab using trigonometry, and the results is written away as a so-called obj-file and later imported in a rendering program, in my case Vue Infinite.

The animation in this post was one of my last attempts. The movements of the cloaks were calculated with Matlab, which resulted in lots of so-called obj-files that were imported in a rendering program, in my case Vue Infinite. If you look carefully you will see that the cloaks are the only moving part of the animal; that is because the rest is modelled as an unyielding and immobile blob.

The last time I showed such an animation to an international audience was at the TetZoo convention in London in October 2018, where I was given the chance to talk about the Furaha project. Afterwards I met another speaker, Fiona Taylor, who had given a talk on the use of music in nature documentaries. She showed, with examples, how strong music can influence the mood of the documentary, or in fact determine that mood. Here is Fiona's website; she has a very nice blog as well. I recommend that you read part of it, to understand the art and craft of using music for nature documentaries.

We got to talking in the corridors afterwards and she mentioned that, when she saw the cloakfish animation, she starting thinking what kind of music would fit with it. I liked that idea very much; as I have absolutely no musical talents whatsoever, the idea of getting a professional to take care of music was very appealing.

Unfortunately, I was too busy for a year to working on a big project, but that has changed now, so I have starting programming. The new programmes should result in more detail, and in particular in much more control over cloakfish form and movement. Once that is achieved, it should be easy to produce several species of cloakfish and set up scenes. After that, my computer will take over: one minute of film will require 60 times 25, or 1500, images. I would like to achieve a resolution of 1280x720 pixels, but that will depend on how long the rendering takes.

The first item on the programming agenda consisted of better mesh-producing algorithms. A 'mesh', in computer graphics, is a set of connected triangles (or other shapes) that together define a surface. Unfortunately, I cannot make use of ready-made programmes because I have no idea which programme can produce the undulating membranes that define cloakfish movement. I suppose that high-end programmes such as 3D Max and Maya can do so, but one look at their price range is enough to start looking for alternatives (doe any readers know whether Blender can do that?). One alternative, of course, is the old-fashioned hard work approach. Lacking the means to solve the problem using a lazy approach, actual work seemed the only choice left.

I chose to start on another marine animal, a 'crin', a sponge-like sessile lifeform that feeds by filtering sea water. It is simpler to produce. Crins are tube-shaped. Their plankton sieves are hidden away inside the tube. Crins can increase the volume of water they 'harvest' by pumping water actively through its tube. In some form or another they have featured in the Furaha universe from the beginning, even though I never painted one. My present aims were firstly to define it in such a way that I could produce low- and high resolution versions at will; secondly, to deform the body while keeping the mesh structure intact; thirdly, to deform the texture of the animal along with the shape itself. For the connoisseurs: that meant a better understanding of 'UV coordinates' and much better housekeeping of which vertex goes where.
Click to enlarge; copyright Gert van Dijk

This is an image of the 'Crin Designer', showing how the contour of the crin is initially defined with just a few points, shown connected with blue lines. These are connected by smooth curves, in red, that form the basis of the mesh production. The crin’s 'foot' is supposed to be fastened to a rock or something similar, but here it is just a disc. The tube does not run completely through the animal, but outward appearances are enough for now. I had not realised how much it looked like a wineglass. Perhaps I should call this species "P. grigio"...

Click to enlarge; copyright Gert van Dijk

Here is a high resolution mesh.

And here is an animation, in Matlab, of a low resolution version. The movement worked nicely, even though the water transport should perhaps be in the other direction, with water flowing in at the bottom and out through the top, instead of the other way around. In life, I imagine that crins do not pump water this energetically continuously, but only every now and then.

How about texture control? Here is a test render with a simple texture that allows me to see how the texture responds to the deformations. It worked as intended, so that's good. The deformation is simple and the background is not animated at all, but this is just a test render, after all.

And here is another test, this time with a more natural texture. It looks a bit like an octopus skin, which I like.

Work on the 'Great Cloakfish Designer' progresses nicely. But it will take quite time to get it ready, and only then can I start producing animations, even at a small size that I hope Fiona can work with. We hope to keep you informed of the progress on this blog, and possibly also on Fiona's blog.