Previous : Menus
Index
Next : Module usage and linking

title.jpg

Like the AoI procedural texture editor, TaPD modules have input and output ports which must be linked in order to generate an object. There are two kinds of ports :

Unlike the AoI procedural texture editor, though, modules can have multiple inputs for special purposes. Multiple outputs may also have a special meaning. These features motivate a special chapter devoted to module usage and linking.

Every module shows at least one button bearing the name of the module. Clicking this button allows the module properties to be edited. Some modules (any object module and the majority of geometry modules) also show another button named 'P'. Clicking this button brings a preview window which for object modules show the object generated by the module, and for geometry modules show the TaPD object construction up to that module. The 'P' button of the starting object has a special function : it shows the whole TaPD object as it will appear in AoI views and renderings. The 'P' button can also be ctrl-clicked. In that case, the geometry modules show a preview that is built down to the geometry module. Using the two possible combinations for the 'P' button use, it is thus possible to view branches decorating a trunk, but also to look at the decoration of one of these branches. Ctrl-click on the 'P' button can also be used on the starting object, in which case it only show a preview of itself rather than the full TaPD object. Ctrl-click on the 'P' button of any other object module has no special meaning. Value modules do not have a 'P' button, nor does the random module have one.

3.1 Object modules

All object modules show a blue background, except the module identified as Starting object which show a green background.

Input / Ouputs : object modules have one object output, which gives the object contained in the module to modules it is linked to. There are also two value input ports which are used to size the object in radial and Y (vertical direction). Object modules do not distinguish between X and Z axis : usually, objects used to model plants or trees have more or less circular cross-sections. Modules thus only distinguish the radial size and the vertical (Y) size. Radial anisotropy must be set at object creation, be it for an AoI object or a TaPD object.

3.1.1 AoI object module aoi.jpg aoi_button.jpg

The AoI object module represents any AoI object that has been imported from the scene, either at the TaPD creation or later on using the Import selected objects in scene command. After inserting an AoI object module in the procedure, its properties can be defined using the edit dialog window that is called by clicking on the module main button (AoI object by default) :

aoi_edit.jpg

AoI object edit window

For the time being, we will ignore the second pane of the tabbed pane and concentrate on the content of the first pane. The drop-down list box shows all the objects that have been imported in the TaPD procedure. Imported objects are in fact copies of objects that have been selected in the scene : modifying them afterwards in the scene does not affect them. A view of the currently selected object is shown in the white pane above the list box. The Set texture and Set material buttons allow to modify these parameters exactly like in the AoI main window. Note, however, that these parameters only affect the current copy of the TaPD object that is held by the AoI object module. This way, several AoI object modules can refer to the same imported object and apply different textures and materials to it. The downside of this design is that if you choose another object in the drop-down list and then come back to the original object, texture and material parameters are lost.

The Edit button allows to edit the object in the same way the edit command from AoI main window does. This way, it is possible to modify some geometric properties of the object whithout having to go back to AoI view window, edit it and import it again.

The Deliver duplicates checkbox is an important feature of the module. If checked, the module will only deliver live duplicates to the procedure, thus minimising the amount of memory used by the TaPD object. This implies that no resizing of the object in geometry modules occurs, otherwise the original object will presumably be resized many times, usually towards smaller sizes. When a live duplicate is used, the resizings are cumulative. At the end of the TaPD creation process, the size of the original object will be close to null (if not null), and the duplicated objects will be invisible. To avoid this, make sure that no geometry module that uses this object module as decorator has the Size children option enabled.

The Hidden checkbox is the same option as Hide object in AoI main window. If an object is hidden, it will not show on scene windows or rendered images. You can use it to hide certain objects or fake decorated objects around which the decoration will take place but that won't be seen.

OK, Apply and Cancel buttons works the usual way. An Apply button has been preferred to the live update alternative for showing the effects of current modifications to the object. TaPD objects generation may take a long time (some seconds or even more) and regenerating the TaPD object 'live' after time that a text field or an option is modified can in fact turn out to be a nuisance. Clicking on the
Apply button updates any opened preview window. Modifications are cancelled if the Cancel button is clicked afterwards.

The second pane of the edit window is used only if the AoI object is a spline mesh. It looks like the figure below. The parameters shown on this pane make it possible to create a thick, volumic triangular mesh out of a planar spline mesh. The purpose of this feature is to be able to give volume to planar leaves. In order to use this feature, it is necessary to create a planar spline mesh in the AoI main window and import it into the TaPD. Select the spline mesh in the object drop-down list, and select the second pane of the edit window. The Leaf thickening checkbox is now enabled. If you click on this checkbox and activate leaf thickening, a preview picture of the thickened mesh appears and shows the object. It is possible to change the overall thickness using the value at the right of the checkbox, and the shape of the leaf section using the Variation button. The customised function edited by clicking on the Variation button represents the thickness variation from the center of the leaf ( x=0 ) to the edge of the leaf ( x=1 ). The conversion tolerance is the tolerance used for converting the spline mesh to a triangular mesh. The vertices and edges smoothness can be specified, though the default values will generally yield the expected result.

After activating the leaf thickening option, texture and material parameters of the triangular mesh can be setup the usual way using the first pane of the edit window. It is however useless to manually edit the triangular mesh using the edit button, since any changes made will be lost upon mesh regeneration in the plant generation process. If you want to edit the original spline mesh, deactivate the Leaf Thickening option on the second pane and get back to the first pane. Any texture or material assignment to the triangular mesh will however be lost.

