Nightlife, now in colour: adding coloured light and all the cool stuff to go with it

Inspired by @Psyduck’s impressive night-time screenshots and a passing comment about how cool building with coloured light would be, I got to thinking about how it may be achieved.

EDIT: the content of these summaries is no longer part of the suggestion, since apparently my concerns about light blending don’t apply to Stonehearth. Suffice it to say that I’m still living in the past when it comes to lighting capabilities; it seems that Stonehearth has no trouble with things that would have killed other games which I’ve tried to play around with lighting in.


Now, the tricky bit about coloured lighting, as I understand it, is that blending different light sources can get pretty resource-intensive once there are more than a handful of colours mixing together. However, Stonehearth’s engine is already built to deal with light emissions of different hues; so the only hurdles yet to be overcome are related to practicality – how to make it viable in the game without melting anyone’s computer or making the renderer freak out.


So, with that in mind, I came up with a compromise which should reduce the strain, while also looking pretty and believable:


when light sources of different colours overlap, the brightest wins out. In the case of a tie, white light takes precedence. This reduces the potential for awesome colour-mixing effects, but it does at least tie back to real-world behaviour (white light being made up of all the other wavelengths). I also propose that this coloured light doesn’t take reflections into account; so the effect is identical no matter what surface the light reflects off of. If anyone really really wants amazing screenshots of light reflecting off of the water… well, that’s what post-processing in image software is for :stuck_out_tongue:

Now, how do we get some coloured light sources into players’ hands?

Three new things:

  1. New class, the Glazier. Branches off the Potter (so it would be Ascendancy’s first tier-three class, and a second-tier for RC, which I think is very fitting). The glazier turns sand (new drop from dirt blocks, about as rare as clay; and can also be found in sandy terrain with a much higher chance) into either glass panes or glass blocks, with the blocks costing 2 sand each. Glass panes are used in fancy new glazed windows, adding a real sense of luxury and prosperity; and various other new decorations (I figure Radiant can add a reasonable amount, and then modders will surely go nuts with cool new stuff). Glass blocks are used for constructing buildings, allowing players to make custom windows (e.g. large cathedral windows, including stained glass ones which I’ll get to in a moment), skylights, or maybe even geodomes or whole glass palaces if that’s their thing. Making the panes and blocks from clear glass is the apprentice skill, once the Glazier reaches their first level they gain the ability to colour/stain the glass using metal ores and other semi-rare ingredients. Copper ore produces greens and blue, tin produces yellow, iron for red, silver for white, and coal for a smoky gray. Then, at the second level, the Glazier gets the skills to mix those colours to make secondary colours (orange, purple, pink, brown, different shades of all the above). This gives the Glazier a reasonable number of recipes, and makes glass a rather late-game building material; a sign of a truly prosperous town.

  2. The Glazier can then take an ordinary lantern (wooden, stone, or any new kind we might get in the future… in fact, “any lantern” might be a suitable wildcard in this recipe), and combine it with a coloured glass pane to make a coloured lantern. It would be ideal to have wooden, stone, iron, etc. versions and even Fine variants; but frankly that’s a lot of crafting recipes and the Glazier is already pretty full in that department; so I propose that the coloured lanterns also take 1 iron/steel ingot, and copy the visual style of whatever the top-tier lantern ends up being. Given how expensive the coloured glass pane is to make, the cost of a coloured lantern should basically be equal to any other reasonable lantern recipe anyway.

  3. To light up large areas and help eliminate shadows, the Engineer gets 2 new crafting recipes for the arc lamp and the spotlight. These lamps (with identical recipes) require 2 silver ingots, 1 copper ore, 1 coal ore, 1 iron ore, 1 clear glass pane, and one brass gear each. They emit a massive light radius; suitable for lighting up castle walls or large town squares… or perhaps a stage production in the local amphitheater, if that’s more to the player’s taste. The difference between these two lights is that while the arc lamp is basically a souped-up version of its wooden ancestors, the spotlight has its emission point offset so that it doesn’t light its local vicinity but some other area the player points it at. The point of these lights, as I brought up in the thread which inspired all this, is to reduce the amount of darkness in a lit-up area and thus eliminate shadows which might over-tax the rendering. If the player builds a large castle, for example, they can shine a spotlight at it and hang arc lights in the courtyard so that the whole building is well-lit without having to hang hundreds of smaller lanterns.

Now, assuming all these things make it into the game, there’s the question of what happens when light passes through a translucent, coloured object (i.e. stained glass blocks)… I mean, I’d love to have stained glass windows shining out amazing light patterns into the night; so if that’s do-able then I’m all for it. However, I’m a realist (even if I do like to dream big), so I’m aware that there wouldn’t be much point in my first suggestion of “brightest wins out” if all those savings were going to be immediately eaten up by colour blending when light shines through the windows. So, what I propose as another compromise is this: all light passing through a coloured, translucent object is treated as white light, and takes on the hue of whatever it’s passing through. So if a blue light-source shines through a pink window, it comes out pink. This isn’t realistic, but it’s simple, intuitive, should hopefully be a lower strain on the renderer (I mean, I don’t know what the lighting engine for Stonehearth looks like; maybe it can handle all this blending with ease… I’m just going off my experiences in other games, and how they tackle this question); and best of all it means that players can further cut down the number of light sources they use in a building project. If they want blue lighting on one wall and green lighting on another, that can be accomplished with a single lantern and different coloured windows. An arc light surrounded by coloured glass blocks can give a whole scene an ethereal, other-worldly glow.

