Light Intensity

Sep 27, 2016, 1:59 am
#1
Joined: Sep 22, 2008
Posts: 634
Should light be more of a factor?

IVAN has a lovely light system in place, but since all practical light sources are so bright, all the player usually sees is the light from their own lantern. The only time light actually comes into play is when the lantern breaks, and there's just two levels it reliably happens. Unbreakable light sources nullify even that. There's just no room to use light creatively when everything the player sees is bathed in a flat shade of pale yellow.

I was envisioning using skylights, magma flows and glowing vats of experimental Valdemar, but realised there's no proper way to actually show the effect when it's overridden by a carried light source.
Sep 27, 2016, 2:09 am
#2
Joined: Dec 3, 2007
Occupation: Chaos Weaver
Location: Standing between all life and death
Posts: 2,842
Wouldn't simply making the lantern light a bit weaker fix that? Not oil lamp dim, but not "the sun has come to earth" bright that it currently is.
Sep 27, 2016, 2:30 am
#3
Joined: Sep 22, 2008
Posts: 634
It would fix one of the light sources, but basically all other sources besides the oil lamp are really bright too.
Sep 27, 2016, 2:56 am
#4
Joined: Dec 11, 2008
Posts: 1,770
We could have a look and see what part of the code determines that player-carried light sources are drawn over all others.

Inverting the "light source hierarchy" would certainly make things much more interesting and colourful, especially with the mutant animals, hattifatteners and light crystal golems around (although I think the crystal cave does a pretty good job with its environmental lighting as is.)

It'd be pretty cool for a new player to start sprinting away down a UT hallway because they notice a dull red light slowly encroaching on them (that is actually just an injured mutant ass or rabbit)
Sep 27, 2016, 3:17 am
#5
Joined: Sep 22, 2008
Posts: 634
I agree with crystal cave being the exception here, light crystal emitation values are so high compared to other sources up to that point.

Is there a hierarchy with light sources though? I was under the impression that sources simply add to a light map. A hierarchy change also wouldn't do too much for the issue of darkness being non-existent.
Sep 27, 2016, 3:45 am
#6
Joined: Dec 11, 2008
Posts: 1,770
JoKe wrote
Is there a hierarchy with light sources though? I was under the impression that sources simply add to a light map. A hierarchy change also wouldn't do too much for the issue of darkness being non-existent.

No, on second thought I'm pretty sure you're right. So the issue is that the default lantern is near white (125, 125, 105) and other light sources just add to the total value of light in a given tile, meaning that basically everything ends up being a shade of white/yellow anyway barring very few exceptions?

We might be able to see if we could make a "light source hierarchy" though. I'll have a look at the code.
It's interesting because the RGB colour values also double as "brightness" which means that we can't ever have "black light" with 0, 0, 0 because it's just counted as regular darkness and is immediately removed by any light source.

I think that maybe splitting the "light intensity" and "light colour" into two separate things might get what we're going for here, but that might be a big change in the code.
Sep 27, 2016, 4:04 am
#7
Joined: Sep 8, 2010
Occupation: Petty Functionary
Location: Drinking pea soup in the world map
Interests: Mangoes
Posts: 1,171
I remember messing with some lighting system stuff once, to make flaming objects emit light, and stop once they stopped burning. Really tricky that.
Can you change the lantern emitation to be a really dark yellow?
Sep 27, 2016, 4:21 am
#8
Joined: Dec 11, 2008
Posts: 1,770
fejoa wrote
Can you change the lantern emitation to be a really dark yellow?

Yes but there's a point where it stops being treated as a light source entirely due to not putting out a strong enough light.

Here's a screenshot where I've toned down the default lantern a little, next to the default strength lantern (right):



And here's a screenshot with a brighter light source present (in this case, Petrus' left nut)



And one more with an oil lamp and mutant blood nearby, and one with a green light crystal nearby:



