User Tools

Site Tools


Version 6.0

Release Notes

The 6.0 release represents a fairly major jump in performance and functionality, but remains conceptually very similar to the 5.x releases. Some changes will be required to port 5.x source, but no where near the jump that 4.x-to-5.x required. A short 5.2 to 6.0 porting guide has been included in this help system. While not comprehensive, it covers the biggest SDK changes since 5.2.


General Notes

1. Support for DX11 added.

2. Support for PSVita added.

3. Support for Mac/OSX added (note that the SpeedTree Modeler has also been ported to the Mac).

4. On Windows, support for VC8/Visual Studio 2005 removed. Support for VC9/Visual Studio 2008 and VC10/Visual Studio 2010 remains.

5. Overall rendering speed has improved by ~40% due to a few major changes:

  • Shader LOD: 5.x faciliated changing shader effects for a forest, but those settings would apply to every LOD of every tree in the entire forest. With 6.0, users can control a shader LOD curve (e.g. per-pixel up close, per-vertex far away with a smooth transition in between) per tree. Hero trees can use longer shaders, undergrowth shorter.
  • Unified Geometry: To an extent, draw call counts are reduced by having the Compiler generate shaders, capable of rendering multiple geometry types (e.g. fronds & leaf meshes) stored in a single vertex buffer. Typically, a 3D tree is drawn as branch geometry in one call, and the remaining geometry in another.
  • Mesh Instancing: For those platforms that support it, the SDK will render 3D trees, grass, and billboards using mesh instancing (i.e. where many instances of a single tree model are rendered in a single draw call).
  • Billboard Cutouts: Fill requirements for billboards can be reduced at the cost of adding more vertices to create more form-fitting silhouettes.

6. The shader system has been completey redesigned:

  • Shaders are now auto-generated from templates and compiled outside of the SDK by the Compiler application.
  • Per-tree, user-configurable LOD settings can now be determined in the Compiler, allowing for much more control over more and less detail per tree model & LOD.
  • The OpenGL rendering library (Windows & Mac) now uses GLSL shaders instead of Cg. The Cg dependency has been completely removed from the OpenGL version of the SDK.
  • By using precompiled shaders (all platforms but OpenGL, where GLSL does not support precompilation) and built-in shader caching, shader load times have improved noticeably.

7. The SDK no longer distinguishes geometry types. That is, there are no longer funcions and structures that have “branch” or “frond” in their names. Each draw call has an associated render state and vertex declaration that might be unique, and that draw call may render one geometry type or four, depending on how successful the Compiler was at merging the geometry. This is largely under artist control.

8. For those projects that use only the Core library to access tree geometry, there is a new set of classes and functions that facilitate easily working through the various vertex declarations (e.g. there are no more SBranchGeometry-type structures).

9. Tree, grass, and billboard instances can now be arbitrarily oriented (as opposed to rotated around the up axis only, as was the restriction in 5.x). Each instance now requires up and right vectors to describe orientation.

10. 5.x added arbitrary 3d leaf meshes (as opposed to always forcing the use of camera-facing leaf quads). 6.0 adds arbitrary camera-facing geometry, of which camera-facing quads is a subset.

11. Vertex sizes have dropped dramatically on average and are no longer constant. LOD and optional shader effects determine the vertex declaration per draw call. Half-floats also supported on most platforms, further reducing all vertex sizes.

12.SPEEDTREE_HEAP_FRIENDLY_MODE has been removed. The SDK now uses a series of heap reserves to prevent render-time allocations. It will adjust if a limit is exceeded by growing the resource on the fly and issuing a warning to the client app about which limit was exceeded and its new value. This allows developers to tune limit values per-level/world to keep allocations to a minimum and ouside of the render loop. 13. File system interface added, such that as file assets are accessed, the client application can have a callback invoked that returns a memory block associated with the given filename.

