Previous : index
Index
Next : Menus

title.jpg

The Tree and Plant Designer (in short, TaPD) is a plug-in for Art of Illusion that allows creation of tree or plant objects. The design of these objects is based on a procedural fractal-like process. Creation and editing of the procedure is done in an editing window through creating and linking modules, much like in the procedural texture editor window (this manual thus supposes that you are familiar with the basic concepts of procedural texture creation and editing).

1.1 General overview of a procedure

An object is created  using the following scheme :
What you, the user, specifies and design are :
There is no such thing as templates for leaves or tree geometry : basically the concept is to arrange some objects (whatever they are) following certain geometric rules. In a way, the TaPD is essentially similar to the Array tool.

The objects and the geometrical rules are represented by modules similar to those found in the procedural texture editor. There are three kinds of modules :
The objects and the geometrical rules are represented by modules similar to those found in the procedural texture editor. There are three kinds of modules :
The object modules represent 3D objects like those found in AoI (sphere, cylinders and such). One kind of module (the AoI object module) holds any kind of AoI object that has been created in AoI and imported into the TaPD. The other modules create objects that, at this stage of development, all have a conic or cylinder shape. These are used for representing branches and stems, and can be distorted (bent, twisted, etc.) following certain geometric rules (whereas the shape of plain AoI objects cannot be modified).

The geometric modules take objects as input and, given certain parameters, decorate the input object with decorator objects. They can distort the decorated object and/or decorators during the decoration process.


Value modules are used to specify some parameters for geometric or objects modules. Many of the parameters are specified through dialog windows, except for size parameters that are specified through value modules. The benefits of this design will become obvious once you become more familiar with the TaPD.

The following figure illustrates this procedural design. A cone is specified as the starting object of the decoration process. This module is unique in the procedure and is shown with a green background. This object is plugged into a coil module which, as all geometric modules, shows a maroon background. Another object module corresponding to another cone is plugged into the decorator input of the coil module. Specifying some parameters in the coil module and plugging a customised function into that module yields the result illustrated by the second figure.


figure1.jpg

Figure 1
figure2.jpg

Figure 2

1.2 Getting started

Creating a TaPD object is quite simple. Before you start, just ask yourself if you need an AoI object right from the beginning. The 'AoI object' term refers to any any object created within an AoI view window. TaPD objects are objects created within the TaPD editor window. Of course, TaPD objects are AoI objects, otherwise they wouldn't appear afterwards in AoI views and wouldn't get rendered, but they also have special abilities that AoI objects don't have (more about this later on).
So, if you think you need to model a leaf, a trunk or whatever, do it now in AoI as usual and select it in the object list. If you don't particularly need such an object, or just want to have a go at the TaPD editor window, make sure that no object is selected in the object list. Now, whatever choice you made, select the Tree and plant designer menu item in the tools menu. A window appears, similar to figure 3 :


figure4.jpg

Figure 4


If you didn't select any object before launching the TaPD editor window, you will notice that the first button of the tollbar is disabled. This button allows you to insert modules that hold the AoI objects imported into the TaPD object. Since there is none at this time, the toolbar button is disabled. The OK button is also disabled : the procedure is empty and doesn't yet produce a valid object. Click on the tube module, which is the third blue button on the toolbar (or alternatively select the appropriate menu item from the Insert menu). A module is inserted in the working area of the window. It shows a green background that specifies that this object is the starting object for the procedure. Usually, it is the main stem of a plant or the trunk of tree.

figure5.jpg

Figure 5


Modules can be moved by clicking in the background area (the green border in that case) and dragging. Selection is done in exactly the same way as in the procedural texture editor. The tube module shows three ports : two input ports coloured in magenta and one output port coloured in green. Green ports correspond to object ports whereas magenta ports correspond to value ports. So this module has two value input ports and one object output port. There are also two buttons, the one named tube and the other one with the letter 'P' on it. The first button, if clicked, brings a dialog window allowing the object contained in the module to be edited. The second button brings a preview window which allows not only the object to be previewed, but also in the certain cases the whole TaPD object or parts of it.
Right now, let's click on the 'P' button. The following preview window appears :


figure6.jpg

Figure 6

You will recognise quite quickly that this window is in fact the AoI main window stripped of any editing tool. This is only a preview window and the generated object can't be modified within this window. There is a done button to exit the preview. Closing the window can also be achieved by clicking its top right close button or selecting the Done menu item in the Edit menu. The view can be rotated and translated, and the four views mode is available. The background is light green to prevent confusion with the true AoI main window.
The preview window can also be rendered using the usual default light and camera. Selecting Scene -> Render Scene... brings out the usual dialog. Often, the camera is too far from the center of the scene. Its location can modified through use of the new Scene -> Set camera location command, which is the only way of moving it since there aren't any editing tools in the preview window. When the preview window is first displayed, the previewed object is selected, so that a Ctrl-F command frames the object in case the default scale is too far from ideal.
What you can see from Figure 6 is that the default tube is far from a stem or trunk shape. The height is too small and the radius at the bottom is too wide. Click on the done button to dismiss the preview and click on the tube button.


