User Tools

Site Tools


Memory

Because trees and general vegetation are often polygon-intensive, careful memory management can be important. Mostly, this means being aware of which configurations use more memory than others.

When a SpeedTree object is created, SpeedTree generates the geometry for Clarisse (i.e. positions, uv coords, normals, etc). When that object is copied, pasted, and translated next to the original, the copy is an instance which merely references the original's geometry. So far so good, but there are several attributes that can be changed in the instance that will force it to become a copy behind the scenes (even if they're from the same STE/SPM file), doubling the memory needed to represent the two objects. These attributes are:

  • Seed: A different seed creates a different tree altogether.
  • Resolution: The higher the resolution, the more memory it will require. A different resolution requires a new copy.
  • Season & Show Dropped Leaves: Depending on how seasons were tuned for a given model in Cinema, a slight change to the season attribute will mean a copy is needed.
  • Growth: Different states of growth create different meshes.
  • Wind Configurations: There are numerous wind configurations that can create copies, detailed further below.

There are two tools available to help users determine how much memory is being used.

  • Clarisse's Resource View Tool: This will reveal exactly how many copies of the geometry the SpeedTree plugin has created (together with the rest of the resources in the scene).
  • Report Internal Stats Button: This button is available on any SpeedTree object but will report statistics on all SpeedTree objects in the scene. The reports are explained further just below.

Internal Statistics

This report details the STE files that are currently in RAM, the ones needed to generate the geometry passed into Clarisse. One STE file can be used to generate an entire forest of trees, but once copies between to use different parameters as stated above (e.g. different season or seed attributes), other STE files will be loaded into RAM. This report is useful for keeping large scenes manageable.

Below is a screenshot of a simple example Clarisse/SpeedTree scene. It is composed of:

  • Two copies of Sapling_Growth.ste, each at a different stage of growth and translated apart.
  • Four copies of Palmetto_1.ste, three with the default seed value and one with a custom seed.

The SpeedTree internal statistics report for this particular scene:

                      SpeedTree Internal Report
======================================================================
   1. (1 ref) [C:/trees/growth_sapling/Sapling_Growth.ste]
       # textures:         121          materials:      34
       # polygons:      28,638         resolution:     Low
       # vertices:      31,165             season:    0.00 (dropped: off)
        # indices:      85,914     growth defined:     yes
  # growth frames:         500       growth frame:     175
             seed:           0

   2. (1 ref) [C:/trees/growth_sapling/Sapling_Growth.ste]
       # textures:         121          materials:      34
       # polygons:     166,847         resolution:     Low
       # vertices:     194,938             season:    0.00 (dropped: off)
        # indices:     500,541     growth defined:     yes
  # growth frames:         500       growth frame:     375
             seed:           0

   3. (1 ref) [C:/trees/palmetto/Palmetto_1.ste]
       # textures:         101          materials:      30
       # polygons:     691,401         resolution:     Low
       # vertices:     565,856             season:    0.00 (dropped: off)
        # indices:   2,074,203     growth defined:      no
             seed:           0

   4. (1 ref) [C:/trees/palmetto/Palmetto_1.ste]
       # textures:         101          materials:      30
       # polygons:   1,132,421         resolution:     Low
       # vertices:     923,958             season:    0.00 (dropped: off)
        # indices:   3,397,263     growth defined:      no
             seed:          56

SpeedTree: there are [ 4 ] models and variants loaded, [ 4 ] total refs, and [ 2,019,307 ] unique polys.
Right-click this message/log for details.

The last line is what will appear in the Clarisse status bar. Right-clicking it will show the full log which will also reveal the full SpeedTree report.

In relation to the example scene, two separate Sapling_Growth.ste files are loaded since they are at different growth stages. And while there are four Palmetto trees in the scene, only two STEs are loaded. Three of them share the same main attributes (they only differ in translation and scale) and since the fourth has a different seed, a separate STE file is used.

Wind Configurations

Wind has a deep impact on the SpeedTree plugin instance/copy dynamic which essentially boils down this: if a wind object causes one tree to become a different shape than another, a separate copy will be created.

About the only case where wind won't cause copies to be made is when directional wind is applied to models that share the same orientation. Nearly every other case will force copies for each tree object, including:

  • Directional wind where one tree is rotated differently from another. If they share the same rotation, however, they will be instanced.
  • Any time spherical wind is applied because each tree object gets a unique wind direction (and potentially a unique strength, depending on the decay value). Use spherical wind sources carefully.