3d-falling-leaves

Installation
SKILL.md

3D Falling Leaves

Make individual leaves turn through face, edge, and back while drifting through the scene. The visible edge-on moment is essential to the effect.

Build one convincing leaf

Use a two-sided quad or lightly bent mesh with a recognizable leaf silhouette, stem, and restrained vein detail. Camera-facing point sprites cannot turn edge-on. Begin with one slow leaf before increasing the count.

Give the back a slightly paler, less saturated appearance and orient its lighting normal correctly. For a custom shader, gl_FrontFacing can distinguish front/back; do not flip normals twice if the engine's material already handles double-sided lighting. Keep light transmission subtle and linked to the scene sun rather than using an unconditionally glowing leaf.

Use a padded texture atlas for multiple silhouettes. Extend edge colors into transparent texels and keep padding through mip levels to prevent dark rims and atlas bleed. Treat a color atlas as sRGB; treat an atlas encoding masks or material channels as data. Seijaku's procedural atlas encodes channels and is not an ordinary leaf photograph.

Couple tumble and drift

Assign persistent seeded values per leaf: position seed, scale, phase, tumble rate, roll rate, fall speed, lateral slip, and palette variation. Never generate new random values every frame.

The lateral velocity should follow the tumble, so a leaf slips fastest when edge-on. For angular speed omega bounded away from zero:

Installs
51
Repository
mengto/skills
GitHub Stars
6.1K
First Seen
4 days ago
3d-falling-leaves — mengto/skills