SpotLight3D Lighting Glitch In Godot Func_godot
Hey everyone, I've run into a bit of a head-scratcher while working with SpotLight3D nodes in my func_godot-built maps. I wanted to share this with you all to see if anyone else has stumbled upon the same issue and perhaps has some insights or solutions to offer. I'll break down the problem, what I've tried, and the versions I'm using, so hopefully, we can figure this out together.
The Core Problem: SpotLight3D Lighting Anomalies
Alright, let's get down to the nitty-gritty. The main issue I'm facing is that the SpotLight3D nodes aren't lighting up surfaces as expected within my func_godot-built maps. As you can see from the video I've provided, it appears that the light is primarily affecting the vertices of the meshes. The rest of the surface areas seem to remain stubbornly dark, which is definitely not the desired effect. It's like the light is pinpointing the corners and edges but ignoring the broader surfaces. When I set up the lights, it's very frustrating when you want the game map to have certain effects.
Now, here's where it gets even more interesting. I've been using Godot 4.4.stable, and I've also noticed that this problem didn't exist when I used SpotLight3Ds in maps created with Qodot in a previous project using Godot 4.3. This led me to suspect that the problem might be specifically related to how func_godot handles lighting or perhaps some interaction between func_godot and the SpotLight3D node itself. The difference between the two implementations might offer a crucial clue as to what's going wrong. Considering the project’s goal, it is important to find a quick solution or workaround.
For those unfamiliar, func_godot is a toolset designed to bring the capabilities of the original game engine to the Godot Engine. It provides a means to import and utilize maps created in various formats, such as those from TrenchBroom, a popular map editor. The goal is to make it easier for people to use old game maps in Godot.
I'm hoping to get to the bottom of this issue and would greatly appreciate any help you all can offer. Whether it's a suggestion, a workaround, or a confirmation that you've experienced the same problem, your input could be invaluable in resolving this lighting conundrum. Any thoughts, solutions, or similar experiences would be a great help.
Troubleshooting Attempts and Map Format Testing
I've tried a few things in an effort to troubleshoot this issue, but unfortunately, none of them have yielded a solution. I've been experimenting with different map formats to see if the problem is specific to a particular format or if it's a more general issue. I made sure to test several formats in TrenchBroom, namely Valve, Standard, and Quake 2 & 3. The video I shared was actually recorded in a Quake 3 map, to give you a visual representation of the problem. Sadly, the SpotLight3D lighting issue persisted across all of these formats.
Here’s a breakdown of what I've done:
- Tested Different Map Formats: I exported maps from TrenchBroom in the Valve, Standard, and Quake 2 & 3 formats. The lighting issue remained consistent across all of them, so it doesn't seem to be tied to a specific map format.
- Verified Node Compatibility: I checked to ensure that the SpotLight3D node was correctly set up within the func_godot environment. I made sure that there weren't any obvious configuration errors, like the light being disabled or the range being set to zero.
- Compared with Other Light Types: I also wanted to see if the problem was specific to SpotLight3D or if it affected other light types. I can confirm that other light types, such as OmniLight3D, work perfectly fine. This makes the issue even more perplexing, as it suggests a problem unique to SpotLight3D nodes in func_godot.
It’s important to note that, for setting up func_godot, I followed a tutorial. The tutorial walks through the steps of importing TrenchBroom maps into Godot, configuring the necessary settings, and ensuring that everything works smoothly. This tutorial was very helpful in getting func_godot set up initially. I've double-checked all the steps from this tutorial, and everything appears to be correct on my end. This adds to the mystery, as the setup process seems to be fine, but the SpotLight3D lighting still isn't working as expected. If I'm missing something, please feel free to point it out. This is all new and any help is appreciated.
SpotLight3D Parameters
For reference, here are the SpotLight3D parameters I've been using. I've experimented with different values, but the core issue of the lighting not illuminating surfaces persists:
- Range: 15.0 meters
- Attenuation: 0.5
- Angle: 20.0 degrees
- Energy: 10.0
These parameters are pretty standard for SpotLight3D setups. I’ve tried adjusting these values to see if it would make any difference, but the basic behavior remained the same. It's like the surface is not receiving light, even though the light source is active and directed at the surface. Changing the parameters doesn't seem to have any effect on how the light interacts with the surfaces in the map. This has been consistently observed throughout my testing.
Versions Used
To give you a clear picture of my setup, here are the versions of the software I'm using:
- TrenchBroom: 2025.3 Build v2025.3 Release Win64
- Godot: 4.4.stable
Visual Evidence and Further Context
- In-Game Footage: I've included in-game footage of the issue, which clearly shows the lighting problem in action. You can see how the light primarily affects the vertices of the meshes, with the surfaces remaining dark. This video clip provides a clear visual representation of the issue I'm facing.
- Qodot Proof of Work: As mentioned earlier, I previously used SpotLight3D nodes successfully in maps built with Qodot. I've also included a screenshot of this setup, just to show a comparison and for reference. This will help us understand what could be different when using func_godot.
Conclusion and Call to Action
So there you have it, guys. A detailed look at the SpotLight3D lighting issue I've encountered with func_godot. I'm hoping that by sharing this with you all, we can work together to get to the bottom of it. If you have any suggestions, experience the same problem, or know a workaround, please share. Your input is valuable, and I'm eager to find a solution. Let's make sure our maps look as good as possible. If you need me to clarify anything, just let me know, and I'll do my best to provide more information. Thanks for reading.