Skip to content

KeesTucker/splant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project is pretty quick and dirty. A long way from fully complete. Makes pretty goopy green globs tho.

A real-time plant growth simulation built from scratch on the GPU. Cells divide, age, and connect with structural bonds, with up to 100,000 running simultaneously. The entire simulation lives in compute shaders: a 3D spatial hash table with GPU radix sorting enables O(1) neighbour queries for collision, bonding, and force accumulation. Concurrent physics forces (springs, bending constraints, wind turbulence, gravity) are applied across thousands of threads simultaneously using atomic compare-exchange operations on raw float bits to avoid race conditions without serialisation. The renderer is a fully custom raymarcher with no meshes and no rasterisation. Each frame, the simulation builds a sparse SDF brick atlas, packing only occupied 8x8x8 voxel bricks into a 3D texture, giving the raymarcher a fast acceleration structure to step through. Surface normals are extracted from the SDF gradient, and lighting forgoes traditional diffuse entirely in favour of a subsurface scattering approximation that marches along the light direction, producing soft self-shadowing as a side effect.

About

cell driven plant/seaweed growth sim. raymarched rendering

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors