random-geek / morelights

Minetest mod adding additional lighting nodes.
GNU Lesser General Public License v3.0
11 stars 11 forks source link

Dim modern lights #7

Open PeterNerlich opened 2 years ago

PeterNerlich commented 2 years ago

Hello! I have been looking for a solution to just dimly light areas, without flooding them with light. In my case, I want to use it to light train tunnels while leaving a clear distinction to the brightly lit stations.

I found there wasn't anything in morelights yet that fit my idea of being low profile like the modern barlights. So I made my own based on morelights_modern! This is basically a copy of morelights_modern but I use the existing models as I didn't modify them. What I did modify are only the brightness levels of all lights, I decided on the ceil of one third of their original light_source value. I adjusted the textures accordingly to look half decent. Instead of the ceiling light I introduce a light dot, an especially low profile element only sticking out one 16th, with a width and height of four 16th. The idea for the texture is that it lets light out to the side only, with a shade plate towards the room. The texture for the emitting faces might be overly dark, I tried to fit it to not draw any attention for my use case – as you see, I have quite the dark background:

Dim Light Dot Dim Light Dot

Station with tunnels lit with torches (left) vs. new dim light dots (right) Station with tunnels lit with torches (left) vs. new dim light dots (right)

The difference looks subtle, as I originally tried to approximate the look I wanted to get with my torch placement. But the bright spots looked too busy and drew the players attention too much in my opinion. The light dots enable a smoother lighting, making really dark looking tunnels without being totally black.


If you like this and would want to include it into the morelights modpack, I can prepare a PR for you (at the moment it's just the standalone mod in my repository).

PeterNerlich commented 2 years ago

I tried to have the dim barlights connect to the bright ones as well, somehow it didn't work. But I didn't look into it much.

random-geek commented 2 years ago

I like the idea of a low-profile lighting like that, although I might use a "light" texture (similar to stairlights, perhaps) for the sides. Since there seems to be considerable interest in dimmer lighting options, I should probably consider some kind of dimming system. I'm just not sure how to accomplish it gracefully.

PeterNerlich commented 2 years ago

Hm... I mean, you could introduce yet another screwdriver-like tool that lets you set the light level, or simply by right click (I think there are no right click actions yet). Offering 4 dimming options via formspec will probably already be plenty (25%, 50%, 75%, 100% or the like). It would probably also be cool to say "please make all future lights I place use this dimming level" to not make lighting big areas a pain. That would have to be a variable per player, consequently, and some mechanism to check it when a light gets placed and potentially exchange the node with a dimmed version.