14. Grass system completely overhauled:

  • Grass “clumps” are now restricted SpeedTree models. While restricted to a single LOD and material, the grass models are still subject to the same geometry types, lighting, and wind as the main 3d SpeedTree models. While labeled a “grass” system, it can be used for alll manner of underbrush (e.g. rocks, fallen leaves, branches).
  • Grass is populated on the flly via app-side code. A thorough example, complete with masks, is included in the reference application.

15. Wind algorithm largely redone, now allows different levels of detail as well as smooth LOD transitions. Note that it scales very high, so use all effects with caution.

16. Dynamic tree culling and population system internals have changed considerably to improve speed, but the principle is the same. See the culling/population section for details. The CVisibleInstances class now houses most of the population/culling functions. Tree instances are now streamed from the application to the SDK as the viewport moves, as opposed to 5.x where the entire population was fed into the SDK during init.

17. Added a shallow integration with Intel's GPA profiling tool. The profiling class, CScopeTrace will provide rudimentary timing data without GPA enabled, but will not have the same accuracy or resolution.

18. Branch seam blending mode available during shader compilation.

19. Graphics caps class added, relevant mostly for the Windows and Mac libraries.

20. SPEEDTREE_WORLD_TRANSLATE mode from 5.x is now always on in 6.0.

21. Shader uniform constants are addressed very differently, no longer requiring that they are queried by name from the source. Each constant is defined in ShaderConstants.h in the RenderInterface library, which contains platform-specific definitions which hold constant locations, sizes, and update frequencies.

22. A new instancing manager class handles all of the instanced rendering of trees, billboards, and grass models. Platforms that do not support instancing still use this class and provide an non-instanced implementation in the policy class.

23. Bone data from the Modeler application can be optional written into the SRT files. Vertex data will have bone IDs when this option is used.

24. The SDK namespace now contains a version number. Previous version used simple “namespace SpeedTree”, but 6.0 will be “namepace SpeedTree60”.


Reference Application Changes

1. All of the reference application's source files are prefixed as “My*.cpp/h” to indicate that there are merely example implementations of application-side functionality and are not part of the SpeedTree SDK.

2. A new reference application launching application houses a source editor for a new mini-language called SFC (SpeedTree Forest Config), used to define entire forests that are fed into the application. Changing parameters in the example SFCs that come in our installer is a good way to learn about the flexibility of the SDK.

3. Unlike 5.x, the example shadow system is housed in the reference application source code and are not part of the SDK (although the generated shaders will contain some example shadow code).

4. The sky and terrain systems:

  • Are included largely to round out the reference application's world and to demonstration interactions between tree placement and a terrain system. It is not expected that a client would use this source in their own game or project.
  • The reference application is designed so that these systems can easily be disabled, by simply commenting out MY_TERRAIN_ACTIVE in MyTerrain.h and MY_SKY_ACTIVE in MySky.h.
  • Through the SFC file, users can specify precompiled shaders for use with these systems, but they are separate from the main tree shaders.

Known Issues

1. The PSVita release is in beta. Performance has not yet been optimized and our example shadow system has not been ported. Our development team is working with the Sony Vita team on suitable optimizations.

2. The Mac release is in beta, and not yet running optimally:

  • Under OSX Snow Leapord, mesh instancing is not supported (OpenGL version is below 3.0), so a lot of draw calls are used to render a forest.
  • OSX Lion came out about 10 days before this version was released. We could only see that there are GLSL shader errors that we could not quickly fix before release. Lion will be properly supported in the next minor release.

3. On the Xbox 360, there is a problem with getting the depth pre-pass shaders to match the depth of the lit shaders in some situations. The problem manifests itself as white geometry bleeding through the lit rendering of a tree, but only when the depth pre-pass is enabled.

4. There is a “shimmer defeat” option for the function CForest::ComputeLightView(), defined in Forest.cpp. Its purpose is to keep shadow map flickering to a minimum using a technique outlined in Wolfgang Engel's ShaderX7, but in our current implementation, the shadow map will sometimes distort from certain light positions. The shimmer defeat options is hard-coded off within the function.