LeavesGenerator 2.5
user's manual

1. Installation

Copy the plugin and its key file wherever you need (for instance into LightWave plugins directory).
Start Modeler. Use Modeler->Plugins->Add Plugins or Edit Plugins (Alt+F11) and select leaves.p file. You will be told that 1plug-in have been successfully added. You will find this plugin in Construct->Additional menu.
If you had previous version of LeavesGenerator remove it first.

Keep your key file in a save place. Updates will not work without it. Free future updates will be available in download section at www.polas.net

2. Usage

LeavesGenerator allow you to create various types of leaves on a surface of any object especially on TreesDesigner objects.
- draw any shape in modeler to give the leaves some place to grow. For best results use quad and triangle polygons only.
- run the plugin from additional menu.
- open Modelers numeric panel to gain access to LeavesGenerator controls ('n' from keyboard).
- play with settings and observe leaves coverage and shape in real time in modeler's viewports and in preview area of LeavesGenerator interface.
- when you are satisfied with leaves hit 'Make Leaves' to get the complete geometry.

3. Interface

All LeavesGenerator controls can be found in modelers 'numeric' panel. You need to open it (hit 'n') and resize to see all controls.
At the top of the user interface there is a common section and beneath it the user interface whichis divided into two sections: Basic and Advanced.

Note. Some controls are only available on TreesDesigner objects.

Common:

Presets - this button will open/close modeler presets shelf window. You can store leaves settings there. Note that only settings will be stored (no custom leaf shape etc).
Add preset - store leaves settings for later usage. Thumbnail will help you to easy find it.

Make Leaves - this button creates leaves geometry. If you are creating many leaves it may take a while. This is why it isn't done in real time. In most cases there will be more leaves generated than you see in a preview (you can specify how many leaves you want to see in real time preview).


Preview panel - this preview area shows graphic representations of main settings. The first one from the left side (leaf) shows selected leaf shape including a custom leaf shape. The next one (ang) shows pitch and bank angles limits for your convenience. The last one shows size of UV2 map (look below for more info).

Preview leaves - this setting affect modeler's viewports. You can set here how many leaves you will see in real time preview.

Basic:

Leaf shape - select here one of predefined leaf shapes. You can choose one of:
one poly - the simpliest leaf shape. Each leaf is made from only one quad polygon.
two polys - the leaf is constructed from two polys and six points. This type of leaf will not look flat from small angle.
rhombus - modification of two polys type. two polys and only 4 points per leaf.
three polys - the leaf is constructed from 3 polys and 4 points.

You can make your own leaf type. To use it place it in background layer(s) before running LeavesGenerator. Leaf shape option will be disabled in this case.
Your leaf shoud be placed in XZ plane with leaf stalks end at 0,0.

Leaf shape is shown in preview panel window.

Number of leaves - how many leaves plugin should create.

Length,
Width - size of a leaf. Those options are disabled when there is a leaf template in background layer.

Size variations - limits of random changes of size.

Density map - any weightmap can be used as a density map. On places where weight map value is +100% there will pe plenty of leaves and where its value is -100% there will be hardly any. You should increase 'iterations' if leaves grow on parts you don't want.

Leaf coverage - only available for objects made with TreesDesigner. You can set here the area of a branch that should be covered with leaves. For small values 20-10% increase 'iterations' to get proper results.

Min pitch angle
Max pitch angle - leaf pitch angle limits. Each leaf get random value of pitch angle within the limits. If you check 'angle depends on height' pitch angle values will be sorted and the top leaves will get min pitch angle, the bottom - max pitch angle value.

Random bank rotation - limits of leaf bank rotation.

min/max pitch angle and bank angle are shown in preview panel window.

Random seed - when not set to 0 the user is able to repeat random behavior, it means that it is fixed random. When set to 0 plugin will generate itself this value and you will get similar foliage but with different leaves arrangement.

Advanced:

Get TreesDesigner info - you can choose here if you want to use additional saved TreesDesigner information.
Use TD vectors - if TreesDesigner info is found you can use the stored vectors of branches to dictate leaf directions. In some cases you may want to disable usage of the vectors and force LG to compute the new ones.

Size depends on polygon area - you can select it if you want to generate bigger leaves on bigger polygons.
Dependence power - percentage influence of previous setting.
Angle depends on height - if you check it leaves pitch angles will be computed on the basis of Y coordinate. Leaves on the top of your shape will get 'min pitch angle' value, at the bottom - 'max pitch angle' value.

UV2 array size - UV2 map is the UV that contains all leaves placed side by side. Particular leaf will get different piece of your texture. Whats it usefull for? For instance you can easy make leaves with different colors, diffuse etc. The larger uv2 map is the more leaves you get.
Sort UV2 - UV2 map can be sorted only when there is TreesDesigner info found. If you check it size of the UV2 will be adjusted authomatically depending on 'leaves coverage' and TreesDesigner settings. On the sorted UV2 map leaves from the tips of branches will be placed on the one side of UV map and other on the second. It allow you to make leaves on the tips with different color (in general on the tips there are younger leaves that has slightly different color).

Distribution power - values 0.8 to 1 forces similar distances between leaves - it may be called: even distribution. Values < 0.8 allow to vary those distances.

Iterations - Number of tries in getting proper position of item. Value 1 is equal to use very small 'distribution power'.

4. Miscellaneous

Modelling - object on which you creating leaves should have no non-planar polygons. For the best results use quads and triangles only. Nurbs patches are not supported.

Custom leaf shape - you can create your own leaf shape. To use it put it in a background layer before starting the plugin. Leaf shape setting will then be disabled. Also Length/Width settings will be disabled. Remeber that leaf shape will be computed from the origin of the axes, so you will get strange results if you put your shape somewhere in 3D space far from the origin of the axes. Your shape should be created in the XZ plane. All information including weightmaps, morphmaps, uvmaps, subpatch weights etc. will be copied from your leaf template.

Selection - if you make a selection on an object before starting the LeavesGenerator plugin leaves will be created only on selected polygons.

5. Contact

If you have any questions, comments, suggestions, problems, etc. feel free to contact me:

e-mail: olo@polas.net
ICQ: 81081247
IRC (ircnet): channel #idreams