Lights! A Look into the New Hazel Engine

Welcome back to another exciting edition of our tech development log! Today, we have some thrilling updates to share about Hazel, our game engine. Thanks to the incredible efforts of Karim, a talented member of our team, we’ve made significant advancements in the field of graphics rendering.

Karim, an intern who joined us from university, presented us with his own version of the Hazel engine, enriched with advanced rendering features like deferred rendering, screen space ambient occlusion, and screen space reflections. We were so impressed by his work that we invited him to join our core team for three months to collaborate on further development.

As a rendering engineer, Karim’s primary focus was on enhancing the lighting capabilities of the engine. Traditionally, Hazel employed forward rendering, where lighting calculations are performed directly in 3D space. However, Karim introduced us to the concept of forward plus rendering, which optimizes lighting calculations by dividing the screen into tiles or volumes.

In forward plus rendering, instead of calculating lighting for all pixels in real-time, we gather information about the geometry, such as location, material, and normals, during the initial rendering passes. This information is then used to determine which lights affect each tile or volume, allowing for more efficient lighting calculations. The result is improved performance with a significant reduction in the number of lights processed per pixel.

To demonstrate the power of this new lighting system, we’ve added a point light feature to Hazel. With point lights, you can customize various parameters such as color, intensity, radius, and falloff. The lights are culled based on their range and position, providing accurate and efficient lighting calculations.

Further reading:  Beginner C++ Game Programming: Implementing 2D Arrays and Circular Dependency

To help visualize the lighting complexity, we’ve included a “show light complexity” option. When enabled, you can see the different tile divisions on the screen, with colors indicating the complexity of lighting calculations in each area. This feature is immensely useful for identifying performance bottlenecks and optimizing your scenes.

We’ve also added the ability to access the light complexity visualization during gameplay, allowing for real-time analysis and debugging. Now you can fine-tune your scenes and ensure optimal lighting performance.

As we continue to refine and expand Hazel’s capabilities, we’re excited to explore even more advanced lighting features, such as spotlights. Our goal is to provide game developers with a comprehensive and powerful engine that empowers their creativity.

If you’re interested in supporting Hazel’s development, please consider becoming a patron on our Patreon page. By doing so, you’ll gain access to the source code and contribute to the growth of this remarkable game engine.

We’re grateful for all the support and enthusiasm we’ve received on this journey. Stay tuned for more updates and exciting scenes built with Hazel. Thank you for being a part of our community!

YouTube video
Lights! A Look into the New Hazel Engine