evox-b: color

Erwin Driessens
4 min readJun 17, 2023

--

monochrome versus colored

The use of four possible cell types in evox-b instead of just one in evox-a led to an increase of the morphological variety in the resulting growths. Cell types can behave differently and can thus create local variation in form and texture, internal structures, like ‘tissues’ or ‘organs’ in a body can develop. These effects are visible even if the forms are rendered in monochrome.
Integrating nuanced color in a natural way, derived from the cell states, could enhance the appearance and ‘readability’ of the growths.

(this article builds on the foundations of the previous one: https://notnot.medium.com/evox-b-evolution-122191ea7490)

While growing, the evox-b system keeps track of the type of each cell, and of its ‘time of birth’. Cells are added to the body one by one, one cell at each successive step, and this step count is used as the new cell’s time of birth. We can thus easily determine the age of each cell this way.

Cell age is an obvious candidate to derive color aspects from. We can imagine that color gradually changes over time, as the cells undergo influences from the environment. Think of the tanning of skin due to exposure to UV, or the darkening of wood due to the exposure to air and moisture.

the raw voxels, comprising 4 cell types, rendered in their default colors

Let’s have a closer look at an example growth. The body depicted above has 1527606 cells, of which 360406 lie on the surface, and are thus potentially visible. The surface cells are divided into 234115 cells of type 1 (red), 99382 cells of type 2 (green), 26909 cells of type 3 (blue) and 0 cells of type 4 (magenta). Each cell has a unique age. The first cell that was set is 1527606 steps old, the last one is 0 steps old. For each cell type a list is made with the ages of all cells on the surface, and these lists are used to form gradients that are applied to the cell colors.

The color model used is HSL (Hue, Saturation, Luminance) instead of RGB (Red, Green, Blue). HSL is an attractive choice because each of its components encodes a perceptually relevant and independent aspect of our color impression.

In pseudocode, the coloring works as follows:

for each cell type:
create the age gradient:
one of:
1) use a linear scale
2) use a compressed scale
normalize the age range to be in [0.0 .. 1.0]

choose a random reference HSL color
for each H S L component:
one of:
1) use a positive effect of the gradient
2) use a negative effect of the gradient
3) don't use the gradient

for each cell:
for each H S L component:
apply the associated gradient value

For the time being, the final coloring of a growth is randomly sampled from the space of possibilities. Evolution could be applied here as well, as the color processing steps can be encoded in 5 genes per cell type. Note that the coloring is only done after the growth has ended, because it is a processor intensive task and would slow down the real-time visualization of the growth process too much.

an example of possible colorings: the monochrome in the center, surrounded by 8 colored variants

To conclude this article, some sample renderings in higher resolution are presented. A few of these, and some others which aren’t shown here have been printed on a HP Jet Fusion 580 Color 3D printer.

This is a work in progress… to be continued…

--

--

Erwin Driessens
Erwin Driessens

No responses yet