Showing posts with label Matlab. Show all posts
Showing posts with label Matlab. Show all posts

Tuesday, 14 October 2025

Furaha microdocumentary 1: The spiny desert slantie

Well, here we go: a Furaha microdocumentary. I gave it the number one, although that is not entirely accurate. I have made several videos in the past that might also be called 'Furaha microdocumentaries'. Those older videos reflected ideas about Furahan wildlife that are no longer current, with as the most obvious example the presence of ballonts. That is one reason to regard them as behind the times; another is that my new breed of microdocumentaries is of higher quality, or at least I like to think so. Finally, the new microdocumentaries tie in with the Furaha book and will hopefully increase sales. The Book is set to become available at the end of this month, October 2025, or next month. (The reason for the uncertainty is rather sobering: the books are printed in India and have to be shipped to the UK, but unrest in the Red Sea may cause a detour around Africa.)

  


Here it is! Blogger only shows videos at a rather small size, so I strongly recommend that you have a look at the video on my YouTube channel, where you should be able to see it in its full 1920 by 1080-pixel glory.

 I aim to produce more such videos, although they take a long time to produce. I thought beforehand that ray-tracing the images would take the most time, at three to five minutes per image for 24 images per second for something like a minute and a half. Although that amounts to about 144 hours, rendering can be done at night without paying much attention to the process. Programming the animals' movements takes devoted attention though, and that costs time, as witnessed by my previous post on such animations.             

If all goes as planned, there will be three or four microdocumentaries for each of the clades spidrids, cloakfish and tetrapters. Don't expect one every week! There will also be a general 'advertising video' out shortly.

As for the spiny desert slantie, its scientific name is Obliquambulator serratus. This is probably the first time I use the word 'slantie' in this blog; it occurs more often in The Book and represents a colloquial term for 'slanted spridrids', as described here first. In 'normal' spidrids, the legs move in a vertical plane and each leg segment is bilaterally symmetrical. In slanties, the plane of the leg is at an angle to the vertical and that angle is now part of the anatomy: slanties cannot in fact rotate their legs to become fully vertical. The slanting had no effect on leg shape early in slantie evolution, even though one side of the leg was now habitually up and the other side down. But later the legs segments evolved asymmetry, as shown clearly by the spines on the legs: these spines stick out in a horizontal direction, both on the top side and on the bottom side of the segments.

There is more to tell about slanties and spidrids. Making a video raises questions that paintings do not, such as whether the animals make sounds, what kind of sounds, and what they do, socially or otherwise. The video answers a few of those questions.                     

Wednesday, 17 September 2025

"Future Spidrid Microdocumentary May Feature Silly Walks"

 Well, there's a headline for you. This post contains a quick update on the evolution of the intended 'microdocumentaries' about spidrids, cloakfish and tetrapters. 

Why microdocumentaries? Because even animations of a few minutes take a long time to make if every frame is raytraced. Why spidrids and the other mentioned clades? Because seeing these animals move definitely adds value, compared to a diagram or a still image. There won't be hexapod microdocumentaries because my animation skills do not include such soft-bodied animal shapes. Not yet, anyway. 

The key elements of programming tetrapter movement are already there and I expanded the Matlab programmes that control cloakfish movement. I have almost completed work on programming spidrids, allowing visualisation of walking over uneven ground, separate movement of the abdomen and cephalothorax, slanted spidrid legs, and spidrid social signalling. I am considering having multiple spidrids walk about in a scene; that would be nice but is not essential.   

There was a very major snag along the way. I had intended to use Zbrush for 3D modelling, and had thought that I could use ZBrush, Sculptris, Photoshop or even Window's 3DPaint to paint body parts and produce texture maps. Unfortunately, Sculptris and 3DPaint no longer work well, maybe because Windows changed too much. Adobe abolished 3D painting in Photoshop because they now have a separate program for that. A glance at internet sources convinced me that ZBrush made texture exporting extremely complex, in true ZBrush style (for some reason the people at ZBrush keep clinging on to a horribly unfriendly user interface). What now? Well, with trepidation I turned to Blender, which had scared me off years ago because it was equally unfriendly. But the Blender user interface was said to have become friendlier now, so I downloaded Blender and selected the subjects of sculpting and texture painting for study. About 9 days later, I had modelled and painted all body parts of a new species of spidrid and had exported them successfully along with roughness and colour maps. I think that is telling, as I started with zero Blender knowledge. Mind you, Blender is still complex, because it does complex things; but there is a solid logic behind it.

 