Toning down the default lantern is definitely making the other, more colourful light sources more apparent!
Sep 27, 2016, 4:23 am
#9
Joined: Sep 22, 2008
Posts: 634
4zb4 wrote
I think that maybe splitting the "light intensity" and "light colour" into two separate things might get what we're going for here, but that might be a big change in the code.

This would be ideal. RGBA instead of just RGB would allow a much finer control over lighting in general. Alpha could be implemented as light falloff over distance, for instance.

fejoa wrote
Can you change the lantern emitation to be a really dark yellow?
I'll mock up a few scenes with changed light levels from various sources.

EDIT: 4zb4 got there first.
Sep 27, 2016, 4:32 am
#10
Joined: Sep 8, 2010
Occupation: Petty Functionary
Location: Drinking pea soup in the world map
Interests: Mangoes
Posts: 1,171
It does decrease the contrast ever so slightly.
I wonder if dungeons could have an effect on the emitation? So that it gets darker the deeper you go through Gloomy Caves say?
Sep 27, 2016, 4:41 am
#11
Joined: Sep 22, 2008
Posts: 634
fejoa wrote
I wonder if dungeons could have an effect on the emitation? So that it gets darker the deeper you go through Gloomy Caves say?

Absolutely, though that would probably require the RGBA-light or some other similar solution. Adding a LightLevelModifier or something to modify light levels through script would be awesome.

E: This should've probably been its own thread.
Sep 27, 2016, 7:56 am
#12
Joined: Dec 17, 2007
Occupation: Taking Names, Formerly Kicking Ass
Location: New Jersey
Posts: 922
I would like to see the light be more spooky in the dungeon. like having it go completely black when your light source moves out of range. I always like playing xcom:terror from the deep because when you went on missions under the water it was dark everywhere.
Sep 27, 2016, 8:56 am
#13
Ischaldirh's avatar
Ex-Tyrant of the IVANers


Joined: Dec 8, 2007
Occupation: Junior Scientist
Location: Not California
Interests: Physics and Astronomy, Exoplanets, Singing praise to Valpurus while smashing skulls with a bloody warhammer, Jogging
Posts: 2,896
I like the adjusted lantern brightness, it looks good. Just food for thought though, here are two other potential solutions.

1) Give lanterns had a lifespan. Perhaps not the ones still attached to walls, that might be a little too sadistic, even by IVAN standards. But giving lanterns a lifespan could make for some fun hallway encounters, as well as make the player more reliant on other, more permanent light sources (like wall lanterns, or glowing blood, etc)

2) Don't let the player carry lanterns at all. Now this is problematic due to the need to navigate a dark dungeon - but building off of JoKe's comment, that problem could be resolved if the dungeon levels had an ambient light value which decreased as you went deeper. UT would probably work differently since it's a tunnel, and UT3 is actually closer to the surface than UT2. This would also make finding an adequate light source a more long-term problem.
Sep 27, 2016, 12:06 pm
#14
capristo's avatar
The Imperialist


Joined: Dec 2, 2007
Location: New Attnam
Interests: bananas
Posts: 2,195
Split into a new thread and I also like the LightLevelModifier option. That way you could force an area to be dark / lit by the environment even if the character is carrying a brighter source
Sep 27, 2016, 12:31 pm
#15
Joined: Apr 9, 2016
Occupation: Priestx of Sophos
Location: Standing on a big mine in GC1
Interests: the relation of queer crystal hyperfeminism and amphibious neutronium cybersocialist art
Posts: 258
Sil has an interesting mechanic - certain monsters emit darkness, so that you can't see what they are unless you stand close enough to them with a strong enough light source.

With IVAN's RGB colours, it might be possible to have some monsters/items/materials emit negative white light that dims everything equally, and others emit negative yellow light that makes everything look blue (without making it brighter).

This might even be useful to the player, if carrying around a darkness-producing item stops monsters from being able to chase them. Of course they would sacrifice the ability to read scrolls.

Hmm... IVAN colour data is packed into a single int rather than a struct, so modifying it to accept negative RGB values and blend them sensibly could be rather tricky. Also, lights are combined using max, so a negative light would have no effect.
Jump to