User Tools

Site Tools


Collections

This section describes how to dynamically capture part of the tree geometry for use as obstacles, growth surfaces, or anything else that calls for a mesh asset.

Overview

What is a collection?

Collections allow tree geometry to be collected in a 'mesh asset' during tree model compute. This gathered geometry can then be used by generators and forces just as any other mesh asset would be.

How to use collections

Use collections like you would any other mesh asset – drag and drop them on the desired object or select them via any object that can use a mesh's properties. Usually, collections are used as 'zones' or 'mesh forces'.


Order matters

Generators which contribute to collections should precede generators which use them during tree model computation. This means contributing generators should be on lower levels and to the left of using generators when the 'Generation Editor' is oriented vertically.

Creating a Collection

Collections are created via the 'Mesh Asset' bar. Use the “+/-” button to add a blank mesh asset and check the box marked “Collection”.

Collection properties (Mesh Asset bar)

The two properties in this group allow you to control how the collection is created. The “Spines” property controls what geometry types can be contributed from Spine nodes. The “Pivot” property determines how the pivot point for the collection is determined. “Origin” uses the world coordinate (0.0, 0.0, 0.0) and is appropriate for capturing tree geometry for growth or collision purposes. “First” uses the pivot point of the first object that contributes to the mesh as the pivot point for the collection. This option is useful when creating collections that may later be used as leaf or frond meshes.

“Create Collection From Selection” Tool

Use this tool under the menu item “ToolsCreate collection from selection” to automatically create a collection from the current selection. The process creates the mesh asset and assigns the correct checkbox to all contributors.


Contributing to Collections

To make a generator contribute to a collection look for the Collections group with the “Generation” properties (depicted to the right). There will be a check box for each collection asset. Check each collection that the selected generator should contribute to. Repeat this for each generator whose geometry should be in the collection.

'Mesh forces' can also contribute their geometry to collections if they are mesh forces. The Collections group in the “Mesh” properties of the force object works in the manner described above.

The “Collections” group will only be present if at least one collection has already been added to the scene.



Examples

Example 1: Ivy growing on a zone

A good example where collections are useful is growing ivy off of the roots and trunk of a tree (see image to the right). The brute force way to do this is to use two nearly identical leaf generators. One linked to the roots generator and another to the trunk generator. The problem with this approach is that it is hard to get an even distribution or to use masks to uniformly control the areas where the ivy can grow. A better approach is to create a collection that captures the root and trunk geometry as it computes and then use that collection in conjunction with a zone generator to grow the ivy leaves. This approach provides the best way to get even, controllable growth off of the trunk and roots, even when the trunk and roots change shape.

Example 2: Self-colliding branches

Collections can be used to prevent branches from colliding with each other as they grow. For example, collect the roots of a tree into a collection and create a mesh force that uses that collection. Set the 'Force Action', 'Collide Action', and 'Keep Action' properties as desired and then apply that force to the root generator (the same generator that contributed to the collection). Now, as each new root computes, it will collide with the roots computed before it.

Example 3: Vines growing over a trunk

Another good use of collections is when vines are growing over trunk geometry. In order to be able to change things about the trunk after the vines have been added, a collection of the trunk must be created first. Then, the vines can collide with a mesh force that has been assigned the collection, which is self-updating (see below).

Example 3: Vines growing over a trunk