Problem
The project was a first-person walk through a virtual car showroom, in OpenGL. Car paint is the hard part: a metallic base under clear varnish, under ceiling spotlights, looks wrong as soon as the highlights or the reflections are off.
Approach
I led a team of eight and wrote 72 of the project's 83 commits. The renderer is physically based: a Cook-Torrance GGX BRDF with a clearcoat layer that conserves energy, so the varnish never over-brightens the paint. Each ceiling spotlight is treated as an 18 cm sphere, which gives soft oval highlights on the hoods, and shadow edges soften with the distance between blocker and receiver. Each frame then runs through the post-processing chain: bloom, depth of field, ACES tone mapping, a colour grade, film grain and FXAA. You walk the room in first person, with collision against the walls and the cars, and you can drive the Mustang.
Outcomes
- Three vehicle models on display: a Ford Mustang GT, an Audi R8 and a Bugatti Chiron
- Runs on any GPU with OpenGL 3.3 Core support
- 32-sample ambient occlusion and filtered shadows for the spotlights and the sun
- Source public on GitHub, linted with ruff and tested with pytest