LOD
Grassworks uses four LOD levels: high, medium, low and veryLow. Distance values are normalized from 0 to 1 against maxDistance.
| LOD | Distance | Density | Detail |
|---|---|---|---|
| high | 0.6 | 4 | 4 |
| medium | 0.7 | 2 | 2 |
| low | 0.9 | 1 | 1 |
| veryLow | 1.0 | 1 | 1 |
Distance
If maxDistance is 100 and high distance is 0.3, high LOD applies from 0–30 world units. The normalized distance values define where the transitions happen relative to the current maximum distance.
Density
Density controls the amount of grass generated per tile at that LOD. Higher density makes the field fuller but increases resource use.
Detail
Detail controls geometric detail for individual Blade geometry. Higher values can improve Blade shape at a greater geometry cost. Billboard uses a two-triangle rectangle representation, so detail does not have the same equivalent effect there.
LOD Transition Controls
These parameters control how Grassworks transitions between LOD levels and how grass fades out near the end of maxDistance.
| Parameter | Default | Description |
|---|---|---|
| lodTransitionWidth | 0.01 | Controls the width of the transition between LOD levels. |
| lodEndTransitionWidth | 0.08 | Controls the fade width at the end of maxDistance. |
lodTransitionWidth
Controls the normalized distance range used to smoothly transition between LOD levels. A larger value creates a wider transition, while a smaller value makes the transition happen over a shorter distance.
lodEndTransitionWidth
Controls the normalized fade range near maxDistance. Grassworks uses this to create a smoother, circular ending to the grass field instead of exposing the square or rectangular tile boundaries at the outer edge.