Escape Element

DevLog: Styling an Entire City’s Buildings

thumb I've been (ever so slowly) working on how I intend to turn an entire city of grey buildings into a vibrant, dynamic, colorful place.

My first thought was that I was going to need a collection of color pallets. These buildings had walls, trim, doors, roofs, windows, awnings... and all of them had to be styled cohesively. WITHOUT looking like every other building.

I also wanted some of the buildings to look uniquely cool compared to the others. So I was going to need some color pallets to be more rare than others.

This is all made slightly more complex by the fact that the buildings don't share consistently ordered surface index.

If any of you care for the technical context: each building is its own unique Godot scene. The root node3D has a script that identifies what type of building it is.

The actual building mesh is a child in this scene and has its own script, which up to now simply changed the buildings opacity if It's between the camera and the player car.

Here's what the scene looks like: an image of the above described Godot scene

My initial attempt styled one of the building types successfully, but when I tried to scale it, it would only apply a unique palette per building type.

I spent a great deal of time debugging things until I felt sure that the data was correct. The script was getting unique pallets for each instance of a building... Just wasn't applying them uniquely.

I'm a tiny bit ashamed to admit that I realized I was gonna have to ask the senior developer at my studio. Since I'm a solo Dev that's difficult.

So I asked Perplexity AI. In case you're curious, it's actually pretty good with GDScript. (I try to be very good about making sure it knows what version of Godot I'm working with)

In my defense, the culprit was so obvious we both missed it for a bit. When I was applying the styles, even though the colors I was using were unique, the material it was being applied to was not.

So...while there's a lot left to do In order to make it all elegant, and the palettes I'm using aren't necessarily final. Some of them are pretty loud and obnoxious, It's progress and I'll take it!

The uniquely styled buildings in my test level.

With a little bit of luck I'll be able to move on to textures and eventually even lighting before too long.

And the lessons learned here will also come in handy if/when I decide to let the player change the color of their car.

#DD-log #devlog #gamedev #godot