2024·
UnityHLSLCompute ShadersGPU Fluid SimBVHProcedural MeshingRaymarchingEdge DetectionPhysics Animation
Pints & Patrons
Systems-heavy pub-management sim prototype focused on gameplay architecture and rendering tech.
Pints & Patrons - Systems Showcase
This project became a good testbed for both gameplay systems and codebase structure. Compared with my earlier student projects, it had far more moving parts to keep organised, which made architecture and maintainability a major part of the work rather than an afterthought.
The current slice is centred on the following implemented systems.
- GPU edge detection outlines using normal and depth textures.
- Semi-physical humanoid animation.
- Accurate drink spillage decal system that writes data to lightmap texture clones and applies it to meshes. Spillages can also be mopped up, and the same data path can support secondary gameplay responses such as slipping hazards.
- Procedural mesh slicing, for food items. Accurate volume-based weight updates for the two new generated food items after slice is completed.
- GPU Fluid simulation. Very efficient, can run 100s of thousands of particles with relative ease.
- GPU fluid particle collisions. Using a real-time AABB BVH, we can quickly return objects near to a particle, to then do more accurate collision checks with primitives, or meshes. Where mesh collision is checked, a prebaked per-mesh BVH is used to efficiently find any triangle of a mesh that collides with the particle. Can run 100s of thousands of particles with relative ease.
- GPU fluid mesh generation. Uses raymarching to generate a new mesh each frame and welds triangle vertices to ensure smooth shading. Resolution can be altered to keep it efficient in high-demand situations. This rendering path was developed as a parallel strand for later integration with the fluid simulation.
What I gained most from this project was experience managing a larger Unity project cleanly: separating responsibilities, keeping feature work from turning into a mess, and making technical art, gameplay code and tools coexist in one codebase.