figure7.jpg

Figure 7

The white pane shows the current shape of the tube. The R-Shape button and the Tube shape button allow the overall shape of the tube to be defined. Set texture and set material are used to assign a texture or a material to the tube object, like in AoI main window. The deliver duplicates checkbox will be explained later on in the manual, we will ignore it for the time being. Finally, the three usual buttons OK, Apply and Cancel can be found at the bottom of the dialog. Let's concentrate on the shape of the tube. Clicking on the Tube shape button brings the following window :

figure8.jpg

Figure 8

This window is in fact the tube editor window. Grids have been added to the view shown in figure 8 to show that the base vertex lies at  coordinates (0,0). You can do whatever you want with the other vertices, but keep that one coincident with the local coordinate system origin. Selecting all vertices and resizing the tube with the top handle gives this result :

figure9.jpg

Figure 9

Note that there are only three vertices on the curve that define the tube shape. These control points are all you get in terms of tube distortion control upon applying a distortion using a coil or distort module later on in the procedure. You can have more control points through subdivision of the tube curve in the tube editor window. Beware, though, that more control points mean that the tube object uses more memory. The number of control points must thus be adapted to the use you intend to make of the tube. For major branches to which branching effects will be applied, a fair number of control points is needed (maybe up to twenty). For small branches to which no further branching is attached four or five vertices will be sufficient. If a preview shows that a particular kind of tube object does not possess enough control points, simply edit the tube and subdivide the curve. Another point is that there is no reason why the points should be evenly spaced. If the procedure design is such that a tube needs more control points in some ranges of the curve, simply subdivide these parts of the tube. Since in our example the tube will remain straight, we will keep the simple three points design.
Next, we are going to change the radial size at the base of the tube. Normally, this change is carried out setting the thickness at each control point of the tube. However, this procedure can quickly get tedious if you happen to have a more than a few control points. Close the tube editor window and click on the R shape button. A new window appears showing a customised function taken from the procedural editor customised function module. Bring the first control point to 0.5 :


figure10.jpg

Figure 10

You can use this function to set any shape along the tube axis. It overrides the thickness property of the usual AoI tube. If the function shape shows abrupt variations, the control point density of the tube must be dense enough for these changes to actually be taken into account in the final tube shape.

What next ? Insert a coil module (first button of the second button group in the toolbar, or the appropriate menu command). Select, copy and paste the tube module. The copy has a blue background, which is the colour for object modules that are not the starting object of the procedure. Look at the figure below, and set up links accordingly. When the line you are dragging from a port of a module correctly ends on a compatible port of another module, a kind of magnetic effect tells you that you can release the mouse button to establish the link


figure11.jpg

Figure 11

Click on the preview button of the starting object, the green tube module. It shows the result of this three modules procedure. The starting object preview button is special : it shows the whole object generated. The preview button of a usual object module, like the blue tube module, shows only the object defined by the module. The preview button of the coil module shows the object generated up to the coil module. Since there is nothing after the coil module in the procedure, it shows the same object as the starting object tube module. What the previews tells us is that :
To address the first point, we will plug a constant value to the size entries of the tube module. Click twice on the constant value module button (first button of the black buttons group in the toolbar) to insert two value modules and enter a value of 0.4 for the R size input port and 0.6 for the Y size input port. Setup links as in the figure below :

figure12.jpg

Figure 12

Next add a customised function (second black button of the toolbar) and plug it like figure 11. If you want to know what is the nature of each port in a module, let the mouse stay awhile on a port and a tooltip will tell you what this port is for. Let's see the result of our work :

figure13.jpg

Figure 13

Not too bad, but we could do with curved branches. Click on the tube button of the decorator tube module (the blue one), click on the Tube shape button editor window and select all vertices. Subdivide the curve twice :

figure14.jpg

Figure 14
 

Now, click on the coil button of the coil module. Enter a value of 70 degrees in the vertical angle input box, as shown in figure 15.  Select the second pane named TaPD object parameters, and enter a value of 35 degrees as shown in figure 16. This second pane is devoted to distortion parameters that can be applied only to TaPD objects. Specifying parameters in this pane for an AoI decorator object has no effect.

figure15.jpg

Figure 15

figure16.jpg

Figure 16

Clicking on the preview button of the starting object yields the result shown in figure 17. Even if it doesn't look like a tree, changing some more parameters in the coil module could make the difference. It is now the time to click on the OK button of the toolbar to get a proper object in the AoI main window (figure 18). This object can be moved, rotated, edited, etc. like any other AoI object. However, it cannot be resized (yet). To change its size, it must be edited and the size of each individual object module changed accordingly.

figure17.jpg

Figure 17
figure18.jpg

Figure 18


Previous : index
Index
Next : Menus