Article Title: Ecosystem simulation

Software: Houdini

INSPIRATION



It’s really hard to say what makes us define something as beautiful or natural. However, generalizing aesthetical preferences of the majority of people we are able to say that this aesthetics is close to some mathematical relation discovered by Leonardo Fibonacci.

He discovered it while examining speed of rabbits’ reproduction. If we have a closer look at this relation, it occurs that phenomena

based on it are far more attractive for humans’ senses. If we divide any number from Fibonacci sequence by a preceding number,

we get a quotient around 1.61804, which is the golden ratio, known as early as in ancient times. How is that possible that the ancient

architects knew this? Probably nature in the evolution process taught us the way we define beauty. We are not able to explain our choice’s rightness because we favour it subconsciously. Leonardo Da Vinci was correct to notice that the relation between the

navel’s position on a human’s body and the height of the body is close to 0.618.  This can be seen on his sketches. In addition,

most of Mozart’s sonatas were divided into two parts precisely according to the golden ratio. Contemporary musicians making

minimal music (Steve Reich, Terry Riley, and Philip Glass) intentionally use Fibonacci sequence. What you will see in the following

 is purely mathematical, but at the same time, it is a bit unpredictable. You might say there is magic in it, just as there is in the PI

number.

 

 

PROJECT TARGET
 
The target of the project was to create procedural plants model, which sent themselves information and form in such a way so that 
in the result they make one organism. This organism is an ecosystem in which every plant, every leaf and fruit has its own not 
incidental place. The project takes into account basic subjects of ecology, visual analysis of ecosystems, Fibonacci sequence and 
collision patterns from phyllotaxis family.

 

 

THE SEEDS SIMULATION
 
The seeds simulation has influence on the whole ecosystem. Can say that it's very event because seeds don't have any influence on 
what circumstances there are on the ground they are put on. Picture below shows an example of such simulation:
 

 
The most important task of every seed is to take the highest place for the future plant. If two seeds are close to each other and the 
area taken by them spreads fast then they fight for their place and the one that gained more energy for life wins. It's also possible to 
push the enemy away, but it happens rarely when the energies of the seeds are similar and not enough to win with the enemy. In that 
case, it comes to a division of the zone by collisions.The seeds accumulate the value of the Vigor that is a result of the comparison 
of the supplies that they have, with the settings in the window which controlls those simulations:
 

 

In the bookmark Calculate Vigor we set what decides about plants’ growth speed. If water has big influence, only those seeds that 
have enough access will grow good. Water Intensity favours only those seeds with the optimal amount of water. Option Constant 
Intensity makes all seeds’ growth faster at the same time, what makes them thinning. In other words, plants begin to gain more place 
and compete with themselves killing each other:

 

THE PHOTOSYNTHESIS
 
From the previous simulation we know how much space seeds take and what life conditions they have. Assume that seeds have 
sprouted and there appeared little plants. A necessary factor is the photosynthesis, which is calculated from the average access to 
the sun in a day cycle. Here is the tool for this simulation:
 

 

Let me mention only the most important options: "sun sample" describes how often a plant’s access to the light must be checked. 
For example, if sun shines for 15 hours within a day and we would like to do measurement every 10 minutes we must set that value 
to 90(15h*60m/10m). Turning on "Disable Set Vigor" we give our plants second chance, where "Vigor" sets "Constant Vigor". In 
section "Grow Setup" we describe what influences the daily plants’ growth. ”Phottosynthates Total Step” describes how may of the 
virtual days simulation should last. All those possibilities of settings are made with visual effects in mind and there is a possibility to 
break previous dependency (seeds simulation) what enlarges the influence of the user on the final effect.
 

 

LSYSTEM CHILDREN AND RELATIONSHIPS BETWEEN PLANTS

 

From each seed there grows a parent. The amount of children born depends on the energy accumulated by the seed. Options 
available for this simulation:
 

 

More important options:
"Max Segments" - the maximum amount of the generation for Lsystem.
„Grow Influence” - what has influence on the energy of every parent. This energy is the base to calculate its thickness and height and 
also the amount and look of the children.
„Min Grow To Live” - the minimal energy to life.
In the bookmark "Root" we shape the parents. Using "Contrast Influence" and "Contrast Center" we can control the differences 
between places rich in energy and poor in it. 
Bookmark "Branch" is more complex but it works similarly to "Root". Big part of the calculations is done out of our direct 
influence. So for example, the main distance between a child and a parent results from their thickness and is calculated automatically.
In lsystem those options are changed for variables:
 

 

Lsystem rules:

Premise A(b)C(s)

Rule1 A(i):i>0=/(137.5)[&(90)f(r+h+i*j)B(d+(rand(i)-0.5)*l,e+(rand(i)-0.5)*f)]A(i-1)

Rule2 C(i):i>0=a("Cd",0,1,0)a("root",1)F(r*2,r)J(r)C(i-1)

Rule3 B(i,w):i>0=a("Cd",1,0,0)TF(w,w/2)J(w/2)B(i-1,w)

 
 
Then there are calculations between plants. In the result, every plant has its own space, which is not shared with any of the other 
plants. Here is the result of such simulation: (green-root, red–children):
 

 

Summing that information, we get the main outline of the ecosystem:
 

 

 
THE INDIVIDUAL SHAPES
 
Inspired by cones I began to study base shapes of plants. This is the first try of connecting Fibonacci sequence and Phyllotaxis:
 

 

Simple modifications of those shapes let me get some nice-looking forms and what's more important individual parts always 
arranged in a natural way:
 

 

 

In the result, all plants are made from the ground/base and the shape of each of them is closely linked with the seed. Every element 
corresponds with stem, which passes information needed to describe their position and shape. Therefore, each of the plants is 
special and its shape is not accidental.

 

 

 

SPIDER’S WEB

 

 
The Picture shows a try of putting 2500 spiders’ webs between 24000 points placed at the ends of leafs without any collision. This 
simulation’s efficiency is low (25%), but it gives confidence that none of the spiders’ web intersects with a plant. The time of the 
calculation takes about 20 minutes

 

THE TECHNICAL SIDE OF RENDERING

 

 
During rendering bigger number of plants, there was a problem with too big usage of memory. As I wasn't sure about the camera 
shot nor the shape of the plants, I had to create a system which would limit its usage and wouldn't make the job harder. 
 

 

Option "Render To Memory" is made to modify shapes and to quickly preview little groups of plants or simple ecosystems.

 

 

„Render To Disk” is for rendering the whole scenes, which made the use of memory lower of about 50%. Button „Save Plants To 
Disk” recorded 3 versions of each plant to disk. Then they were connected to "Geometry Node", which loaded simplified geometry 
and localized plants in the viewport and then created their bboxes in rendering time. Special kind of scripts enabled simple creation 
and changing options in big amount of nodes, where every plant had its own unique ID number:
 

 

Both methods have the possibility to change invisible for a camera plants for their simplified equivalents. This solution is good even 
for generating shadow, reducing memory usage from 5% to 40%. Additionally "Render to Disk" can pass the whole geometry 
during rendering time.

 

Additional solution which makes the job on the final image much faster, is ambient light precomposition projected on plants’ 
shaders on camera’s NDC:
 

 

 

 

 

Arkadiusz Rekita

ptakunn@o2.pl