Pocket Putt Islands
- ..
- .metadata99 B
- README.md2.2 KB
- preview.png41.6 KB
- properties.yaml2.4 KB
- shader.wgsl17.5 KB
README.md
animCloth
Cloth that really moves in the wind: flags and banners. A vertex animation (in vertex_clip, world space, like the engine's foliage sway) runs waves from the attached edge (UV u = 0, the pole) to the free end (u = 1), their height growing toward the free end, and pushes a steady billow downwind; the fragment evaluates the same wave per pixel for the fold normals and darker troughs, over a procedural woven surface with a fibre sheen.
wind_strength(m/s) withwind_phase: the flutter phase iswind_strength * time + wind_phasemetres of wind (they follow the wearer'sam.windStrength/am.windStrengthPhase), waves travel atwave_speedx the wind.wind_direction(degrees of world yaw, 0 = toward +X, 90 = toward +Z;am.windDirection): the billow goes downwind; the flutter is strongest when the wind runs along the cloth's own +x.style0 printed cotton flag (teal hoist half, saffron fly half, white eight-pointed star in a ring, white header strip with brass grommets, hemmed fly), 1 heavy canvas banner (warm tan canvas, oxblood band at the attached edge, panel seams every 0.6 m, double-stitched hems).cloth_sizeis the metres one UV square covers;wavelength,amplitude(m at the free end in an 8 m/s wind) andthread_pitch/weave_depthset the scale.
Meshes: full flutter needs a subdivided cloth mesh with vertex colour red < 0.5 (free cloth) and green 1 front / 0 back: animatedMaterials.meshes.flagCloth (1.5 x 1 m, 32 x 20 cells, both faces, origin at the top of the pole edge, flag along +x and down -y). On any other mesh (white vertex colour) the shape holds and the wind shows as a moving shading ripple, so a cube or sphere never cracks at its edges. vertexBoundsDilation covers flutter + billow at the strongest wind. No textures.
Fibre texture that survives distance: weave_tone sets uneven-yarn warp/weft streaks from 2 to 32 threads across (fine levels fade as the pixel grows, coarse ones stay), so the cloth still reads as woven at 3 m+ where single threads are sub-pixel. Held surfaces (any mesh that does not flutter) get static long soft folds of crease_depth metres running down the cloth, whole folds per UV square, with darker troughs.