User Tools

Site Tools

Geometry Query Options

When SteGetGeometry() is called, it takes an SSteGeometryOptions pointer to a structure that will control what will be exported as well as how. There are numerous parameters, most of which are detailed below.

It's a good practice to use SteInitGeometryOptions() to initialize SSteGeometryOptions objects since there are no constructors in C. Its first parameter is an SSteEngine pointer. If NULL, it will use arbitrary default values. If a valid pointer is used, it will use value stored in the model file for some parameters. See the chart below.

Member Variable Default Purpose
m_eResolution Value saved in STE/SPM or HIGH Every SpeedTree model in version 8 or higher has four built-in resolutions: draft, low, medium, and high. The artist is in full control of the polygon counts for each.
m_eGroupType STE_GROUP_BY_GEOMETRY_TYPE Determines how the geometry will be organized: i) grouped by like geometry type, ii) grouped by like material, or iii) hierarchy. Grouping by geometry and material results in a flat hierarchy (all data is contained in nodes directly underneath the root noode).
m_nHierarchy 0 When m_eGroupType is set to STE_GROUP_BY_HIERARCHY, m_nHierarchy sets the level in the tree under which the tree will be split apart. For example, a level of 0 means the entire mesh in one group. A level of 1 means the trunks of the tree will each be in different groups with their children (in most cases of simple trees, this will be identical to level 0 since there is only one trunk). With a level of 2, the trunk will be in one group and then each major branch will be in a group with all of its children. More explanation here, including a useful illustration.
m_uiSeed 0 Different seed values generate different models; 0 means to use the model as it was defined in Cinema.
m_fWindTimeInSecs 0.0 Drives the wind animation.
m_fGrowthFrame 0.0 Drives the growth animation. The number of frames is determined by the timeline in Cinema.
m_bUseUniquePositions false Export position values separately from compound vertex data; keeps position values from repeating on seams.
Engine doesn't have to export everything at once. This is good way to streamline performance when only certain components are needed.
m_bComputeVelocities false Include velocity vectors in wind computations. Off by default because it doubles the wind computation time.
m_bTrianglesOnly false Convert all quads to triangles.
Engine is right-handed / Z-up by default. Use these flags to automatically change the output coordinates as needed. Can also scale the model, modify UV coordinates.
m_fSeason Value saved in STE/SPM or 0.0 Ranges from 0.0 to 1.0 and corresponds to the season slider in the Cinema interface.
m_bSeasonShowDroppedLeaves Value saved in STE/SPM or false Generate geometry for leaves that fall from the tree as the season changes.
m_bWindActive false When false, all expensive wind computation is bypassed.
m_fWindPrerollInSecs 10.0 Used to bypass the start-up of the wind algorithm as it reaches steady-state.
m_fWindStrength 0.5 0.0 to 1.0 scale. 0.0 is no wind, 1.0 is full wind. Corresponds to full range of wind speed indicator in the Cinema interface.
m_vWindDirection (1.0, 0.0, 0.0) Normalized wind vector.
m_bWindFast3dNoise false When enabled, wind compuation uses a faster but less smooth noise lookup technique. Speed can increase 30-50%.
m_sInstance (0.0, 0.0, 0.0) Used to offset the wind noise algorithm so that the same tree model placed in two separate positions animate with different wind.
m_pWindInternalState NULL Used to support random access of wind state, often for network rendering (advanced).
m_afWindInternalStateTransform Identity matrix Used to transform the wind direction to account for different coordinate systems.
m_bWindPointSource false Internal use.
m_vWindSourcePos (0.0, 0.0, 0.0) Internal use.
m_fWindCohesiveSync 1.0 Internal use.
m_bGrowthActive true If the loaded tree model is configured for growth, this flag will ensure that the model grows over time, driven by m_fTimeInSecs above.