Troglodyte in Underbelly: Light settings
Author: Shemaiah Nelson
Date: 3/25/2024
During this week's development for "Troglodyte In Underbelly," I was tasked with implementing a setting within the options menu to control the ambient light in the scene. While this seemed straightforward initially, I soon realized that integrating this feature posed significant complications due to the existing day-night cycle system. The primary issue stemmed from the interaction between the ambient light setting and the dynamic changes in lighting dictated by the day-night cycle. While I was able to successfully implement functionality to control the ambient light, it became apparent that any adjustments made were overwritten whenever the time changed as per the day-night cycle. This resulted in inconsistent lighting conditions and detracted from the immersive experience we aimed to deliver to players.
To overcome the challenges encountered with implementing ambient light control within our game's options menu while preserving the integrity of the existing day-night cycle system, I devised an innovative solution that leveraged the scene's lighting settings and a simple script to achieve the desired outcome seamlessly. Firstly, I opted to utilize the skybox lighting setting as a foundation for controlling ambient light. By leveraging the inherent properties of the skybox, I could ensure consistency and coherence in lighting conditions across different times of day, mitigating the risk of conflicts with the dynamic changes dictated by the day-night cycle. Next, I developed a simple script, named AmbientLightController, which facilitated real-time adjustment of the ambient light intensity based on player input. This script, integrated into the game's options menu, utilized a Slider UI element to provide players with intuitive control over ambient light levels.
![]() |
| Afternoon 0% ambient light |
![]() |
| Afternoon 100% ambient light |
![]() |
| Morning 0% ambient light |
![]() |
| Morning 100% ambient light |
.png)


.png)

Comments
Post a Comment