So here is a try-out of a new spidrid species, produced with Matlab, Blender and Vue. There is a version with better resolution on my YouTube channel.  You may expect this species to feature in scenes of higher quality with sound, plants and more scenery.

 
 
And here is my rough starter species walking with a 'pronking' gait to impress potential mates. In this spidrid gait, two sets of four legs move together. It is an eight-legged version of the 'double tripod' gait used by insects, so I am calling it a 'double table' gait. In the pronking version, the body is held high and the legs are lifted much higher than needed. I think this walk is objectively silly, but you should ask the intended audience what they think of it, and that would be other spidrids, not me.       


By the way, I am trying my hand at Instagram too; you should be able to find me using 'J.Gert van Dijk' 

Sunday, 7 March 2021

Explaining and animating how cloakfish swim

In the two previous posts I wrote about parts of The Book that provide background information about how animals move on Furaha. There will be four double-page spreads showing such themes in The Book, about rusps, spidrids, tetrapters and cloakfish. 

I thought the cloakfish one would be easy, until I decided that it was high time I also made some progress towards a short CGI documentary I wrote about earlier, the one with cloakfish biodiversity as its main subject. That is a very big job and it is quite possible that I will fail on the programming side. But nothing ventured, nothing gained, so I went ahead and put some hours into Matlab programming. My strategy to design diverse cloakfish is to write editors that allow shapes to be designed with ease. The programmes then proceeds to make ‘3d meshes’, the basic working material for 3D design. How to get from meshes to nice photorealistic images is another story altogether. 

Click to enlarge; copyright Gert van Dijk

These are the editor screens. The user places control points here and there, which are then connected by a spline function. This results in nice smooth curves, useful for organic shapes. Panel A shows the body designer with a default shape. The inset shows a separate window controlling cross-sections of the beastie. By changing both shape and cross sections interesting forms can be produced. Panel B is the cloak editor. Apart from determining the shape of the cloak it also allows control over cloak movement, such as number of waves, wave amplitude, cloak curvature, thickness, etc. Panel C does something similar for the four front fins, and panel D shows the resulting output for the default shapes. 

Click to enlarge; copyright Gert van Dijk

With a few minutes’ worth of tinkering, you get this relatively slender cloakfish, probably a reasonably fast swimmer. 

Click to enlarge; copyright Gert van Dijk

Or this short and bulky ‘short-sleaved cloakfish’.

Click to enlarge; copyright Gert van Dijk

Or even this highly derived cloakfish, in which the cloaks are no longer ribbons, but shaped like penguin wings. They function in much the same way. 

 But the main point of this post was to show how the cloaks move. To do that, I had a look at the literature, and I found some papers on knifefish, but to my surprise more papers about artificial robot fish with similar fins. Apparently, people all over the world are working on robot fish, which is nice. Less nice is that some work at defence institutes, so what are they preparing for? Killer fish robots? Must we really? 

Click to enlarge; from: Liu, Curet. Swimming performance of a bio-inspired robotic vessel with undulating fin propulsion. Bioinspir. Biomim. 13 (2018) 056006 1748-3190/aacd26

Anyway, here is an example of robot ribbon fin design. The artificial cloak design followed exactly the same reasoning as my virtual cloakfish designs. Such papers make a distinction between ‘oscillation’ and ‘undulation’. If a cloak, ribbon or fin swings side-to-side as a whole, the word ‘oscillation’ is used, and when waves travel along the length of the cloak, it is ‘undulation’. But the distinction is not all that clear; it depends on the number of waves travelling along the cloak. If there is less than one wave on the cloak or fin at a time, then the movement largely concerns the fin as a whole, so the movement edges towards oscillation. Here is a YouTube film explaining the difference

Pure oscillatory sideways movement are useless, because they do not propel the beast forwards. The animation above shows such an almost pure sideways movement of the cloaks. The movement would push water away from the cloak, resulting in a force towards the attachment of the cloak (the ‘dagger’). In knifefish, with just one cloak underneath the body, this force ‘heaves’ the body up. With four cloaks, the dagger will not be going anywhere, so this is just a waste of energy. We want water to be pushed backwards. The cloaks push water backwards when its parts are at an angle to the direction of movement. These parts produce forwards thrust. 

