the Veldt
technical notes: foliage components
1 INTRO • 2 ENV_BUBBLES • 3 FOLIAGE • 4 LIMITS • 5 MAPS
Foliage comes in two varieties: grass and trees.
One grass element comprises of one model (grass01.mdl). One grass element takes up one entity slot. Grass has:
• a random yaw (1° - 359°). Yaw is the direction it faces.
• a random pitch (1° - 16°). Pitch is the amount of tilt.
• a random body (0, 1, 2). Each is a different grass model.
The tree element is more complex. It comprises of two models: the trunk/branches (tree01.mdl) and the leaf cluster (leaf01.mdl). One tree requires five entity slots: 1 trunk and 4 leaves.
A tree trunk has:
• a random yaw (1° - 359°).
A tree leaf has:
• a random yaw (1° - 359°).
• a random pitch (16° - 64°).
• a random location within the tree-branch area.
All the models make use of masked-skin models, using Valve's new version of Studiomdl (5/7/03). This allows for models to have special transparent features, something previously exclusive to sprites and brush-entities.
All foliage code is located within DLLS\EFFECTS.CPP
No, the foliage does not sway or move. But it sort of looks like it. The "sway" illusion is just a cheap hack method of adding an idle-sway to the player view (CL_DLL\VIEW.CPP).