If you use thicken leaves that were previously plugged into a golden ball module, do not forget to increase the golden ball module density : thickened leaves take much more room than flat leaves.


aoi_edit2.jpg

AoI object edit window


3.1.2 Spline mesh object module spline.jpg spline_button.jpg

The Spline Mesh object is a special AoI spline mesh which has a tubular shape. It can be considered as a tube with non-circular cross sections. It consists in a curve defining the Y path along the axis of the tubular shape and a set of cross-sections represented by closed curves. A third important parameter is the size variation along Y of the cross-sections ('thickness' variation along Y). As things will become clearer upon discussing the edit window, here it is shown with the default spline mesh parameters :

spline_edit.jpg

Spline mesh editing window

The white pane shows a preview of the spline mesh, which has by default a conical shape. An Edit button can be found just below this pane. This button is used to edit a particular cross-section (circular curve) of the spline mesh. The curve number text entry specifies which curve should be edited upon clicking on the Edit button. In this example, the spline mesh has eight cross-sections defining its shape from the bottom to the top. The default cross-sections are circular with a diameter of 1.0. You can distort cross-sections any way you like, but you should keep it more or less centered, with a reasonable size (i.e. a mean size not too far from unity).

The Duplicate button copies the cross-section specified by the curve number text field into all other cross-sections. For a flat shaped leaf (but still showing some non negligible thickness) you can for example flatten cross-section #1 and duplicate it to all other cross-sections.

The next button, # of points on curves, allows to change the number of points defining each cross-section to get a finer control on radial shape. You could subdivide curves individually by editing them, but the new points would simply be ignored. Besides, this can get tedious if the spline mesh is composed of more than a few cross-sections. Entering a number of control points in the text entry and clicking afterwards on the
# of points on curves sets the number of control points for every cross-sections. You must keep in mind, though, that this process resets all cross-sections to regular circular shape, and there is no way back at the moment except for Cancel.

The Y Thickness button allows to control the radial size of the object along its height. Clicking this button brings a customised function editor that is identical to the one found in the procedural texture editor. The x=0 abscissae of the function corresponds to the bottom of the spline mesh whereas x=1 corresponds to the top. A Y value of 1.0 means that the radial size is equal to the relevant cross-section size.

The Y Shape button allows to control the curve that defines the shape of the spline mesh along its height. Moreover, the number of control points that defines this curve defines the number of cross-section curves that are used. These control points define also the precision with which the spline mesh is distorted. More points lead to a finer distortion and control during geometrical processes, but they also use more memory, especially since a different cross-section is attached to each Y shape curve control point.
The number of control points can be modified through subdivision (or simplification) of the Y curve in the editing window that appears after clicking the
Y Shape button. If the number of control points is diminished, cross-sections are removed from the top of the object. If the number of control points is augmented, the top cross-section is duplicated as needed.
The control points of the Y curve need not be evenly spaced. You may increase the control point density at positions where the R shape function varies abruptedly, since radial size is only evaluated at the Y curve control points positions.

The Set texture works the same way as in the AoI object module. The Set material button is disabled since spline mesh object are hollow and cannot be assigned a material.

The smoothness text entries specifies the smoothness coefficients for the cross-sections and the Y curve. Any modification in the respective curve editing windows will be overriden by these two parameters.

Finally, the Deliver duplicate and Hidden checkboxes works the same way as for the AoI object module discussed earlier.

A common use for the spline mesh module is the modelling of trunks. Using the bottom cross section shown below for root modelling and circular, default, cross-sections otherwise, the following trunk is obtained :

trunk_cross.jpg

Cross section shape used for
modelling roots at the base of a trunk

trunk.jpg


One final word about spline mesh objects : they use much more memory than tube objects and it is advisable to use these if many objects are to be created.

3.1.3 Tube object module tube.jpg tube_button.jpg

The tube object is similar to a spline mesh object, except that its cross-sections are circular. It is truly a plain AoI tube. The edit window provide additional editing facilities to the tube editor window :


tube_edit.jpg

Spline mesh editing window

The Tube shape button allows to edit the tube like an ordinary AoI tube. Usually, though, you would set the thickness of the tube for individual points (or a selection of them). The TaPD tube uses a customised function, exactly like the spline mesh object. This function is defined using the R Shape button. Like for the spline mesh object, the tube control points define the resolution of the Y curve of the tube object. Any consideration discussed in the spline mesh object section are valid for the tube object, except of course those addressing cross-sections.

Set texture and Set material allow to assign texture and material to the tube (the ends of which are flat).

The Deliver duplicate and Hidden checkboxes works the same way as for the AoI object module discussed earlier.

Tube objects use much less memory (and rendering time) than spline mesh objects. Hence, they should be preferred to spline mesh objects whenever possible.

3.2 Geometry modules

All geometry modules show a maroon background. They always have at least one object input and one object output. There are two kinds of geometry modules :
  • Modules that only have one object input and one object output. These could be classified as 'neutral' and do not create any object to be added to the object collection the TaPD object is made of. They can modify an object (Distort module) or simply influence the way the procedure works (Random module).
  • Modules that have two object input ports and one object output port. These modules decorate an object with copies of another object which is called the decorator object. A typical example of a decorator module is the Coil module, which is the module that is described below.