Let’s equip our default cloakfish with exactly one wave per cloak. One half of that wave will be angled towards the left, and the other half towards the right. Both produce sideways forces, but these should cancel one another out. The robot designers reported that the robots swam nicely with just one wave per cloak. Mind you, the robots usually had just one cloak, like the knifefish. 

The animation also shows one other trick: if you look closely, you can see that the cloaks do not sway much at front, and the amplitude of the wave increases towards the back of the animal. I borrowed that from real biology, as at least rays and knifefish do this. 

Let’s now equip our knifefish with 2 waves per cloak. The parts of the wave that are useful for swimming are now at a steeper angle towards the direction of movement, nearing perpendicular to it. I thought that this should increase the propulsive force a lot, but work on the robot fish did not agree. The velocity did not increase much, but the robot was more stable, which is intriguing. Real knifefish have more than two fins on their ribbon fins at one time, so there must be an advantage in that. 

Click to enlarge; from: Blevins, Lauder. Rajiform locomotion: three-dimensional kinematics of the pectoral fin surface during swimming in the freshwater stingray Potamotrygon orbignyi.  The Journal of Experimental Biology 2012; 215, 3231-3241

This image is from a paper about ray fin movement. The fins as a whole move up and down (so they oscillate), while there are ripples along the edges of the fins (so they also undulate). Nature seems to like combinations better than separations. The edges of the fins curl up and down, so they do not move as if there are completely stiff rays in them. 

I decided to build that in too, so here is a ‘curly-cloaked cloakfish’. I like it. One odd thing about these cloakfish animations is that it is not immediately obvious how they work, when you see the movement. It is also not easy to find an angle, when you rotate the objects, from where it is easy to get an immediate overview just how the animal is built. That can be seen as a disadvantage, or, in reverse, as an advantage, because it underlines that we are looking at an alien shape. 

By now, cloakfish ‘evolution’ has progressed to allow a variety of body and cloak shapes. Shapes range from ‘long-sleeved’ cloakfish with long narrow ribbon fins with multiple waves along their surface, to very short star-shaped cloakfish with narrow wings that fly through the water. That is certainly enough material for two explanatory pages in The Book, and should be enough for a short documentary too. But that will depend on me improving my skills as regards merging and smoothing 3D meshes.

Friday, 5 February 2021

Explaining Spidrid walking

 This will be another fairly short post. In the previous post I explained that I was working on pages for The Book that explained some biomechanical tricks of Furahan lifeforms. Other such explanatory pages deal with things such as rusp snouts and gaits (done), photosynthetic spectra (done), cloakfish movements (to be done) and spidrid gaits (done).

I will not show the actual spidrid illustrations, but can show you some of the underlying thoughts by way of animations.  I used the programs -all Matlab- to produce such animations to choose a single frame, which I then rotated this way and that until I was pleased with the composition. The resulting image was then imported into Corel Painter and used as the guideline for a digital painting. But I will not show these here.

 

The first animation shows your typical run of the mill garden-variety spidrid. It is walking slowly, meaning that each leg is on the ground for one half of the walking cycle. With eight legs, it is easy to have enough legs on the ground to provide a stable support platform at all times. The ‘support diagram’ is a polygon connecting all feet that are on the ground at any one time.


The gait used here is what I call an ‘alternating ripple’. Imagine that the legs are numbered 1 to 8, going round the animal. If the phase differences are 1/8, 2/8, 3/8, up to 8/8 in the same leg order, then legs that are close in phase would also be close in space, so many legs on one side of the beast could be off the ground at the same time, so it would tipple over. So, we introduce an additional offset for even-numbered  legs: 1/8, 5/8, 2/8, 6/8, 3/8, 7/8, 4/8 and 8/8. You will probably need some graph paper to get to grips with all this...

The red lines show the path a legs traces in 3D space. Because the ‘camera’ follows the body, the tracer paths are also respective to the body. The effect is like that of the animal walking along on a treadmill.  


The second one is very similar, but the main difference is that the legs are on the ground for less than half the time. Such schemes are typical for fast movements. The animation runs at the same number of frames per second, so you cannot appreciate the speed difference. There are fewer legs on the ground at one time. The polygons of the support diagrams have now morphed into lines or even points, if there is only one leg on the ground.       

  

Now we move to a more specialised racing spidrid. The camera no longer moves along with the beastie, but is fixed in space. The animal has relatively long legs, and runs the risk of knocking them into one another. That has to be avoided by reducing stride length a bit and adapting the gait: adjacent legs should not be at opposite phases in the cycle, as they then will certainly knock into one another. This one is using the ‘slow’ leg pattern at which a foot is one the ground half the time.   



This is the same racing spidrid at high speed. Each leg is now on the ground for less than half the time, more suited to fast movements. The animal changed its gait in two ways: the first is that the phase differences between legs are smaller, and arranged in such a way that at times there is no leg on the ground at all. It is effectively jumping! The second change is that the leading leg could only contribute to forwards movement by powerful and fast flexion movement, and I decided that the flexion muscles are relatively weak, so the animal simply lifts that legs into the air. (It should really move the body up and down as well, but the animation was not designed for complete realism.)

Many of the principles here are quite common for earth animals: walking faster is often achieved by increasing cycle frequency, stride length, reducing the fraction of the cycle that a leg is on the ground and adapting gaits to achieve jumps. Most mammals and reptiles always use all four legs at all speeds, with a few exceptions (kangaroos, probably hadrosaurs; no doubt there are more). But these poor unfortunate creatures have to make do with only four legs anyway, leaving them little choice. Earth crabs do have choices, and when they speed up, they actually use fewer legs, down to just two. Spidrids, not to be outdone by Earth creatures, have similar tricks up their virtual sleeves.



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.

Saturday, 26 December 2015

The Return of the Common Cloakfish

From time to time I find that my self-imposed restriction on not doing any Furaha work except working on The Book begins to chafe. I know that animations cannot feature in a book, but they are fun if very time consuming, and that holds for blogging too. So I gave myself a short vacation from painting and went back to an old favourite: cloakfish. The type of cloakfish shown in this blog previously as well as in this particular post is by now a primitive one. More evolved cloakfish have shown a considerable adaptive radiation: bodies were squeezed, cloaks either merged with the body or were stretched, etc., etc. There are now 'short sleeved' cloakfish as well as 'long sleeved cloakfish'.  The protocloakfish I will show in this post is a long sleeved one: the cloaks are considerably longer than they are wide.

The novel feature I wished to explore had to do with cloak movement. Until now, the cloaks moved with waves undulating backwards over the fin, pushing the animal forward. If you look closely at squid and cuttlefish, Earth's own indigenous aliens, you can at times observe that there seem to be several waves travelling over their fins at the same time: let's call them major waves and minor ones, and each set seems to be controlled independently. Here is a YouTube video showing squid movement: most of the time you see just one type of wave, but at times the pattern changes. I would not be surprised to learn that fin control in cephalopods is neurologically quite complex. I really must look up what I can find about that in my books on cephalopods (yes, I have more than one book on cephalopods: every self-respecting geek with an interest in speculative biology should devote part of a book shelf to cephalopods).



To start with, here is a simple animation showing just one wave pattern; let's call these the major waves. The waves are fairly large, meaning their amplitude is large and so is their length: they take up a sizeable portion of the cloak. The gait of the four cloaks is the 'opposite' pattern, in which the waves of neighbouring cloaks approach one another. The red ball is there only as a reminder where the 0,0,0 point is in this virtual 3D space.



The next phase, above, is of course to show the minor waves: there are more of them and they travel faster along the cloak. Mind you, I have not considered the effects of interacting waves on propulsion much yet; my first suspicion is that they can augment one another, but if they can do that, they can probably also hinder one another.  Hm. This will require thought.


Anyway, programming and visualising all this makes it difficult to think of everything at once, so first let's see what the combination looks like. Here it is. I like it; it is complex and looks organic and fairly odd. The movement reminds me of that of nudibranchs (if 'nudibranchs' mean nothing to you, just use that word to search for images in Google. You may find that you have to make room next on your book shelf next to the cephalopod section; nudibranchs look delightfully alien too.)

   
Very well, let's now assemble a whole cloakfish with this new swimming pattern. The body assemby is modelled very roughly here, without any details at all. As you can see, I wondered whether cloakfish might be able to change colour? I do not see why not, so here is my first attempt ever of depicting a Furahan animal changing colour. For the technically minded, the colour changes require  two steps: first I wrote a simple Matlab program to interpolate colours between two images, resulting in a new set of images showing intermediate changes. Second, I wrote a python script to get Vue Infinite, the programme I use to render the image, to load a different image to use as texture for each frame. In this case the changes in colour are not that big, but you can probably envisage cloakfish changing colours in much more radical fashion.




Here is the colour change again, first in close-up, and then in the form of a short scene of a common cloakfish making its way over a reef. Those who are very observant will see that the alignment of the body with the cloak-and-dagger assembly differs between the two animations. The reason for that is simply that I forgot to rotate the body around its longitudinal axis by 45 degrees. The reef scene shows the correct position of the body.

Anyway, clearly and obviously, animations have their own attraction and advantages, such as showing colour changes. How can I ever show a cloakfish changing colour on a painting?    

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 )

Saturday, 8 June 2013

Spidrids and rusps: works in progress

The main Furaha site hasn't seen any significant change for quite some time now, which makes me feel a bit irresponsible. I have devoted the time I spend on this project wholly on the blog and on new paintings. As for the site,  I will get around to a complete 'redecoration' one of these days, and the blog is what you are reading right now, so there.

I am keeping the new paintings for the book but can show you bits of works in progress now and then, both of paintings and of blog material. In this post I will show progress on two themes, not that odd as I usually work on several themes at once (a major interest at present is working out which aspects of plants can be tweaked on other worlds, and what the results would look like; that is progressing nicely).

Copyright Gert van Dijk

I have discussed spidrids here several times, the last time here. That post showed them walking on uneven terrain in a variety of gaits. Those animations, done in Matlab showed how an animal with radial symmetry changed direction without turning. Although the animations showed that well, a proper 3D animation would be better. I am not aiming to achieve the quality of Avatar or Walking with Dinosaurs, but getting to a point in that general direction would be nice. The challenge then was to translate sets of coordinates of one system (matlab) into rotation and translation values for objects in a completely different format (Vue), and then controlling Vue to make an animation one frame at a time (Python). I won't bother you with the details. As you can see above, I am now at the stage where I can control the legs and have them end up on the right orientation and position. It really looks much better at a larger size, but blogger does not allow that. The low light was chosen so I could see whether the feet end up on the correct spots of the surface: their shadows just touch them, so that works! But when the innermost segment moves beyond the vertical, that segment flips around, so my rotation subroutine isn't quite right yet. I'll solve it. Meanwhile, it's starting to look real, isn't it? Now just imagine a body in between, texture on the ground, plants and shrubs with leaves swaying in the breeze, the sound of spidrid legs on the floor, and the occasional 'chikking' of the spidrid itself. I can see it already; perhaps imagination is better than animation...

Click to enlarge; copyright Gert van Dijk
Rusps! After my last encounter with them I thought some more about a possible painting. I decided it would look good as a double page spread, occupying the top of both pages. That results in a very wide format, just the thing for an animal that is itself long and horizontal. I decided to 'stagger' successive legs: segment x has the legs placed a bit to the inside, and segment x+1 has the placed to the outside, x+2 to the inside again, etc. In that way the stride might be long without the animal knocking its legs together. As there are so many legs, each one can be skinny. So I took the 3D model of a segment I did earlier, strung them together and starting playing in Vue with positions and curves. But I also needed a head, so I sculpted one roughly in Sculptris. I do not need a detailed sculpt as the sculpt is only a simple aid to produce the painting, not an end in itself. (Then again, if I did that, I could perhaps sell you models of spidrids and rusps). That is what you see above.

Click to enlarge; copyright Gert van Dijk
Here is another view of the rusp head. You cannot see the inner design of the snout, but the story is as follows.This particular rusp species, Megacrambis brucus, is very large and has an accordingly large head. It always pays to conserve energy, so moving that massive head or even the entire body to eat one bite is wasteful. It is better to stick a small head on a long neck (sauropods) or extend the reach in another way (arms, trunks, hooks). Inside the rusps' snout, technically a  'rostrum', there are rings connected to one anther at right angles to allow pointing the rostrum in all directions. Then there is one of those intriguing linkage systems that fish in our world excel at. Putting that in action extends the reach of the rostrum two- to threefold. Finally, at the end there are some grasping mouthparts. I put some more conventional mouth parts underneath; they are probably part of the overall rusp design.

Click to enlarge; copyright Gert van Dijk
Anyway, I put all he 3D parts together in Vue and played some more, seen at the top. Below you see  a quick over painting of the result. I was aiming for an overall diagonal effect in the composition, of which the shadow falling over the rusps's body is a part. I am not certain whether I will keep it though. I will keep the strong light against the dark clouds, as it helps to highlight the front whip. Megacrambis' English name will be 'Mammoth rusp', but I am not certain yet. Furaha was first discovered by Swahili speakers, so some of their names survived. I am also considering 'Mdudu Mzee' , roughly translated as 'respected elderly bug'. Any preferences?



