Troubleshooting

Unfortunately, GENR8 is still only an alpha-version and much work remains before it can be regarded as a stable and finished product. Some of the bugs (issues?) that you may encounter are dealt with in this FAQ, but if you encounter any problems, please do not hesitate to contact the developer.

How do I choose the parameter values?
I get some crazy results as the surface comes close to an attractor!
Some of the lines are missing?
How long time do the computations take?
More on setting up the environment.
More on evolution
All the surfaces look the same and nothing happens as I run more generations!
What is a good population size?
The surfaces produced by the symmetric BNF aren't symmetric.
I am having problems with the shaders.
The plug-in does not work! Nothing happens as I type the command.
I am having trouble compiling the source code.
Who wrote this FAQ and software?

How do I choose the parameter values?

As you see, there is a large number of parameters and unfortunately it is hard to give advice on how to choose a good set of values. The default values are really quite arbitrary and you might find much more interesting behaviors using a different set of parameters. The number of possible combinations is huge and most of the features have only been tried one at a time, so combining two may give interesting and unexpected results. The best advice is to experiment, the default values give sensible results but another set of values might suit your purpose much better. Sorry, not much help on this one....

I get some crazy results as the surface comes close to an attractor!

Because of the singularity in the attractor equation, the displacement increases as the surface gets closer. The closer a surface comes to an attractor, the more it will move and thus it may overshoot the attractor in a long stride. To combat this, make sure that the surface does not start too close to the attractor or place a boundary between the surface and the attractor. Repellors usually work better since they push the surface away, so you do not have to worry about things getting too close to the repellor.

Some of the lines are missing?

There are two situations where GENR8 can fail to draw the lines that it is supposed to draw. One situation arises when the vertices are too close to each other, then Maya will not be able to draw the lines. However, the lines still exist in GENR8's internal model of the scaffold. This usually occurs because of environmental factors such as attractors and random noise. To combat this problem, make sure that the vertices do not get piled up in the same place.

The other situation when lines will not be drawn as they are supposed to also occurs due to environmental factors. When two branches are to be connected across a region GENR8 makes sure that they have roughly the same direction before connecting them. If the external forces have distorted the scaffold too much, this test will fail and the region will not be subdivided as it was supposed to. By increasing the branch angle parameter, more branches will be able to connect.

This computation takes too much time.

The growth is exponential and this means that each growth step takes about twice as long time as the previous step. Thus the computation time increases VERY fast. Care should be taken when drawing more than six steps!

If you are using the evolutionary algorithm, the run can be interrupted by hitting the Esc-key. Unfortunately, it is very hard to predict how long time the evolutionary run is going to take. In some cases you might get a surface with lots of subdivions that takes very long time to compute and in the next run you might end up with simple boring loops. To some extent, this can be controlled by the fitness criterion.

GENR8 has an internal model of the environment, that speeds up computation by orders of magnitude. However, some things must be done through Maya (in particular drawing and detecting intersections) and this takes a lot of time. You can not do much about the drawing part (just watching one individual does not help) but if you use less boundaries, things might go a little faster.

More on setting up the environment.

Note that the environment can have a great impact on a design and even more so on an entire run. Thus it is hard to say anything except for an empty environment. Also, the other parameters (especially the scaling) can produce a wide range of results.

If you define your own environment with boundaries and layers etc, do not give the Maya-objects names that start with "genr8", this might confuse GENR8 severely. It is a good idea to create a new layer and draw your boundary elements in that layer. In that way it is easy to toggle the visibility of the layer if you want to view the generated surface without the bounding elements obscuring the view. New layers are created with the button to the left of the Default layer.

More on evolution

The evolutionary process tries to minimize the fitness of the individuals, so the fitness function is very important.

By default the subdivisions criteria has a high weight since that is usually a desired feature. Otherwise the system just creates surfaces that only consists of a perimeter. Since the size criteria depend on the start length, the scale and the number of steps, it is usually a good idea to decrease the size weight.

