Around The World, Part 27: Planting trees
9 days ago
- #3D-modeling
- #game-development
- #procedural-generation
- The author discusses the process of planting trees in a procedurally generated world for a game.
- Low-poly tree models were created in Blender to optimize performance, with the tallest tree having only 44 triangles.
- The game uses a biome system to determine where different plant species can grow, with each biome having specific plant functional types.
- Domain warping is used to add detail to biome boundaries and ensure plants follow these boundaries naturally.
- Each plant species has a base occurrence rate to control how often it appears within its biome.
- Plant placement is managed using a grid system to prevent overlaps, though challenges arise with chunk boundaries and ordering dependencies.
- Rejection sampling and iterative methods were considered but deemed too complex or performance-heavy for the current implementation.
- The author decided to allow some plant overlaps to simplify the process and ensure even coverage.
- Additional features include preventing plants from growing on steep slopes and clearing areas around human settlements like ports.
- Performance issues were noted, with dense forests significantly reducing framerate, suggesting the need for impostors in future optimizations.