Saturday, 6 April 2013

Crabs as spidrids, spidrids as crabs...

I recently realised that Earth crab locomotion resembles Furahan spidrid walking more than I expected. I may have spent too much time on spidrids or not enough on crab locomotion, as there was a lot to learn about radial walking, odd as that may sound. I found a very nice paper on walking patterns of decapod crustaceans (basically crabs and lobsters) beginning with the sentence 'Most decapod crustaceans can walk in any direction they please'. 

From: Vidal-Gadea et al. Arthropod Structure & Development 2008; 37: 95–108 (adapted)
The image above is from that paper and shows leg movements of a sideways-walking crab, a forwards walking crab, and a forwards-moving lobster. The ability to move in any direction without turning the body is one of the main features of a radial walking design, something I thought did not exist on earth. Apparently crabs, particularly forwards walking ones, are quite 'radial'. In fact, the paper uses the very word 'radial' to describe leg positions for the forwards walking crab. A peculiar convergence with spidrids is that its common name is 'spider crab' (Libinia emarginata).


While most crabs preferentially walk sideways, they can combine directions and walk diagonally if they so wish. The video above shows a crab that starts walking backwards but gradually adds a horizontal element until it ends up walking sideways only. (Click the link to see the source at a better quality).


And here is an example of a forward walking crab. Again, the original has better quality. If you look carefully you will see that the legs do not all point sideways: the front ones are angled to the front, and the hind ones point almost backwards. In short, they are almost placed and held radially around the body. Are spidrids crustaceoid or are crustacea spidridoid?

Click to enlarge; copyright Gert van Dijk

Spidrid legs, although the mere result of a thought exercise, are rather like real crab legs. The image above shows the simplified leg anatomy, say of a sideways-walking crab (or of a spidrid leg). The bottom part shows that the leg can turn forwards and backwards around a vertical hinge close to the body, movements labelled 'promotion' and 'remotion' in technical papers. Let's call that the 'body-leg joint'. The other joints, the 'intraleg joints', in spidrids have horizontal axes allowing the leg to be straightened and flexed (see the top part). There would be muscles for every joint, but I only showed them for one.

If the animal moves in the direction shown here the leg does not need  action of the promotor and remotor muscles: the power for movement comes from the intraleg joints.  If you rotate the direction of movement 90 degrees, muscle force for this leg has to come from the body-leg joint, meaning the promotor and remotor muscles.

Click to enlarge; Copyright Gert van Dijk

So what does all this mean for spidrids? Well, regardless of the direction it walks in, a spidrid has some legs parallel to the direction of movement and some at a right angle to it. The image above shows how that relates to the direction of movement and to the necessary range of motion. The legs parallel to the movement function as the legs in sideways-walking crabs, and  depend on intraleg flexion and extension, pulling and pushing the beastie. The legs at largely right angles to the movement depend on promotion and remotion. The leg in between simply make use of both sets of muscles to varying degrees. (Mind you, the word 'promotion' in crabs always refers towards the front end of the animal; in adapting it for spidrid use it must mean 'in the direction of movement', there being no front end.)

The next evolutionary spidrid twist stemmed from the idea that one of these two types of force production might be superior to the other. How would spidrids make use of that edge, while staying radially symmetrical? Before tackling that I realised I had never shown the spidrid's ability to change direction without turning. Solving that posed some interesting Matlab programming problems, but never mind, it works. I added height for fun and slanted the body a bit when the beastie is on a slope to make it look more natural.

 Copyright Gert van Dijk

Here it is! Finally, a spidrid that negotiates terrain and make a sharp turn. As you can see, the sharp turn calls for some interesting leg movements. With a shallow turn you would not see the changes well. So this is how real radial animals walk. By the way, should a rich Hollywood director wish to buy the concept for a film, I am available! Anyway, it is now time to adapt this standard spidrid walk to more energy-efficient gaits.

Copyright Gert van Dijk

The one above is built on the assumption that flexion/extension is more efficient than promotion/remotion. So, this species uses its promotion/remotion muscles to swing the legs as far parallel to the direction of movement as they will go. There are probably anatomical limits to this, so some legs still stick out at a right angle to the direction of movement regardless. The turn becomes odd, as some legs have to swing a long way to end up in their new position.

