Another question. ... I'm on a roll here ☺
Does the distance between objects expand and contract ?
You're a very good observer.
The simulation is based on a number of individual flocks (all equal to each 450 elements) that are chasing in the Anteworld sky.
To be able to hold together these flocks must develop a series of mathematical calculations that I determine the speed and direction of movement of each individual bird.
The most simple and straightforward idea is to follow the real rules that determine the movement of a flock, that the principle is called "emergent behavior" which, as you said just you in another post, it must compare the position and attitude of a single element with that of all the other elements of the group, because there is not a "pack leader" who decides for all but each moves according to the movement of the other nearest birds.
And ... that, to me, was a problem.
Too many calculations and iterations nested in other iterations ...
I would not have managed to co-exist a large number of elements and, to create the "bird black clouds" effect, the number "must" be great.
Thus I chose one other rule of motion, inspired to the most simple rules of nature, such as, for example, the gravitational force.
Each flock has a center that exerts a force of attraction of all the elements that compose it and that prevents their dispersion.
The calculations are performed in a single iteration and are very fast.
Obviously you have to enter disturbing elements generated by random coefficients to mask the regularity of this motion and give that aspect of "pseudo-random" typical of living things move.
But ... the typical pulse of this type of movement ... is not totally erasable.
I ask as your work would look brilliant as a school of fish, and their turning is very obvious.
Also thinking about it for some especially the birds there's a dramatic change in speed from diving to climbing.
Even the rotation, unfortunately it is evident, just for the introduction of intentional disturbs in the calculations to make the simulation more realistic ...
During the turns of the flock I set one "stretching" which should simulate the formation of a "head" and a "tail" and, for the most distant birds, the rotation forces to the apparent speed sometimes too high and unrealistic ...
I spent a lot of time to refine the coefficients just looking for the best compromise ....
You could probably improve again ....
Can I ask do the objects point in the direction of travel ?
I think the insects are spot on.....
Being able to point, to the ever, in the direction of motion was another huge problem ...
When speeds are low, and unique to the movement within the swarm, the solution is simple: the roll angle, pitch and yaw setting "proportional to the relative velocity components in the three space" dimensions.
That's why the swarms of insects are more accurate!
For the birds it is complicated ...
At speeds within the flock must be added the speed of flight of the flock chasing other flocks.
The speed range becomes so extensive that finding a single coefficient that includes the value at an angle "that reproduces the reality", for me, it was hard.
There are still many times when the algorithm fails ...
*********************************************************
I realize that, at this point, or she could be justified in an obvious objection:
But, because you have published a model in which you admit the persistence of many defects ??
Would not it be better to wait, study a little more, and publish when you were eliminated all these defects ??
(Because it is just to find other more effective methods and these defects are definitely eliminated ...)
The reasons are many:
- The purpose of the model was to groped to reproduce the wonderful effects of the flocks in the sky.
It should be seen "from afar" and imperfections of the movement of the individual elements should be considered "almost irrelevant".
- Construction of single bird (very low definition, fixed wings and textures just mentioned) defines the model order immediately: only group viewing.
- The models of the swarms of insects seemed good enough.
- Having found a way to enter a large number of objects in the scene at the same time it seemed to me, alone, worthy of publication.
- Finally, the most important reason.
The attempt to arouse interest with something pleasant (hopefully), the construction of other forms of life from someone of good modders following this forum.
Even the play guessing the principle of operation of the model could be a stimulus to increase the interest ....
I have always believed, and my conviction increases with time, which Outerra deserve to leave an important mark in the world of computer simulation.
Any effort and any contribution to his "beauty" (and therefore to its reputation in the computer world) or she could be a help to abbreviate the time of its completion.