3.2.1 Coil module coil.jpg coil_button.jpg

The coil module is the current keystone of the geometry modules. It is by far the most complicated module that can be used in a procedure. Its function is to place and orientate decorator objects along an object to decorate. The decoration process takes place along the vertical axis of the decorated object much like a spiral staircase. At each step of the "stair", a decorator object may be placed along the decorated object depending on a probability check. Depending on parameters used in the coil module, the decorated object can be distorted during the process. The decorated object may also be distorted due to "counter reaction" effects which are also setup in the module.
The use of the coil module is typically to decorate a trunk with branches or decorate branches with smaller branches or leaves.
There is also a special mode that uses the golden ratio to place the decorator object. In this mode, decorators positions do not follow the "spiral staircase" scheme anymore. See the special section devoted to the use of the golden ratio decoration.

Input / Output : The first entry port (the left port using the default I/O layout) corresponds to the input of the object to be decorated. The second port (on the top) corresponds to the decorator object input. The object output port makes it possible to plug the decorator object to other modules which may in turn decorate the decorator object. This recursive process allows to create fractal objects, a common feature for trees and plants. There are three value input ports. The first one allows to enter an Y value used for specified customized functions to compute parameters based on the entered value (more anout that later on, it's rather an advanced topic). The two other bottom input ports allow to plug constant values or (much more frequently) customised functions that will govern size variation of the decorator objects (both in width and height) along the Y axis of the decorated object. All examples shown belown were obtained using a default customised funtion plugged into both R and Y size inputs. Finally, the Y output port makes it possible to redirect the current Y value of the coil module into a value input port, presumably the Y value input port of another coil module or a golden ball module.

The edit window dialog consists in two parameter panes. The first pane concerns basic geometric parameters that work for any decorated/decorator object type, be it AoI object or TaPD objects (spline mesh and tube).  The second pane is relevant only if the object used as decorator (or, in the counter-reaction effect case, used as decorated object) is a proper TaPD object or a planar spline mesh used to model leaves. The figure below shows the first pane of the edit window of a coil module :

coil_edit.jpg

First pane of the coil module edit window

The parameters shown in this pane are explained below. The basic process of the coil module is the following :
  • Start from a given position and orientation along the vertical axis of the decorated object;
  • Check if a decorator object has to be placed there;
  •  Increment and repeat until the top of the object is reached.
Positions along the vertical axis are referred to as Y positions and range from 0 (the bottom of the decorated object) to 1 (the top of the decorated object). This coordinate is a so-called reduced coordinate : it ranges from 0 to 1 whatever the real height of the decorated object.
Orientations of the decorator objects whithin the radial plane (cross-sectional plane) of the decorated object are referred to as R positions. They are usually expressed in degrees, sometimes as 2PI/n, where n is an integer.
Incrementing both Y and R values step after step and placing decorator objects yields the staircase (or screw) geometry created by the coil module.


Spiral / Rings : Spiral means that at each R step, the Y value of the decorator position is increased. A spiral staircase layout is then obtained. Rings mean that Y positions are incremented only after the R position of the decorator object has gone one full turn. In that case, rings of decorator object along the vertical axis of the decorated object are obtained.

Probability : This float number between 0 and 1 is the probability that a decorator object is placed at each possible position. A value of 0 means that no decorator object is ever placed on the decorated object, a value of 1 (100%) means that all possible positions are occupied.

Y Value button : Clicking this button brings an editor window which is a customized function editor taken from the procedural texture editor. This function is used to vary the probability value along the Y axis of the decorated object. The probability value at some Y position of the decorated object is evaluated as :
            overall value = constant probability value x function value (Y)
                Y ranges from 0 (bottom) to 1 (top).
Supposing you want more decorators at the top of the object than at the bottom, you could use a customized function that starts at 0.5 (for example) and reaches 1 for x=1. Every parameter that shows an Y Value button near the text entry can be varied along the Y axis the same way.

Use Y input checkbox : This option is used to determine whether the Y value considered for evaluation of the customised function value as described in the  Y Value button section is internal or external. Usually, you would use the internal Y value of the module, i.e. the current height along the Y axis of the decorated object, to vary the probability (or some other parameter that uses the Y Value mechanism). There are some times, however, when you want to use a value that is input in the Y input port. Let us suppose that you want to design a flower that is made of a primary stem, secondary stems that decorate the main stem through use of a coil module named coil#1, and flowers on top of the secondary stems. The petals the flowers consist of are places using a coil#2 module. Let us also suppose that you want the petals of the flower to 'close' as the secondary stems are placed towards the top of the main stem. Using the usual internal Y value to vary the vertical angle won't help, since petals are always put at the top (1.0) of the secondary stems. But if you plug the Y output value port of the coil#1 module into the Y input value port of the coil#2 module and activate the Use Y input checkbox option for the vertical angle customised function, then you can vary the vertical angle parameter as needed.

Damping factor :  Experimental parameter that will remain in the TaPD if its proven useful. The problem of random occupation of the decorator positions is that you could get three decorator objects in a row and then nothing for the ten subsequent positions. The damping factor (an integer d ) tries to attenuate this effect by lowering the probability right after a decorator has been successfully placed. The new probability is then probability /d , the next step it is evaluated as probability /(d-1) and so forth for each unsuccessfull step until it reaches its usual value. The primary use of the damping factor is to fine tune decoration. Quite logically, the density of decorators decreases as the damping factor increases. If you end up with a high damping factor, it is likely that the geometric parameters used should be modified.

R start
: this integer parameter represents the radial angular origin at which the decoration process begins (see figure coil.1a). It is expressed as 2PI/n, n=0 having a special meaning : the origin is then 0. Usually, this parameter does not need to be modified, except when two coil modules are merged. In that case, it is customary to use a non zero integer for n so that the two coil modules do not place decorator objects at the same radial angular position. You may also use the same radial origin but different Y start parameters (see further description of this parameter) to avoid overlapping of decorator objects.


R step : this integer parameter represents the radial angular step separating each possible positions of the decorator objects (see figure coil.1a below). Once again, it is expressed as 2PI/n.

Golden ratio : if this option is enabled, the decoration process uses a special golden section rule. See end of module description.

Flip children : If you use leaves that show an 'up' side and a 'down' side (different front and back texture, or leaf distorsion) for horizontal branch decoration, the default decoration process is such that leaves placed at R=PI/4 or 45° will show their up side globally facing towards the sky whereas the leaves placed at R=3PI/2 or 270° will have their up sides facing towards the ground. Activating this option causes every decorator placed at 180<R<=360° to be flipped to keep correct orientation. There is no mechanism (yet) to globally reorientate leaves towards the sky once the plant or tree is build.

coil_fig1a.jpg

figure coil.1.a
coil_fig1b.jpg

figure coil.1.b

Y start : this value is the Y position where the decoration process begins. It is expressed in reduce coordinates,  from 0 (bottom) to 1 (top). See figure coil.1.b.

Y stop : this value is the Y position where the decoration process ends. See figure coil.1.b.

Y step : the increment in Y after each turn in R. This value can be varied along the Y axis using the Y value button.

+- : If a decorator object is successfully placed at a given position, the Y coordinate can be randomised by an amount corresponding to a random distribution comprised between +value and -value. The random distribution can be uniform or gaussian. Uniform distributions are used to randomise the decoration process so that it does not lead to a "too geometrically perfect" object. The gaussian distribution purpose is different : let's suppose you are modeling a plant which places its leaves every 2PI/4 (90°) in R along the stem. Most certainly, the leaves aren't exactly places every 2PI/4. There will be some deviation, even some accidents for a few leaves for which the angle might get to 80° or 100°. Using the uniform random distribution do not make it possible to reproduce that behaviour : all angular positions will be uniformly scattered whithin the width of the distribution. The gaussian distribution, however, yields angular values close to the perfect one, but for a few positions that will show anomal deviation. Therefore, a rule of thumb for choosing between uniform or gaussian is :
  • if you want to randomise decorator positions to "hide" the coil module parameters used, use a uniform distribution.
  • if you model a plant that has well defined geometric parameters, use the gaussian distribution to simulate natural imperfections.

Vertical angle : This parameter represents the angle between the vertical axis of the decorated object and the vertical axis of the decorator object. 90° corresponds to a right angle between the two objects. This parameter can be varied along the height of the decorated object using the Y value button. The value of the angle can be randomised by a certain amount, entered in the +- text entry, and using a uniform or gaussian distribution as explained before.

Horizontal angle : This parameter is strictly equivalent to the R angular position, so in fact it's redundant and will probably be removed. Keep the default null value. The +- text entry, however, is important since it allows to randomise the angular positions. For example, looking at figure coil.1.a, it's obvious that these angular positions do not fit for modeling a tree. In fact, angular positions should be randomised by a uniform distribution having a width of 2PI/6 = 60°, so a value of +-30° is sensible. Using lower values for the distribution width can avoid having angular positions being too close to each other, so a value of 20°, for example, might be preferred.

R shift
: By default, the coil module places the decorator objects right along the Y axis of the decorated object. If the decorator object is small, it might not even show through the decorated object ! The R shift parameter allows to shift radially the decorator, so that its base lies at the surface of the decorated object. For a TaPD decorated object, this value should be about half the R size of the decorator (difference between a radius (R shift) and a diameter (object module R size)). The customised function accessed through the Y value button should reproduce the shape of the decorated object. The R Shift algorithm takes care of radial resizings of children that might have occured in previous coil modules. This parameter is typically useful for decorating an object with needles. Warning : If the R shift parameter is used for objects having a small radius (say 0.05), the preview windows might show a gap between decorated object / decorator objects. This is not a bug in the TaPD : it's just the precision of the preview window that is too low. There is nothing to worry about, but the necessary precision for rendering must be specified if theis phenomenon happens also in rendered images.


Relative size dispersion : The size variation along the Y axis of the decorated object is taken from the value inputs. However, it can assumed that the sizes of the decorator objects have to vary randomly as well. The relative size dispersion parameter states by which amount the randomisation affects the sizes of the decorators. A value of 0.1 (10%) means that the size will vary between 90% and 110% of the original object to which the size input values have been applied.

Size children : This option is quite important. Let's consider a coil module, the function of which is to decorate branches (placed by a former coil module around a trunk) with other branches. We will suppose that these branches have been scaled by the first module along the Y axis of the trunk. The second coil module must take into account the size of each branch it is decorating and use big or small branches depending on the size of the branch it is decorating. In such cases, the Size children option must be activated. The size of the decorators placed on the decorated object are then scaled depending on the scaling which has been precedently applied to the decorated object. There are other cases where you wouldn't want to activate this option. For examples, leaves always have more or less the same size whether they grew on a big branch or a small branch. The Size children option must then be deactivated. The two sliders at the right of the Size children checkbox indicate by which amount the children should resized (R size and Y size). None means that no resizing occurs (exactly like if the Size children option was deactivated), Full means that the children are fully resized according to the size of their parents. You usually would use the Full setting for trees.

Decoration density variation with size : Still considering the example used for discussing the Size children option, sizing decorators causes another problem. Presumably, small branches bear few branches than do big branches at the bottom of the trunk. Since the coil module parameters are expressed in reduced coordinates, the number of branches that decorate the branches around the trunk is constant, whatever the size of the decorated branch. This means that the density (number of decorators per unit length) increases as the size of the decorated branch decreases. What we want in that case is a constant density, with a number of decorator branches decreasing as the size of the decorated branch decreases. The slider allows to use a combination of these two extreme cases. The constant density is the most widely used setting, but there are certain plants that need the constant number setting.


Important Note : The Relative size dispersion and Size children must not be used on live duplicates (Deliver duplicates option in object modules), since live duplicates cannot be sized. This also means that a customised function plugged into at least on the value input ports cannot be used on live duplicates. If this rule is not followed, the duplicate generally end up having a close to null size due to successive resizings. Weird things can happen like previews showing nothing. Checking for any resizing parameter and correcting as needed puts the procedure back in order.

Golden ratio special case : If you use the golden ratio, the R step value becomes meaningless since the process increments radial positions by the golden ratio. The R origin is also not used in that case, and both text entries are disabled. The Y step now becomes the step between two objects, rather than the step between each turn. To calculate a relevant Y step value, the rule of thumb is to divide the former value by the number of objects you want along a full turn. For example, let us suppose you start from a Y step of 0.1. If you wish to have 20 objects per turn, you would enter a Y step value of 0.005. The use of the golden ratio rule implies that an object is placed at every geometric position, so the probability of having an object at a given position is always 1. All other parameters work as usual. The following figure illustrates a result obtained using thick tubes as decorator, but it gives an idea of what could be possible using flowers instead.

coil_golden.jpg

Object obtained using the golden ratio option of the coil module



The second pane concerns object distortion during the decoration process. These distortions can only occur if :
  • The decorator object is a TaPD object (tube or spline mesh)
  • The decorator object is a planar spline mesh (leaf distortion)
  • The decorated object is a TaPD object (branching effects)
The figure below shows the second pane.

coil_edit2.jpg

Second pane of the coil module edit window

The first series of parameters address branch or leaf curving and bending. The case of leaves is a bit special, so we'll ignore that one for now. As you have seen from figure Coil.1, branches used to decorate a trunk remain straight, which is most unlikely to happen in the case of real trees. The Y curvature angle is the angle towards which the branch tends, or to be more precise the angle by which the branch will deviate from its original orientation. If the vertical angle is 90° (as in figure Coil.1), using a Y curvature angle of 40° yields figure Coil.2.a, where the branches make a final vertical angle of 90°-40° = 50°. The default setting is such that branches follow a circle towards final orientation. This corresponds to a curvature rate of 1. For some trees, however, branches are curved at the bottom and then keep straight. A curvature rate greater than one simulate this effect. A faster curvature is imposed at the bottom of the branch, stopping when the specified orientation is reached. Afterwards, the branch follows a straight line. Figure coil.2.b illustrates this process using a Curvature rate of 2. Using rates lower than 1, the opposite effect can be obtained : branches remain straight near the trunk and then curve near the end to reach the specified angular orientation. If you use low rates, it is likely that the specified orientation is never reached simply because the process slowed down too much. In that case, you can enter bigger values for the curvature angle in order to reach the wished orientation.

As usual now, the +- parameter allows to randomise the curvature angle, and the Y value button allows to vary the Y curvature parameter along the Y axis of the decorated object. The random distribution width is also sized using this function.


coil_curv1.jpg

figure coil.2.a
Y curvature 40°, default curvature rate (1.0)

coil_curv_rate2.jpg

figure coil.2.b
Y curvature 40°, curvature rate 2.0
coil_curv_rate05.jpg

figure coil.2.c
Y curvature 40°, curvature rate 0.5

The Curve back to parameter complicates the rules of the game evene more : it makes it possible to get S shaped branches. When this parameter is non null, the Y curvature is applied to the first half of the branch, twice the usual rate so that the orientation is reached at the middle. At this point, the Curve back parameter is taken into account, bending the branch the other way if this parameter is the opposite sign of the Y curvature. This design is illustrated in figure coil.3. However, you can use a
Curve back parameter which has the same sign as the Y curvature to design a special uniform shape of a branch, if you wish to do so.

coil_curv_back.jpg

figure coil.3
Y
curvature 40°, Curve back to -40°
 
The parameters of the R Curvature work exactly the same way, except that the rotation axis is parallel to the Y axis of the decorated object rather than perpendicular to it (see figure Coil.4). This set of parameters are generally not of great use to model trees. In plane motion of the branches is usually governed by branching effects and random distorsion, see below. The Y value button scales all parameters of this section (curvature angle, back curvature and random distribution), except curvature rate.

coil_Rcurv.jpg

figure coil.4
R
curvature 40°, seen from the top

Branching effects : When a big branch departs from a trunk or a branch, it often happens that the bearer deviates from its orientation, presumably due to a counter reaction mechanical effect. The bearer usually recover the previous orientation after a while. The angular tilt specifies by which angular amount "plugging" a decorator object should deviate the decorated object. The recover rate specifies at which rate the decorated object should recover from the branching. It is usually a high rate, from 2 to 4 or 5. Presumably, branching effects decreases as the decorator objects get smaller towards the top of the decorated object. For this reason, the Y value customised function default value starts at 1 at the bottom of the decorated object to end at 0. The figure coil.5 illustrates a branching effect obtained by plugging a single branch into a trunk. It also show that these parameters can be used to simulate trunk fork, which is not possible otherwise in the TaPD at the moment.
Branching effects only work if the decorated object is a TaPD object.


branching.jpg

figure coil.5
Using branching effects to simulate a trunk fork

Random distortion : This parameter works a bit like branching effects. What happens is that the shape of some branches are like a lot of branching effects did occur, though no branches are "plugged" at the point where the branch is distorted. Maybe these branches fell, were cut or whatever. The random distortion process starts to choose a random orientation and distorts the branch accordingly. It then curve back the branch to its original orientation, like the Curve back parameter would do. The length of the branch affected is equal to the total length divided by the number of random tilts to apply. The process is repeated to the following segments using a new random orientation each time. The Random tilt max angle is the maximum angular amplitude that a random distortion can reach, and the number of random tilts specifies how many segments of the branch should be affected. The result is shown in figure Coil.4. You can use this parameters for aquatic plants or evil-looking, gnarled trees.

coil_randtilt.jpg

figure coil.6
Random distorsion using a max angle of 20° and 3 tilts

Cross-section effects : This section is devoted to axial distortion of decorator objects. They can be applied only if the object is a TAPD spline mesh object (the cross-sections of tubes are circular by nature and cannot be distorted). The first parameter, Cross-section jitter, is the amount by which cross-section curves control points are randomised along the radius. A value of 0.1, for example, means that control-points will be placed anywhere between 90% and 110% of their original radial length (taken from the center of the local coordinate system of the curve to the control point). The result will depend on how close in Y the cross-sections are (too close cross-sections probably cancels out cross-section jitter) and the UV smoothness of the spline mesh.
The twist parameters are used to rotate cross-sections using the axis perpendicular to the cross-section planes (Y axis). The first parameter specifies the overall number of turns to impose to the object, and the second one is the amount by which it should be randomised. Both parameters are float numbers and need not be integers. Twisting cross-sections and using random distorsion described just above on a spline mesh object with almost flat cross-sections, the following "aquatic plant like" object was obtained :

aquatic.jpg

figure coil.7
Using cross-section twist


Leaves special section :

The coil module can also distort planar AoI spline meshes to obtain leaf distortion effects. The mesh must be created in AoI facing the left direction (figure Coil.8.a) for plants (leaves put on an a vertical stem) or the front direction for trees (leaves put on horizontal branches or stems that departs from the main stem for a plant ). After edition and shaping, an example of leaf shape is shown on figure Coil.8.b. It is also possible to generate a volumic triangular mesh out of this spline mesh using parameters in the AoI object module edit window.

coil_aoimesh.jpg

figure coil.8.a

coil_leafmesh.jpg

figure coil.8.b


If this object is imported into the TaPD and the corresponding AoI object is plugged into a coil module, the parameters belonging to the second parameter pane, distortion parameters, are used to distort the leaf :

coil_Yleaf.jpg
The Y curvature parameter works as usual and bend the V axis of the leaf. The example shown left results from a Y curvature of 40 and a back angle of -40.
coil_Rleaf.jpg
The R curvature parameter bends the U splines of the leaf. The example shown left results from a R curvature of 40 and a back angle of -40 using normalised curvature. If a random distribution is used, its component is calculated at each V coordinate rather than once for the whole leaf.
coil_twistleaf.jpg
The Random twist parameter twists the leaf plane through rotations of the plane around the V direction. The result for a maximum angle of 20° and a number of twists of 3 is shown left.

Leaf distortion has also a special section at the bottom of the pane to specify special parameters that can't be expressed through use of the parameters previously discussed.

The Leaf curvature angle represents the in-plane distortion of the V or Y axis of the leaf. It works exactly like other curvature angles discussed previously. The Y value function scales of the curvature parameters. The figure below illustrates the leaf shpae obtained with a leaf curvature of 30° and a back curvature of -30° :

coil_leaf_curvature.jpg

Leaf distortion obtained with a leaf curvature of 30° and a back curvature of -30°

The Angle at center parameter specifies the angle that makes a leaf about its V or Y axis. This gives the leaf a V shape as illustrates the figures below :

coil_leaf_depart.jpg

Leaf distortion obtained with an angle at center of 40°

The R curvature factor modifies the way the R curvature is applied to the leaf. Basically, there are  two possibilities :
  • The leaf shape is constant across its length and varies along different widths, like if it is was rolled around a tube. The small sections at the beginning and the end of the leaf show small curvature, if not flat. This scheme is called constant curvature.
  • The curvature is constant across the width of the leaf and vary along the length. The small sections show the same shape as the main section of the leaf, only scaled down. This scheme is called normalised curvature, because it is normalised for each width of the leaf across its length. 
The R curvature factor slider allows to choose any value between these two extremes. The figures below show three leaves modeled using a R curvature angle of 70° in order to exaggerate effects. The figure on the left uses a constant curvature scheme. It looks much like a part of a tube surface, except for camera distortion effects. The figure on the right uses normalised curvature. With such a high curvature angle, the spline mesh closes on itself like two parts of a sea shell.

coil_leaf_ratio_70a.jpg    coil_leaf_ratio_70b.jpg            coil_leaf_ratio_70c.jpg

Three R curvature values : constant curvature (left), normalised curvature (right) or halway between the two (middle).

3.2.2 Golden ball module golden.jpg golden_button.jpg

The golden ball module paces object along the radii of a sphere following the golden ratio rule. Its input and output ports are exactly the same as those of the coil module. The figure below whows the golden ball edit window :

golden_edit.jpg

Golden ball module edit window

The Sphere and Hemisphere radio buttons specify if the decoration geometry concerns a whole sphere or only half of it.

The from and to parameters specifies which part of the sphere (or the hemisphere) should be considered. The process starts from the top of the sphere at a coordinate of 0 ad ends at the bottom for a coordinate of 1 for a sphere. The same considerations apply to an hemisphere, except that the bottom is the disc section of the half sphere. For example, using from and to values of 0.25 and 0.75 for a sphere means that the decoration process will happen in the middle of it. A full hemispherical decoration is equivalent to using a spherical decoration ranging from 0 to 0.5.

The Relative size dispersion works exactly like in the coil module.

The Density parameter represents how dense the packing of decorators is. The golden ball module first calculate a density based on the R section of the decorators, taking also into account any decoration process they might have gone through. If this density is too small or too big (usually it is to small for a close packing), you can increase/decrease it using the density parameter.

The
Density function button allows to edit the customised function that specifies how density should vary from the from parameter to the to parameter. It is thus possible to have a close packing at the start of the decoration process and a loose packing at the end. The overall density used is the density parameter multiplied by the value of the customised function at a given point between from (origin of the customised function) and to (abscissae of one). Due to mathematical considerations, it is not possible to ensure that an overall density that starts at 1 and ends at 2 gives the same result at the start than a decoration with a constant density of 1 and at the end than a decoration with a constant density of 2. Thus, It is likely that the density parameter must be tuned to reach the wished result when using the density function. The density function could be used to densify packing when decorators get smaller due to the use of a size customised function, for example.

Use Y input checkbox : As for the coil module, this option makes it possible to use a value input in the Y input port. The density is then constant (except when a random value is input in the Y input port) and equal to the product of the density parameter times customised function value calculated at the input value coordinate. 

The # of decorators to estimate specifies how many decorators should be evaluated to estimate the packing density. You can decrease this number if decorators have more or less all the same size or increase it if the size varies a lot from one decorator to the other.

Downward shift : by default, the generated object is placed at the top of the decorated object. The downward shift allows to place it anywhere along the height of the decorated object from the top (downward shift = 0) to the bottom (downward shift = 1).

The Size children settings
works exactly like in the coil module.

The second pane allows for distortion of the decorators object following the principles explained in the coil module section.

Important note : if the decorators show a very small section (very thin tubes, for example), the density calculated by the golden ball module might generate by default a huge number of objects, presumably causing long computation time, if not an Out of Memory error. If you use decorators with a tiny section, start with a low density parameter, and increase as needed.

The following figure
shows a result obtained using thick tubes as decorator :

golden_tube1.jpg

A simple packing of tubes
golden_tube2.jpg

  Hemispherical packing of tube using a customised
size function plugged into the size inputs of the module


The dandelion flower shown below has been modeled using the golden ball module. It is available in the example files. The dandelion flower example and the principles of using the golden ratio to create a spherical object is described in references [2] and [3].

dandaelion.jpg

A dandelion flower modeled using the golden ball module

3.2.3 Top module top.jpg top_button.jpg

The top module makes it possible to place the decorator object on top of the decorated object. It is a simple geometry module. The edit window is shown below :

top_edit.jpg

Top module edit window

The top decoration probability is the probability that a decorator object gets placed on top of the decorated object. The downward shift is the downwards translation applied the decorator in reduced height of the decorated object. A value of 0.05, for example, means that the decorator will be placed at 95% of the height of the decorated object. Using this parameter it is possible to have a small overlap between the decorated object and the decorator. Radio buttons allow to choose between Downwards, which the design which has just been discussed, and Center. If the Center radio button, the decorator and decorated object centers are superimposed. For example, this allows to place a light whithin a sphere. The Downward shift is ignored if the Center option is used.

The Random Y rotation allows to rotate randomly the decorator object around the Y axis by a maximum +- the value entered (in degrees). Using this parameter, it is possible to avoid that flowers put on top of stems have all the same orientation with respect to the Y axis.

The Size children function works as for the coil module, see above.

 

3.2.4 Distort module distort.jpg distort_button.jpg

Using the coil module, it is possible to distort the decorator objects given a set of parameters. However, it is not possible to distort the decorated object, except considering branching effects. The distort module makes it possible to distort the decorated object as well. The edit window is not shown here, it is a replica of the second pane of the coil module edit window minus the branching effects parameters. The main use of the Distort module is to distort a starting object (say a trunk) before plugging it into a decoration module. It can also be used to distort an object before plugging it as decorator in a top module.
You should not plug the
Distort module output into the decorator input of a coil module. The distortion parameters of the coil module will cancel any previous distortion carried out by the distort module.

3.2.5 Random module random.jpg random_button.jpg

If an object port output has multiple links, all the decoration processes resulting from these links will be merged. Sometimes, however, it is wished that one of these links should be chosen at random rather than to have all the links results merged into a single decoration (these considerations are discussed at length in the next chapter). The figure below illustrates a typical use of the Random module :

random_ex.jpg

Random module example


Whithout the random module inserted between the first coil module and the other coil modules named #1 to  #3, the three decorations carried out by the three coil modules would be merged for each decorator of the first coil module. Using the random module, however, one of the #1, #2, #3 coil module is chosen for decorating each decorator of the first coil module.

It is also possible to specify the probability of following a specified output link. Let's consider the following example, taken from the lamp example file :

random_ex2.jpg

Random module used in the lamp example

The default parameters of the random module are such that the probabilities of decoration with a red, blue or green light are all equal. Clicking the edit button brings this edit window :

random_edit.jpg

Random module edit window

The tabbed pane consist in two tables, the input probabilities table and the probabilities table. We will focus on the latter and suppose we want twice as much blue lights than any other colour. Entering the probabilities shown on the screenshot leads to such a situation. The probabilities need not be integers or floats normalized to one, you can use any scheme you wish (i.e. 0.25, 0.5, 0.25 or 1, 2, 1).

The other pane is devoted to input probabilities. This situation occur if, for example, you plug three object modules into the input of a random module and the output of the random module to the decorator input port of a coil module. If you do not use the random module, the default scheme is to choose as decorator one of the three objects at random. If you use the random module, however, you will be able to specify different probabilities for each one of the three objects.

The random process works either for the input port of the random module or for its output port, depending on whether it is placed upstream (random input) or downstream (random output). For upstream and downstream definitions, see chapter 4.

Due to its function, the random module does not have a preview button.

3.3 Value modules

3.3.1 Constant value module cvalue.jpg cvalue_button.jpg

The constant value module holds a float value, exactly like the procedural editor value module. Its use is straightforward. One interest of the constant value module is to plug it into one of the size entries of an object module so that the size of the object can be quickly modified whithout having to edit the object itself each time a size fine tuning is required.

3.3.2 Customised function module customfunction.jpg customfunction_button.jpg

The customised function module works exactly like the procedural editor customised function (see AoI manual). Its main use is to be plugged into the coil module size entries to vary the size of the decorator objects along the Y axis of the decorated object. The editing window shows two additional buttons, Copy function and Paste function that can be used to copy and paste function control points and options between two editing windows. These buttons can be used to replicate function definitions in geometry modules like the coil module that makes heavy use of customised functions.

3.3.3 Binary operation module binary.jpg binary_button.jpg

This module takes two input values, named a and b, and computes a result r = f(a,b). The available operations not only include +, -, *, /, but also <, >, Min, and Max. The type of operation performed is selected in a combo box in the edit window, shown below. An illegal operation like dividing by zero yields a zero value on output and an error message in the console.

binary_op_edit.jpg

Binary operation edit window

3.3.4 Unary function module unary.jpg unary_button.jpg

This module takes one input value, named a, and computes a result r = f(a). The available operations include abs, exp, log, square root, sine and cosine. the sine and cosine are normailzed to PI/2, ie. f(a) = sin(a*PI/2). The considered function is selected in a combo box in the edit window, shown below. An illegal operation like log(<=0) or sqrt(<0) yields a zero value on output and an error message in the console.

unary_op_edit.jpg

Unary function edit window

3.3.5 Scale/shift module scaleshift.jpg scaleshift_button.jpg

This module, identical to the one found in the procedural texture editor, takes one input value and applies the following linear transformation r = scale*a +shift. These two parameters are entered in the edit window shown below.

scale_shift_edit.jpg

Scale-shift module edit window

3.3.6 Clip module clip.jpg clip_button.jpg

The clip module is also identical to the one found in the procedural texture editor. It takes one input value and applies the following rules
 a < min  ->  r = min
min <= a <= max  ->  r = a
max <= a  -> r = max

The min and max parameters are entered in the edit window shown below.

clip_edit.jpg

Clip module edit window

3.3.7 Random value module randval.jpg randval_button.jpg

The random value module delivers a random number following a random distribution specified by the user. These parameters are the mean value of the distribution and its spread. As for the coil module, two kinds of distribution can be used : a uniform distribution and a gaussian distribution. The edit window is shown below :

clip_edit.jpg

Random value edit window


If the distribution is defined as uniform, the random number will fall in the interval mean+-spread. If the distribution is defined as gaussian, then the spread value represents the standard deviation of the gaussian distribution.

3.4 References

You can find below some references to articles that describe some geometric concepts used to model trees and plants :

[1] Jason Weber and Joseph Penn, Creation and rendering of realistic trees, Proceedings of the 22nd annual conference on Computer graphics and interactive techniques (SIGGRAPH), pages 119-128, 1995.

[2]
Deussen O. and Linterman B., A Modelling Method and User Interface for Creating Plants, Computer Graphics Forum Volume 17, Issue 1 (March 1998)

[3] Deussen O. and Linterman B., Interactive Modeling of Plants, IEEE Computer Graphics and Applications, Jan/Feb 1999.



Previous : Menus
Index
Next : Module usage and linking