This shows you the differences between two versions of the page.
leaf_collision [2017/09/13 10:25] |
leaf_collision [2021/04/27 09:19] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Leaf Collision ====== | ||
+ | |||
+ | Leaf collision is used to optimize the placement of leaf cards and meshes. | ||
+ | |||
+ | ===== Overview ===== | ||
+ | |||
+ | With most typical tree models, leaves are the bottleneck in rendering performance (particularly in real-time tree models). This is due to two main factors: high polygon counts and overdraw. The properties in the "Leaf Collision" | ||
+ | |||
+ | ^ Both techniques described below are computationally expensive and may be prohibitively so on high resolution tree models (e.g., models targeted for off-line rendering only). Disabling leaf collision on such models will greatly improve computing performance. Consider using degradation in this case to disable leaf collision temporarily while modeling. ^|| | ||
+ | |||
+ | ---- | ||
+ | |||
+ | |||
+ | ===== Spreading ===== | ||
+ | |||
+ | In order to reduce overdraw, colliding leaves can be spread out to provide better coverage. No leaves are added in this process; rather, the existing leaves are repositioned so that the shape of the leaf cloud is roughly maintained but no two leaves are as close together as they were before the spread computation. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | 1. All leaf positions are computed based on the parameters on each leaf node.\\ | ||
+ | |||
+ | 2. After the compute is over, colliding leaves are identified and pushed away from each other in an iterative process.\\ | ||
+ | |||
+ | 3. How far they are spread is controlled by the " | ||
+ | |||
+ | Spreading leaves is a relatively slow process and is triggered either by pressing the Spread out button or automatically.\\ | ||
+ | |||
+ | ^ Leaf collision can be disabled altogether either by toggling ' | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Culling ===== | ||
+ | |||
+ | In order to reduce polygon counts and overdraw, leaves can be eliminated when they get too close together. When any two leaves that are within the Cull tolerance are detected, one of them is removed. No leaves are repositioned in this process. Use culling to "thin out" the leaves on a tree. | ||
+ | |||
+ | Culling leaves is a relatively slow process and is triggered either by pressing the ' | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Spread & Culling Scalars ===== | ||
+ | |||
+ | Each leaf generator has a ' | ||
+ | |||
+ | * Values less than 1 mean that a particular leaf generator is less likely to be culled (or spread) when colliding with other leaf generators, and decreases the collision tolerance for leaves within the generator. | ||
+ | |||
+ | * A value of 0 means that under no circumstances will the leaves in that generator be culled (or spread). This is useful for " | ||
+ | |||
+ | * Values greater than 1 increase the likelihood that that particular generator will get culled when colliding with other leaf generators, and increases the collision tolerance for leaves within the generator. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Automatic Leaf Collision ===== | ||
+ | |||
+ | Spreading and/or culling can be scheduled to happen after any property edit using the ' | ||
+ | |||
+ | ^ Note: The option for the ' | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Node Edited Leaves ===== | ||
+ | |||
+ | If a leaf has been manipulated while in node selection mode, it becomes exempt from being spread or culled. The theory is that if you hand-edited a node, you intend the keep that node around! Otherwise, it would have been deleted. The spread is set to be ignored, because otherwise the leaf would move out from underneath you as you change its position or rotation (since the spread calculation probably would influence it if it collides with any other leaves). The leaf can be set to use spread again, by changing its node property for Ignore spread to false. To make it cullable again, press the 'Clear node edits' button at the top of the ' | ||
+ | (Must be in the individual leaf/node properties to have the 'Clear Node Edits' button option available at the top of the Property Editor.) In order to clear all the node edits for a specific generator, right-click the desired generator and select 'Clear Node Edits' | ||