Copyright Gert van Dijk

But the existence of forwards-moving crabs shows that under given circumstances using promotion and remotion as the power house is feasible. The animation above has a spidrid moving its legs with a preference for positions at a right angle to the movement. This movement also calls for large leg swings when the animal changes direction. The legs bump into one another, which can be solved with phase changes, but I left it as it is for now. The anatomy of the animal is the same in all three variants, which may be unwise; I can see the last type having shorter legs to improve leverage, at the cost of stride length.

So there we are! Rampaging spidrids! What else is left for spidrid movement? An obvious additional adaptation would be to include slanting, but I will not provide an animation of that; what you see here was quite complex. Then again, I now have a program resulting in 3D coordinates for any part of a spidrid negotiating a 3D terrain. Perhaps I should go for a photorealistic animation? How about the 'Crown of Thorns' (Coruna spinea) making its way over rocks? Or the 'Blue Jester' (Fossor azureus) walking on the forest floor? The 'Lesser Strandsprab' (Nepa aranea) would do well on a beach, but the 'Hairstar' (Coma confusa) would be difficult to depict, with its hair cover. By the way, all of these appear in paintings I am working on...                    

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.

Sunday, 24 April 2011

Three years on

More than once in the three years I have been writing this blog I thought there were no more interesting speculative biology projects to be found on the internet, but each time I was wrong. Will the supply dry up? Perhaps not: there are more and more exquisitely detailed Z-Brush monsters, but mostly those are orcs, dragons and the like. In other words: they are not very interesting from a biological point of view. The reverse situation can also be found: well-thought out projects with artwork that does not do it justice. I guess I will simply have to wait and see how much content I can find to fill the 'allied matters' component of the blog. The number of page views slowly went up over time, which is rewarding.

So how about the 'Furahan biology' component? There is progress, if you account for the glacier-like advance of a very large project that you do not really have time for. Then again, in the last three years I got to grips with InDesign, Photoshop, Painter and XBrush (not that I am proficient in any). The most noteworthy skill I am trying to acquire is digital painting, which is the most needed one. I think I need to do some 10 additional illustrations of the "It's a fish" type, and then I will have some 15 two-page spreads to show to potential publishers. An example of those can be found in the New Hades book shop on the Furaha site: got to the brand new 'Living World Series' and you will find the 'Encyclopaedia of Furahan Wildlife' (also shown here). I aim to use that lay-out to present the book to publishers.



Rough tetropter animation; copyright Gert van Dijk

It is not difficult to think up many new animals or plants; many forms that I have now could do with some adaptive radiation. But my interest is mostly aroused by more complex puzzles. As an example I will explain the struggle to produce a good tetropter flight animation. The basic principles have been outlined before (start here to work back in time), but for good measure I have repeated an old animation above. As you can see the animal is shown from below, and the four wings move to and fro while rotating. They also move through one another, because the animation uses stiff planes for the wings: it is not good enough. I want a better one firstly, because I am curious: I wish to see what a spotted farfalloid looks like, when its beating wing reveal electric blue surfaces at one point in their cling and flap cycle, and bright orange ones the next! The second reason is that I would like to paint a variety of tetropters -talk about infinite variety-, and getting the perspective right of four warped surfaces in complex motion can be done by hand, but would be easier to manipulate by computer. I will break the problem into pieces:



Problem 1: defining movement
The wings can easily be modelled as surfaces in Matlab. These move through the wing cycle, meaning there are different requisitions for movement around the x- y and z-axes. To control them I wrote editing programs, now nearly done. The surfaces cannot remain simple planes throughout the movement cycle, but will have to be bent and warped. The animation above shows where I am now, meaning at the phase where all the 'warp factors' have to be tweaked to get it right. What you see here represents 'untweaked warping' though!

Problem 2: exporting the wings
The 3D program I am most familiar with is Vue Infinite. I had already written a program to convert Matlab patches to obj. files, which helps. But I then stumbled upon a new program, ad that was the imported wings for successive frames did not end up at the same spot in the scene. Apparently Vue calculates the mean of all x-, y- and z-coordinates to calculate the centre of an object, and if the object changes shape so does it centre. Well, I can counter that by shifting the object each frame to compensate. This needs work...

Click to enlarge; copyright Gert van Dijk

