CarX Street arrives on PC with a street racing simulation proposal that makes the most of the Unity engine. The title stands out not only for its gameplay but also for a technical section that seeks visual realism in nighttime urban environments. The key to its aesthetic lies in the use of Screen Space Reflections (SSR) to generate dynamic reflections on car bodies, combined with very detailed point lighting that simulates streetlights, neon signs, and traffic lights.
SSR, SpeedTree and Simplygon in the Unity pipeline 🏎️
Real-time reflections via SSR allow each vehicle to reflect the changing urban environment without the need for static cubemaps. However, this technique is costly in terms of performance. To counteract this, the team has used Simplygon to reduce the polygon count in distant car and building models, while maintaining quality in the foreground. Additionally, although the game is urban, it incorporates vegetation through SpeedTree, which generates trees and bushes with efficient LOD. For indie developers seeking similar results, it is recommended to prioritize the number of real-time lights over shadow quality, and to use SSR only on metallic surfaces or car paint.
Lessons for indies who want to race at night 🌃
CarX Street demonstrates that Unity can visually compete in the racing genre if the right optimization tools are applied. The main lesson is not to overuse reflections: applying SSR selectively (only on vehicles and puddles) saves resources. Likewise, the combination of Simplygon for high-polygon assets and SpeedTree for organic details allows for a living city without sacrificing frames. For an indie developer, starting with a fixed day-night cycle (night only) reduces lighting complexity and allows focusing on the quality of urban reflections.
Considering that CarX Street on PC uses real-time SSR reflections, how does Unity manage the computational cost of these reflections along with dynamic nighttime lighting without compromising the frame rate in dense urban environments?
(PS: optimizing for mobile is like trying to fit an elephant into a Mini Cooper)