Loading...
Logo
Processing Forum
Hi all, 

This is a port of a system I developed in the late 90's for creating organic forms or "Evolutionary Art" as it was referred to at the time. The system was originally designed for POV-Ray. The code is all written in Java (via Processing). There are endless number of these forms, which react, grow and mutate based on the conditions of the synthetic environments created by the user. I'll add more in future but here's the first couple out the gate.



The reason I chose Processing for this is because of the speed at which I seem to get things done with the PDE. Eventually I hope to integrate with Sunflow, but for now Processing just outputs points and radius values for the spheres, and the rendering is done via vRay.

Cheers

Dave

Replies(10)

Looking good and the "react, grow and mutate" approach sounds interesting. Sorry to see there is no source code to be found. Using sunflow should be fairly straight-forward when only using spheres. However vRay seems to be doing a good job as well.
Thanks, I'll be more than happy to share the code when it's in a fit state.

D.

Calx | http://calx.co.uk
I would be very curious to see this code as well. I was always curious about such evolutionary programs, but never really knew how to start (never searched either, I must admit...).
Looks superb.
Thanks Philippe. I'm glad there's interest, sharing code is pretty terrifying, but I spose it's something I should get used to. There's always that worry that you're doing it all wrong. I still feel like a designer among scientists. 

D.
Mmm... congratulations, really nice generative work and a great portfolio (the sci-fi covers are great). I can´t believe the code behind that beautiful shapes could be wrong!  Want to have a look at it too!  ;-)
Looks interesting. I'm curious about the UI interface
  1. How fitness is calculated? 
  2. Do you have any screen shots of the IU? 
  3. What is the population size? 
  4. Is it full replace per generations, or do you retains 1 or more of the fittest from one generation to the next?

Imagining the interface, the simplest would have the user assign the various offspring a single numeric "rating".

More elaborate would have knobs and sliders, or permit characteristic tuning, or user input like "more blue" or "redder" or "tighter curls", "more mass", "less mass" etc.

------------------------------------------------------
It also becomes interesting to view the meta data of the evolutionary process to see the trajectories of the various weights of the components.

If multiples users are supplying feedback one can see the user preferences tugging at the parameter settings.

------------------------------------------------------

Genetic algorithms and really cool. Their is an at least one police sketch application that uses genetic algorithm to "evolve" the sketch based on witness feedback and generating the next set of pictures. Rate and repeat.

-------------------------------------------------------
Back in the late 90's I used genetic algorithms to evolve the best set of compile time switches on SPEC benchmark code. This resulted is a overall performance improvement of 5%, with 20% for one benchmark. A big deal given that a lot of effort, over the years, had be expended to manually tune the switch settings, before using the genetic algorithm.


Ha! You're waaaaay beyond me, this is exactly what I'm talking about when I say I feel like a designer among scientists, mine is more like a game/toy compared to what you're talking about.

For a start there's no UI, the idea was to use controlP5, but the frameRate is less than 1 fps at the moment so it would be pointless. Basically, I have a simple environment class which is supposed to represent an area in space of a set size with the following variables all set randomly:


lightPower      Completely Random between 0 and 1000.
Depth           This is key to everything, as it detemines distance from light 

Among others there is also:

nutrients, toxins, viscocity, food, current, temperature 

A form is basically an array of tentacles, a bit like an anemone, it "feeds" through these tentactles. Tentacles can also sprout tentacles, and so on...

Opacity/Texture is defined by depth. The muscularity, i.e tightness of the curls, thickness of a form's tentacles are defined by access to food and stronger current in the environment. The form's strength and size (the number of instances of a single tentacle in a form) are defined by the amount of access it has to food, nutrients etc, It's symetry (made from different translation options) are defined by the differences in toxins (causing mutations) and nutrients in the enviroment, which are in turn defined by temperature, and the amount of food, light etc...

I just kept adding stuff, to make the things more diverse and intricate, but rather than adding the modifications directly I wanted them to be as a result of the enviroment's parameters. The only thing that makes the environment anything like an environment is how it affects the final render.

In the end it just writes the position and radius of the spheres, and the position of the lights and any food nearby to a MaxScript which creates a scene. Realistically, it would probably have been much easier to build the whole thing as a 3dsMAX plugin, but that would cut out Processing, and that was the bit I was most keen on...

Dave.

I see. I read more into the expression "Evoluntionary Art". You do however have a perfrect setup for "evolving" the final results. Genetic Algorithms manage a population, say 100 individuals. These mate and produce offspring, the genome being the paramenter settings. To keep this interesting there is a mutation rate, changing some random bits in the genome. Mating between A & B take a portiion of the bits from A and the missing portion from B to create a child X. The evolutionary pressure is based on the fitness and the 100 member of a generation. Their chance of mating is dependent on their fitness. The more fit having a greater chance of mating.
 
So your setup would need to provide a fitness measure. For engineering type problems this can be computed. In the case of "Art" human judgement/taste or lack thereof would assign a number to the more+/less- interesting, produce the next generation and repeat.
---------------------------
 
One needs to be careful when computing the fitness. There was a jet engine GA model that was attempting to improve the engine design. The fitness was a measure of the fuel mileage on a simulated flight. Numerous parameters associated with the engine were available to be tuned. The GA found the best solutions were to fly backwards, as doing so added fuel to the tank.
 
 
" The GA found the best solutions were to fly backwards, as doing so added fuel to the tank."
 Perhaps it was missing some thermodynamic rules...
I do have a basic system in place for "breeding", but nothing very sophisticated, your way is fascinating - I've been working on a sort of spine/tail feature, based on various parameters, in order to give the forms more distinguishable character when bred - I'm away at the moment, but i'll post again on Monday if you'll indulge me a question or two...

Cheers

Dave

Calx | http://calx.co.uk