If you see something that looks intersesting but GENR8 is of a differing opinion (giving it a high fitness) you can coerce GENR8 into doing as you wish. You can edit the fitness value of individual designs. This will make sure that the surface is copied directly into the next generation and its genetic material will be more prevalent in the next generation. The same effect can be achieved by copying the individual so that it occupies a larger portion of the population.

All the surfaces look the same and nothing happens as I run more generations!

The best solution is to increase the population size. The downside of this is that each generation takes longer time to evaluate. So if you are working on a slow computer, then there are a few other things to do. The easiest thing is to increase the mutation rate or the number of crossover points, creating more genetic variation. Another thing to do is to load a saved genome into the population to get some more variation.

What is a good population size?

The answer depends on what computer you are using and how long you are willing to wait. During development a 350 MHz Pentium II with 395 MBytes of RAM was used. This allowed for runs with a population of 50 individuals without too much waiting in between (Usually 2-4 generations at a time were ran and the result was inspected). If the population size is less than 20, it tends to converge quite fast. As a general rule, it is better to have a large population and only run it for a few generations than the other way around (many generations, few individuals). This allows for greater diversity and variation in the population. The best advice is to try out a few different population sizes in order to determine your preferences.

The surfaces produced by the symmetric BNF aren't symmetric.

The most likely culprit is the environment. However, this may happen even if the environment is empty. The reason for this is the branchAngle parameter. If the angle is large, pairs of branches that match badly might merge and thus the symmetry is lost since the branches were supposed to merge in another way. If you ask why this can happen, the answer is that the algorithm that performs the merging does the matching in a unpredictable (albeit deterministic) order.

I am having problems with the shaders.

GENR8 automatically assigns a shader to the produced surfaces. The assignment is completely random and it picks shaders from the available list of shaders. One of the default shaders, particleCloud, is transparent, which may explain why some surfaces do not seem to be shaded. To change shaders, the following procedure can be used:

  1. Select the surface
  2. Right click and go to the item at the bottom of the menu, Assign.
  3. Choose Assign materials
  4. Choose an appropriate shader, for example lambert1.

There are several situations where problems with shading can occur. The shaders are assigned using an undocumented MEL-command, assignSG. The assignment algorithm was thus created without full knowledge of what is going on, which may account for some of the strange phenomenas. It seems as if there are problems using the command the first time GENR8 is run, although a thorough investigation of this bug has not been conducted.

Problems may also arise when shaders are first created and then deleted. Some surfaces may be assigned a shader that does not exist anymore.

The plug-in does not work! Nothing happens as I type the command.

Ok, here's what to do (if measure i doesn't solve the problem, resort to i+1):

  1. Unload the plug-in and then reload it (using the plug-in manager).
  2. Re-start Maya.
  3. Re-install GENR8.
  4. Re-start your computer.
  5. Re-install Maya.

I am having trouble compiling the source code.

Here is a strange bug at large. It has been solved in a very unsatisfactory way. Any suggestions for a better solution are greatly appreciated! The compiler produces an error message referring to the Maya API files, for instance MString. The function that causes the trouble is the stream operator, <<. The problem can be circumvented by editing the API-files. You should comment out the stream operators (GENR8 never uses them) and save the files under a new name, for example MStringNew.h (the files are read-only). Then you must switch the old files and the new files from windows.

Note that the compiled file ends up in the Debug directory, even though it is a Release version (the settings are mixed up somewhere). In the 3.0 version, it is automatically copied to the C:\aw\maya3.0\bin\plug-ins\ directory. In the 4.0 project there are two warnings when linking the project. Until these are removed (suggestions welcome), the GENR8.mll file must be manually copied to the right directory. When copying a new version of the plug-in to the Maya-directory, remember that you must unload (type "unloadPlugin GENR8" in the command line) and load ("loadPlugin GENR8") it in Maya to get the new version.

Who wrote this FAQ and software?

GENR8 was developed by Martin Hemberg under the supervision of Dr Una-May O'Reilly at the MIT AI-Lab and professor Peter Testa at the Department of Architecture, MIT. Martin Hemberg about to become wet

Back