This wouldn’t be a game-changer for everyone; but for the players who enjoy this kind of thing it would be absolutely massive. I can understand that it wouldn’t be the highest priority; but one of the major points of my suggestions is regarding optimising the light sources so that we have more room to play around with them. Small details like this feature add disproportionately large benefits in games with dedicated builders; and I’m not even going to try to imagine what our amazing building community would come up with if this tool-set were added to their repertoires.

In the meantime, if any modders would like to play around with some of these concepts – especially with a set of coloured lanterns so that we can test how well the game handles different coloured light sources blending together; or some stained-glass blocks (I’m sure that builders would weep with joy for those); that would be immensely appreciated. I suspect that Stonehearth will already handle a lot of this quite well, although I have no experience with transparent items (again, any modders who do, your experiences would be greatly appreciated here :slight_smile: ), but I’d love to see these ideas become a basic and intuitive set of options that any player can pick up and play around with.

And if I’ve missed anything obvious, please don’t hesitate to… enlighten me on it. …ok, I’m going now :unamused:


Psyduck Supports! :stuck_out_tongue:

I know @RepeatPan messed around with colored lights back in the sheep rave days.

1 Like

I’m not an expert on 3D stuff by any means, but your proposal sounds weird. Disabling light color blending for performance reasons sounds odd, as I would expect that’s something the shader (or GPU itself) can do rather easily. However, changing a light ray’s color based on something in its path sounds horribly expensive, as it requires knowledge of the object in the way. I would guess that currently, a light ray is either blocked or let through, e.g. there’s solid and translucent objects, with nothing in-between. That’s easy to deal with, either the light ray hits (and illuminates) something, or it doesn’t.

From my experiences, the engine handles lighting actually really well, even if you spawn a bunch of colored lights that all mix together. I haven’t seen spotlights, however.


Hehe to be fair i just wanted bigger lights and the ability to change colors of the lights so i can mix them together.
only giving of yellow light :stuck_out_tongue:

So maybe it does seem a bit overkill! not that i would be opposed to it all but ill settle for a lot less!
Something that in my case could be modded :slight_smile:
but would still like it as a part of the game.

1 Like

While you can’t change the colors of lights at runtime, you can pretty much fine-tune them in whatever way you want:

I think I’m using five or seven different colors that are all cycled through here. If you need something that has multiple, different lights, just create different effects and create/delete them as is required. Not exactly pretty, but until we get a proper API to access lights, better than nothing.


ah, I see what you mean about the light needing to know what it’s passing through. I did figure that would be the most expensive part of the whole suggestion, and hence the idea to “simplify” the large-area lighting as much as possible. I’m used to rendering engines which rely on older (and much more limited) shader technology though, and those ones didn’t handle light blending so well at all. So I’m coming from a perspective of “anything to limit the GPU’s workload without limiting the feature set”. It would seems that’s not a good paradigm to use in Stonehearth though, since Radiant are working with a more powerful renderer.

It would seem that the first point of my suggestion isn’t necessary then – Stonehearth seems to handle many different light colours without drama. I mean, it does make sense that the Devs would ensure their lighting system worked that way when they decided to add coloured light sources… I just hadn’t figured they’d invest effort in a feature like that unless they expected players to use it/have access to anything which might cause that kind of strain.

Regarding the translucent objects: I supposed what I was thinking is that when light hits coloured glass, the old data for colour is forgotten and replaced by the colour of the glass. But, as you say, that means the light source has to check the colours of all the glass (and other translucent items) along its path… that would be horrible for the memory.

Would having the light “stop” at the glass, and the glass become a new emitter, potentially work better? So when the glass is hit by the light from another source, that glass itself becomes a light source. The difficulty would be preserving the intensity of the light… would it be just as expensive if the glass had to remember the strength of the light hitting it?

Still, it’s good to see that at least the coloured light itself works so well already. That allows players to fake the effect of the windows changing the light colours; by simply using an appropriately coloured lamp and maybe some hidden lighting shenanigans (e.g. put lamps under the eaves/windowsills in order to boost the saturation of the light spilling onto the ground), we can get the effect of light through a window lighting up the whole area.

Thanks for that incredibly useful info and demonstration :slight_smile:


Techno Sheep should be a faction of their own just saying :stuck_out_tongue:

Sheeps did it!


The Dancing Plague is one of my favorite weird moments from history that most people haven’t heard of.


This is love. :heart: Sheep rave is my jam.