meta data for this page
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
grass-and-undergrowth [2023/04/04 09:57] steph.jorgensen |
grass-and-undergrowth [2023/04/04 09:58] (current) steph.jorgensen |
||
---|---|---|---|
Line 13: | Line 13: | ||
In the reference application, | In the reference application, | ||
- | ===== Getting | + | ===== Getting |
There are several classes and structures you'll need to get started: | There are several classes and structures you'll need to get started: | ||
Line 32: | Line 32: | ||
These data structures are detailed in [[culling-and-population-structures|Culling and Population Structures]]. | These data structures are detailed in [[culling-and-population-structures|Culling and Population Structures]]. | ||
- | ===== Streaming and Culling | + | ===== Streaming and culling |
As shown in '' | As shown in '' | ||
Line 54: | Line 54: | ||
- | ===== Additional | + | ===== Additional |
- | ==== Cell Size ==== | + | ==== Cell size ==== |
You can pick different cell sizes per grass type and it can impact both CPU and GPU performance a great deal. Each grass model is culled in a separate call, so separate sizes are easily accommodated. In contrast to tree instances, grass instances are not individually culled. If the cell is in the frustum, then every instance in it will be rendered. This cuts down on CPU usage greatly, but can be hard on the GPU for higher grass densities. To strike a balance, smaller cell sizes can be used. We recommend smaller cell sizes for high-density grass, and larger sizes for sparse models like rocks or boulders. | You can pick different cell sizes per grass type and it can impact both CPU and GPU performance a great deal. Each grass model is culled in a separate call, so separate sizes are easily accommodated. In contrast to tree instances, grass instances are not individually culled. If the cell is in the frustum, then every instance in it will be rendered. This cuts down on CPU usage greatly, but can be hard on the GPU for higher grass densities. To strike a balance, smaller cell sizes can be used. We recommend smaller cell sizes for high-density grass, and larger sizes for sparse models like rocks or boulders. | ||
Line 62: | Line 62: | ||
By way of example, the reference application' | By way of example, the reference application' | ||
- | ==== Heap Fragmentation Control | + | ==== Heap fragmentation control |
The organization of multiple types of grass into an arbitrary collection of cells can easily lead to a great number of heap allocations. We leave it to the user to implement their own population approach that doesn' | The organization of multiple types of grass into an arbitrary collection of cells can easily lead to a great number of heap allocations. We leave it to the user to implement their own population approach that doesn' | ||
To control the SDK's heap behavior, be sure to read about the [[using-the-reserves-system|Reserves System]]. | To control the SDK's heap behavior, be sure to read about the [[using-the-reserves-system|Reserves System]]. |