Problem 3: texturing the wings
Obviously, the wings will need interesting patterns on them as well as partial transparency. That, as well as bump maps, proved to be in the obj. definition and could be manipulated.
Here is a rough example of a warped wing with transparency and all in Vue.


So now you may understand why it has taken such a long time to put up a 'Flying with...' page, along the 'Walking with..' and 'Swimming with...' pages: the tetropter flight animation has to be ready first, and that is a big job.

Sunday, 25 July 2010

Furahan Fossils

While it might be nice to design fossils of life forms that never existed, that is not what this post is about. The 'fossil' part of the title concerns bits of the Furaha website that once existed but later vanished in an upheaval of sudden changes, and slowly got forgotten afterwards. This happened to the GalFloat advertisements and to several life forms. Some were and are perfectly viable, and are taken off the site simply to keep enough unpublished data for the eventual book. But some disappeared because they were no longer good enough, and some of these will be resurrected here. That happened to 'amphorae' and 'colonies', life forms in clear seas. They first appeared on the Furahan stage somewhere around 1997.

The life forms in questions were shown as animations, and as such they were subject to changes in computer hardware. They were originally written in QBasic, that used to come bundled with Windows. The Basic programs produced length text files defining large numbers of triangles as coordinates in space, and these text files were in turn read by a free program called 'Persistence of Vision' (POV), a ray-tracer. I used that to animate one image at a time, and a day or so later I had a long list of images numbered sequentially. These were then used to form an animation in the form of a .gif file. There were major hurdles in this laborious process: the first was that QBasic programs quickly looked daunting, limiting the complexity of the scenes. The major hurdle was of course the internet: the animations had to be short and small at only 75x125 pixels. Even then loading them took quite a while.

Time passed, the internet sped up, and at one point in time I considered the animations too small and too tiny to keep on the site. Then I found out that I had not kept all original Basic files. Extinction.

More time passed, and I stumbled on a CD with the missing programs. Still not all of them, but together the fossils allowed a fairly good look at these erstwhile life forms. So I found a new incarnation of QBasic, found that POV still existed, and went to work. The animations are bigger and include more complex scenes, but essentially they show the same things their ancestors did.


An amphora as shown in QBasic. Mind you, you have
to program things such as a perspective
transformation yourself
in Basic! Click to enlarge.

Copyright Gert van Dijk

Here is one: a scene showing amphorae. At the time, I had not stipulated why they moved the way they did, but a reader came up with a suggestion: they did so to avoid amphorivores. By the way, that reader had at the time chosen the name Nemo, but had not settled on 'Ramjet' yet). The amphorae used to sway a bit with the current; that part seems to have been lost for eternity.


Copyright Gert van Dijk

And another one: a colony thingy. I remember that all the globes you see here are part of one and the same organism, but do not remember what the parts were for. They were probably just there to make it look interesting.


Click to enlarge; copyright Gert van Dijk

The image above was supposed to be animated as well; it is of course a cloakfish. Now cloakfish did not go extinct on my site, but are in fact thriving. The corresponding programs were about the only ones that remained to be resurrected when the others all went extinct. Why is the image above not animated? Because it was saved as a .gif file, and this blogger program seems to dislike that. Computer progress: three steps forward, one backwards and one sideways.

The reason for such a laborious production process was that it was the only one I could think of that would allow me to show the type of shape changes I wanted to have. I still do not think that there is a readily available 3D-program that would allow me to produce shapes such as the cloakfish tail with some ease. The downside of course is that I could not add a suitable-looking landscape. As you can see, the bottom of the sea in these animations is completely flat. It would be nice to make use of the features that a modern 3D programs such as Vue Infinite provides. If I could just find a way to reliably control the position of an imported object, I would be ready for the next evolutionary era. That's one of the reasons there are as yet only schematic animations of flying tetropters, instead of nicely rendered ones. Meanwhile, the Furahan fossils shown here will probably remain extinct for the time being.


An amphora as a 'patch' in Matlab. The user
provides the 3D-coordinates, and the display
is dealt with by the program. Progress!


Still, I could not resist porting the amphora shape definition routines to Matlab, which was not difficult (learning a language takes time, using it does not). I then used an old routine to translate Matlab's 'patch' into a common 3D format (obj), and then I imported a few amphorae into a Vue seascape to show what the result might be like. Here it is, at the end of a post, waiting for life to arrive.

Click to enlarge; copyright Gert van Dijk