DevLog: Foreshadowed Shaders
GameDev continues!
Hot off the heels of my very first DevLog here comes another one. But THIS one is different. This one isn’t a simple update about progress.
This time I’m thinking through a problem. Maybe that’ll be interesting?
Let’s find out!
Ok, so I started playing with styling the buildings that will make up the city in my game. By the way, I’m using Kenney assets for the cars, streets, and buildings. They have been working GREAT, are really well made, and allow me to focus on things like coding. I should do a whole thing on this later... where was I??
Right, so I started playing with styling the buildings that will make up the city in my game.
Overlaying a material onto the buildings is super easy in Godot, and Kenney’s assets had all had the appropriate areas for easy update. (The colors are just random for testing)
One thing that was annoying (I don’t know if this is a Godot thing or a Kenney thing) is that the skin-able areas were not consistently ordered. The 1 index could be the window on building A but the base wall color on building B.
But as long as I can set all of these material parameters in CODE just like I did in the editor, it should be fairly straight forward to get a diverse looking level.
There is ONE catch that I’m gonna have to figure out...
As you may have noticed in the image above, I made the material overlay for the windows emit a bit of light. I wanted to see how it might look when I get around to adding a day/night cycle to the game.
The problem (obviously) is that doing it this way lights up ALL the windows. That’s not realistic at all, and bringing this little city to life is one of my guiding principles for this game.
I imagine the answer is some type of shader (instead of / in concert with) the window’s material overlay. I am not good with shaders.
I WANT TO BE... but I’m not.
Yet.
There’s also a chance that shaders are NOT the answer and I’m just pinning my hopes on a technology that feels like magic to me. I mean shaders can make fire, and water, and ... anything right? I’m pretty sure Starfield is made entirely of shaders. (/s)