LOD

Grassworks uses four LOD levels: high, medium, low and veryLow. Distance values are normalized from 0 to 1 against maxDistance.

LODDistanceDensityDetail
high0.644
medium0.722
low0.911
veryLow1.011

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.

ParameterDefaultDescription
lodTransitionWidth0.01Controls the width of the transition between LOD levels.
lodEndTransitionWidth0.08Controls 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.