Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
pluggable_plants [2009-03-10 11:19] davegriffithspluggable_plants [2009-03-10 11:42] davegriffiths
Line 5: Line 5:
   * Somewhat difficult to control in an artistic sense   * Somewhat difficult to control in an artistic sense
  
-We propose an alternative method where the topology of a plant is still defined by algorithm, but structural shape is defined by the texture images used as components of the plant.+This is an alternative method where the topology of a plant is still defined by algorithm, but structural shape is defined by the texture images used as components of the plant.
  
 This also allows us to put much more detail in the textures, and build plants out of fewer components. This also allows us to put much more detail in the textures, and build plants out of fewer components.
Line 11: Line 11:
 ====How it works==== ====How it works====
  
-Plants are built out of components which are defined by two texture images. The first texture is the one which is rendered on screen. The second is used to define where the connection points are, indicated by black blobs - this is where child components will be connected to. These blobs can be put anywhere in the texture. +Plants are built out of components which are defined by two texture images. The first texture is the one which is rendered on screen. The second is used to define where the connection points are, indicated by black blobs - this is where child components will be connected to. These blobs can be put anywhere in the texture and are automatically located and used by the program.
  
-The restriction is that each component has one place where it connects to it's parent, which is always at the bottom of the texture, in the middle.+Each component is only allowed one place where it connects to it's parent, which is always at the bottom of the texture, in the middle.
  
 {{:comp-2-0.png?200|}} {{:comp-cp-2-0.png?200|}} {{:comp-2-0.png?200|}} {{:comp-cp-2-0.png?200|}}
 +
 +The angle which the child components are positioned at is calculated by looking at the connection points in comparison to the centre of the image:
 +
 +{{:cpangle.png?200|}}
 +
 +This means that the textures have to be drawn with this in mind. We could expand this system to use strokes instead of blobs to represent position and direction at the same time.
 +
 +{{:lollypop-05.png?300|}}
 +
 +A resulting lollypop tree. More work could be done on the joins between the textures, but you get the idea. You can edit the connection points in the textures, and rerun the program adjust the positions to get the components in the right places.
 +
 +
  • pluggable_plants.txt
  • Last modified: 2009-03-12 14:32
  • by davegriffiths