Monday, January 19, 2015

Manual modifications

It is a common pain (or advantage from other point of view) of procedurally generated content that you can't (or don't have to) control exact properties of every created individual. Sometimes it can be useful, though, to have ability to control individual branches of given plant:
  • to introduce modifications that are not result of natural plant growth (manual cut or a result of damage)
  • to allow creation of custom shapes (f.i. branches forming a letter)
  • to give user ability to reach desired plant shape manually, if he struggles to reach it procedurally
Version 1.47 of Silvador comes with a new feature - ability to modify plant by hand. It is realized through list of exceptions that are incorporated during generation. Important aspect is, what is used to reference individual branch we want to alter. After various less or more crazy considerations the system was set to use branch position in 3D space as a reference. Consequence of this approach is, that if the plant is modified, usually no branch ends at captured position anymore and typically all modifications are no longer visible. Therefore it is needed to do the modifications at the very end of plant design.
Now how to control modifications in Silvador. First it is needed to select a branch we want to modify. It can be done by pointing at it with mouse cursor and double-click while holding Ctrl button. The selected branch will be highlighted with yellow color like on this image:

At this moment there is in the clipboard in text form identification of the location with syntax of simplest modification - cut. It is possible to past it into textfield of new attribute common to all visualizers and exporters - "Modifications". Like this:

The letter C at the end identifies the type of modification. There are currently 4 of them:

  • C - cut (generation will stop at that point, closing geometry will be generated)
  • M - modification (angle of branch will be modified)
  • R - replacement (branch will continue growing there, but through newly specified component. Suitable f.i. for stubs or dry branches)
  • A - add (new branch will be created at that location)
The exact syntax is described in detail in built-in help of "Modifications" attribute. The above image after cut looks like this:

And that's it.
Here are few examples of what is possible to do through modifications. Sources of these samples can be found in Silvador\gallery\modifications.

No comments:

Post a Comment