So, i think basically minecraft lighting should be improved. I'm not saying there should be vanilla shaders, but there could be some lighting changes.
Fist off i think lighing should be more atmoshperic. for example, torches give a yellowish light, whicle lava gives off a orange glow. sea lanterns would give of white (harsh) lighting. this could greatly improve the atmosphere in games by simulating ambient lighting and harsh lighting.
I also think lamps should be able to be brighter. as a builder, a problem that bothers me is that when you have a giant open space it is impossible to light it all without having light sources strewn all over the place, so what i think should be added is a super-lamp(obviously with different name), it would be able to light twice or three times as much area as a regular redstone lamp. also you would be able to make dimmer lamps so that you can also make a candle-like effect.
The other thing would be how to determine wether you have a bright lamp or a dim one. you could obviously have different crafting recipes, but it think it would be cool if it depended on the amount of redstone power. this is where a redstone feature could be introduced. what i was thinking is a block that can change the amount of redstone power going to a object, and then this could also lead to different features using differing redstone power. so basically it would work something like, 15 redstone power makes it ultra-bright, seven redstone power is normal, and 1 is the dimmest possible.
All things I think all builders would like, but unfortunately impossible with Minecraft's current lighting system. Colored lights aren't possible in the current engine, and as light values only go up to 15, lights cannot go any further than that.
All things I think all builders would like, but unfortunately impossible with Minecraft's current lighting system. Colored lights aren't possible in the current engine, and as light values only go up to 15, lights cannot go any further than that.
The strength can only go up to 15, but that's the strength in relation to game logic, not the renderer. The renderer could manipulate the strength to make light visually appear different. For instance, when generating the mixed lighting value for lighting blocks (both sky and block light rolled into a single 32-bit signed integer), they could simply raise the light value to some power to give it a certain amount of non-linear falloff (simulating realistic attenuation, ie light being much stronger near the source). Or multiply the light value to boost the intensity of light. Or a combination of both.
You can also do this within game logic too, collapse light from a 0..15 range to a 0..1 range (lightvalue / 15), then do the attenuation / intensity maths on this 0..1 light value, then bring it back to the 0..15 range, clamping within the range, if you want to avoid having to refactor existing code to support the move to 0..1 light. A better option is moving your existing code for mob spawning and such over to the 0..1 range, but, you can do it either way.
So, i think basically minecraft lighting should be improved. I'm not saying there should be vanilla shaders, but there could be some lighting changes.
Fist off i think lighing should be more atmoshperic. for example, torches give a yellowish light, whicle lava gives off a orange glow. sea lanterns would give of white (harsh) lighting. this could greatly improve the atmosphere in games by simulating ambient lighting and harsh lighting. This kind of already happens, except it's at a much smaller scale. Sea lanterns to my knowledge give off the maximum light level of 15, while torches give off a light level of 14. The colour of light is dependent on the intensity of both block and sky light. No sky light and low block light gives off reddish light, no sky light and mid block light gives off an orange / yellow colour to light, and high block light with no sky light gives off white light. To make torches give off more yellow light, you could either drop the luminance of torches to shift the colour back towards yellow, or, when the game goes to read the light map (quickly, it's a texture which stores a gradient, the game uses block and sky light as X and Y coordinates respectively, samples the light map, and the returned colour is the colour of light the game will use), as I said in my reply to jdc997, raise the light value to a power to make the sample non-linear. That is, even though there is a gap of 1 light level between torches and sea lanterns, the colour is treated as if there's a gap greater than 1 in light level. Still, I agree with this point, some more variation in light colour would serve as a good "midway point" towards proper coloured lighting.
I also think lamps should be able to be brighter. as a builder, a problem that bothers me is that when you have a giant open space it is impossible to light it all without having light sources strewn all over the place, so what i think should be added is a super-lamp(obviously with different name), it would be able to light twice or three times as much area as a regular redstone lamp. also you would be able to make dimmer lamps so that you can also make a candle-like effect. Problem. As jdc997 said, there's only 16 distinct levels of light in the game (0..15). The distance that light travels, simply, is determined by the intensity of light at a given block. The higher the light level, the further light travels nearby. So you can't just have light set to 15 (highest in the game currently) and have light spread further than it normally would. Unless, this block were to change the light opacity values of nearby blocks. Quickly, the way that light is spread is each block has 3 light values: block light, sky light and light opacity. We'll ignore sky light, just think of it as a somewhat different form of block light. For each block in the world, the game checks all 6 adjacent blocks (north, south, east, west, up, down). If an adjacent block has a light value greater than the current block, it's skipped. If it has a light value equal to or lower than the current block, the light value of the adjacent block is set to "current block's light value - adjacent block's light opacity". The light opacity determines how much light is deducted when light enters that block. The higher the opacity, the shorter light will spread from sources. This "super-lamp" could iterate / loop over all these blocks that it'll light up, then set the opacity to a lower value to allow light to spread further. The problem with this is it has to iterate / loop over all these blocks, in 3 dimensions, possibly every time light changes for a chunk, and you also have to take into account how should these blocks be reset when this "super-lamp" is removed. An alternative solution for this is simply placing multiple "fake" light sources. In other words, at certain locations nearby where the light is low enough, place an invisible and boundless block which the player can walk through and place blocks in (when they do, this "fake" source is removed and the "super-lamp" places another one nearby if it can). But, this leads to irregular lighting.
The other thing would be how to determine wether you have a bright lamp or a dim one. you could obviously have different crafting recipes, but it think it would be cool if it depended on the amount of redstone power. this is where a redstone feature could be introduced. what i was thinking is a block that can change the amount of redstone power going to a object, and then this could also lead to different features using differing redstone power. so basically it would work something like, 15 redstone power makes it ultra-bright, seven redstone power is normal, and 1 is the dimmest possible. Can't really comment on this as I myself don't use redstone that much, if at all.
Responses in bold.
Overall, solid suggestions, if you take into account my feedback, support.
yeah, basically what you said, it would probably work by dimming the light level every two blocks instead of just the adjacent one, thus increasing the distance by double, and maybe dimming it by two levels for dimmer lights instead of one, though i'm not an expert at the minecraft engine, so i don't know exactly if it would work. also by dimming the level for torches i mean something like 15 for sea lanters, 13 for glowstone, 10 for torches, and 8 for lava, or something along those lines. also couldn't colored light be inserted into the texture files, and depending on the data of the block it uses different texture files for the lighting. though like i said im not an expert at how minecraft works so i have no idea wether this would work or be worth the trouble of coding it.
also couldn't colored light be inserted into the texture files, and depending on the data of the block it uses different texture files for the lighting.
Could you elaborate on which specific texture you mean, and how you imagine it would be inserted?
Ideally, you wouldn't use textures at all. Rather you would be using code to generate RGB values per-block on-the-fly based on the colour of the source and how much sky light the block is receiving. What you could do is you'd compute an RGB value against block lighting, then blend between that and some other RGB value for sun/moon light using skylight as an alpha value:
outColour = sunlightColour * skylightIntensity + blocklightColour * (1.0 - skylightIntensity); // This would be the maths behind it.
outColour = mix(blocklightColour, sunlightColour, skylightIntensity); // This would use a built-in blend function for, say, GLSL, if available.
This assumes that the intensity of sky light is 0..1, rather than 0..15, of course. The problem with this is out in the sunlight, you have absolutely 0 block light, since it's being blended out by the sunlight intensity.
You also have to factor in blending light. I'm not completely sure if the game computes lighting for each source individually. I assume the way it works is sort of a cascade of updates. Basically, say you place down a torch. I assume the game updates that position, which causes the lighting algorithm to kick in. For all 6 neighbours, it takes the current block's light value, subtracts the neighbour's opacity from that value, then sets the neighbour's value to this new value, then triggers another update for that block, which repeats this until the new value reaches 0, then the game stops triggering updates, at which point it should have propagated light. I assume that's how it's done, I would love for some clarification, so yeah.
Mojang would have to modify this to take into consideration both the existing light colour and the new light colour, then blend them smoothly.
This could work without altering the old lighting system, although we would need an algorithm that will calculate light color and intensity based off of lighting source and mixing sources would most likely be difficult. Example: Torch is beside a lamp. Or torch is near a window.
This could work without altering the old lighting system, although we would need an algorithm that will calculate light color and intensity based off of lighting source and mixing sources would most likely be difficult. Example: Torch is beside a lamp. Or torch is near a window.
You would need to alter the old lighting system to add coloured lighting, because the existing lighting system doesn't support coloured lighting. The light map would result in coloured light looking very odd, so it needs to be replaced.
Rollback Post to RevisionRollBack
Author of the Clarity, Serenity, Sapphire & Halcyon shader packs for Minecraft: Java Edition.
The shader sonic either's unbelevable shaders, already does all this... BUT! If people dont want to mod their game, this is perfect!
SUPPORT!
SEUS does not do all of this.
Block light is the exact same colour no matter the source. The shaders mod / Optifine sends the light map to certain gbuffers shaders for lighting. Shader packs can take the light map coordinates (coordinates the shader uses to look up what colour light should be) and use them as light intensity values. 0 in the X axis corresponds to no block light, while 1 in the X axis corresponds to maximum block light. Similarly, 0 in the Y axis corresponds to no sky light, while 1 in the Y axis corresponds to maximum sky light. You're not given what type of block light is being produced by, rather just the intensity of light for each pixel, so when you go to create your own custom block lighting, every single source has the same colour of light. You could add a crude way of doing different colours of light by using some maths to blend between different colours based on the intensity, but it still isn't true coloured light.
About the closest thing SEUS has is coloured translucent shadows, which is quite different. The way shadows are done in games is the world is rendered from the perspective of the light source, and the distance between the camera and the current pixel being rendered from the light source (aka the depth) is stored inside a shadow map. Then what you do when you render everything else is you take your ordinary screen coordinates, convert those into coordinates from the perspective of the light source, and compare the new depth value with the one stored in the shadow map. You now have a way to calculate whether a given pixel on screen can be seen by the light (actually, you get the inverse of this back), and the hard part is done. Now just done some lighting calculation to generate colours, and voila, simple shadows. That's the gist, at least. The shaders mod / Optifine extends this by also storing the colour of the pixel the light can see, so not only do you have a simple shadow, but also the colour of the surface projecting that shadow. If the surface happens to be transparent, which isn't hard to calculate, you can simply swap out part of the calculations for calculating the colour of the shadow for the colour of the surface projecting that shadow.
Note how for coloured translucent shadows, you have a way of knowing what colour the source of the shadow is (and you also know the type of block it is, since the shaders mod / Optifine has a dedicated shader for shadow map rendering). Unlike this, lighting doesn't have a way of knowing what type of block is producing the light.
Rollback Post to RevisionRollBack
Author of the Clarity, Serenity, Sapphire & Halcyon shader packs for Minecraft: Java Edition.
this is a video where the peron does colored lighting at 5:20, so i think it would be possible, i don't know how he did it but it's just for the video so i don't think it would be impossible
this is a video where the peron does colored lighting at 5:20, so i think it would be possible, i don't know how he did it but it's just for the video so i don't think it would be impossible
He probably has a mod, which changed the engine to make it possible.
If it's not possible without massive work, it won't be added. Especially if it's just for decorative purposes.
Rollback Post to RevisionRollBack
Watch out for the crabocalypse. Some say the day will never come. But it will.
Feel free to drop by for a chat whenever.
If you'd like to talk with me about other games, here are a few I play.
Team Fortress 2
Borderlands series (Borderlands 2 is my favorite game, ever. TPS combat is a lot of fun and makes up for the lower-quality story, in my opinion)
Elder Scrolls series
Warframe (IGN is something like That_One_Flesh_Atronach)
Pokémon series (HGSS forever)
Rocket League
Fallout series
Left 4 Dead 2 (Boomer files always corrupt though)
SUPERHOT (SUPERHOT is the most innovative shooter I've played in years!)
Dead Rising series (Dead Rising 2 is one of my favorite games, and the 3rd was a lot of fun. 1st has poor survivor AI and the 4th is bad)
Just Cause series
Come to think of it, I mainly play fighting-based games.
this is a video where the peron does colored lighting at 5:20, so i think it would be possible, i don't know how he did it but it's just for the video so i don't think it would be impossible
I'm not saying it's impossible to add. I'm saying it's impossible to add with the lighting system the way it is currently.
It would certainly be possible for Mojang to rewrite the lighting system to support per-block coloured lighting, the problem is, that's rewriting a system that has its roots dug into everything and is holding on for dear life. For something that's mostly aesthetic, I don't think Mojang would rewrite the lighting system solely for coloured lighting. Perhaps they could rewrite it as a general optimisation pass, and might add support for coloured light. Perhaps they swap to using more traditional rendering techniques for rendering light, allowing for shadows and coloured lighting.
As for that specific video; two ways I think he could have done it. 1, using a coloured lighting mod, or 2, modifying the light map to instead be blue. Note how he only showed a blue lamp, that could be because all lamps give off blue light due to the modified light map.
Rollback Post to RevisionRollBack
Author of the Clarity, Serenity, Sapphire & Halcyon shader packs for Minecraft: Java Edition.
So, i think basically minecraft lighting should be improved. I'm not saying there should be vanilla shaders, but there could be some lighting changes.
Fist off i think lighing should be more atmoshperic. for example, torches give a yellowish light, whicle lava gives off a orange glow. sea lanterns would give of white (harsh) lighting. this could greatly improve the atmosphere in games by simulating ambient lighting and harsh lighting.
I also think lamps should be able to be brighter. as a builder, a problem that bothers me is that when you have a giant open space it is impossible to light it all without having light sources strewn all over the place, so what i think should be added is a super-lamp(obviously with different name), it would be able to light twice or three times as much area as a regular redstone lamp. also you would be able to make dimmer lamps so that you can also make a candle-like effect.
The other thing would be how to determine wether you have a bright lamp or a dim one. you could obviously have different crafting recipes, but it think it would be cool if it depended on the amount of redstone power. this is where a redstone feature could be introduced. what i was thinking is a block that can change the amount of redstone power going to a object, and then this could also lead to different features using differing redstone power. so basically it would work something like, 15 redstone power makes it ultra-bright, seven redstone power is normal, and 1 is the dimmest possible.
I have nothing here, go look somewhere else.
All things I think all builders would like, but unfortunately impossible with Minecraft's current lighting system. Colored lights aren't possible in the current engine, and as light values only go up to 15, lights cannot go any further than that.
Want to see my suggestions? Here they are!
I am also known as GameWyrm or GameWyrm97. You can also find me at snapshotmc.com
The strength can only go up to 15, but that's the strength in relation to game logic, not the renderer. The renderer could manipulate the strength to make light visually appear different. For instance, when generating the mixed lighting value for lighting blocks (both sky and block light rolled into a single 32-bit signed integer), they could simply raise the light value to some power to give it a certain amount of non-linear falloff (simulating realistic attenuation, ie light being much stronger near the source). Or multiply the light value to boost the intensity of light. Or a combination of both.
You can also do this within game logic too, collapse light from a 0..15 range to a 0..1 range (lightvalue / 15), then do the attenuation / intensity maths on this 0..1 light value, then bring it back to the 0..15 range, clamping within the range, if you want to avoid having to refactor existing code to support the move to 0..1 light. A better option is moving your existing code for mob spawning and such over to the 0..1 range, but, you can do it either way.
Responses in bold.
Overall, solid suggestions, if you take into account my feedback, support.
Author of the Clarity, Serenity, Sapphire & Halcyon shader packs for Minecraft: Java Edition.
My Github page.
The entire Minecraft shader development community now has its own Discord server! Feel free to join and chat with all the developers!
yeah, basically what you said, it would probably work by dimming the light level every two blocks instead of just the adjacent one, thus increasing the distance by double, and maybe dimming it by two levels for dimmer lights instead of one, though i'm not an expert at the minecraft engine, so i don't know exactly if it would work. also by dimming the level for torches i mean something like 15 for sea lanters, 13 for glowstone, 10 for torches, and 8 for lava, or something along those lines. also couldn't colored light be inserted into the texture files, and depending on the data of the block it uses different texture files for the lighting. though like i said im not an expert at how minecraft works so i have no idea wether this would work or be worth the trouble of coding it.
I have nothing here, go look somewhere else.
Could you elaborate on which specific texture you mean, and how you imagine it would be inserted?
Ideally, you wouldn't use textures at all. Rather you would be using code to generate RGB values per-block on-the-fly based on the colour of the source and how much sky light the block is receiving. What you could do is you'd compute an RGB value against block lighting, then blend between that and some other RGB value for sun/moon light using skylight as an alpha value:
This assumes that the intensity of sky light is 0..1, rather than 0..15, of course. The problem with this is out in the sunlight, you have absolutely 0 block light, since it's being blended out by the sunlight intensity.
You also have to factor in blending light. I'm not completely sure if the game computes lighting for each source individually. I assume the way it works is sort of a cascade of updates. Basically, say you place down a torch. I assume the game updates that position, which causes the lighting algorithm to kick in. For all 6 neighbours, it takes the current block's light value, subtracts the neighbour's opacity from that value, then sets the neighbour's value to this new value, then triggers another update for that block, which repeats this until the new value reaches 0, then the game stops triggering updates, at which point it should have propagated light. I assume that's how it's done, I would love for some clarification, so yeah.
Mojang would have to modify this to take into consideration both the existing light colour and the new light colour, then blend them smoothly.
Author of the Clarity, Serenity, Sapphire & Halcyon shader packs for Minecraft: Java Edition.
My Github page.
The entire Minecraft shader development community now has its own Discord server! Feel free to join and chat with all the developers!
This could work without altering the old lighting system, although we would need an algorithm that will calculate light color and intensity based off of lighting source and mixing sources would most likely be difficult. Example: Torch is beside a lamp. Or torch is near a window.
--------------
You would need to alter the old lighting system to add coloured lighting, because the existing lighting system doesn't support coloured lighting. The light map would result in coloured light looking very odd, so it needs to be replaced.
Author of the Clarity, Serenity, Sapphire & Halcyon shader packs for Minecraft: Java Edition.
My Github page.
The entire Minecraft shader development community now has its own Discord server! Feel free to join and chat with all the developers!
The shader sonic either's unbelevable shaders, already does all this... BUT! If people dont want to mod their game, this is perfect!
SUPPORT!
"Move along people,nothing to see Here" Quote from a extremely suspicious person.
SEUS does not do all of this.
Block light is the exact same colour no matter the source. The shaders mod / Optifine sends the light map to certain gbuffers shaders for lighting. Shader packs can take the light map coordinates (coordinates the shader uses to look up what colour light should be) and use them as light intensity values. 0 in the X axis corresponds to no block light, while 1 in the X axis corresponds to maximum block light. Similarly, 0 in the Y axis corresponds to no sky light, while 1 in the Y axis corresponds to maximum sky light. You're not given what type of block light is being produced by, rather just the intensity of light for each pixel, so when you go to create your own custom block lighting, every single source has the same colour of light. You could add a crude way of doing different colours of light by using some maths to blend between different colours based on the intensity, but it still isn't true coloured light.
About the closest thing SEUS has is coloured translucent shadows, which is quite different. The way shadows are done in games is the world is rendered from the perspective of the light source, and the distance between the camera and the current pixel being rendered from the light source (aka the depth) is stored inside a shadow map. Then what you do when you render everything else is you take your ordinary screen coordinates, convert those into coordinates from the perspective of the light source, and compare the new depth value with the one stored in the shadow map. You now have a way to calculate whether a given pixel on screen can be seen by the light (actually, you get the inverse of this back), and the hard part is done. Now just done some lighting calculation to generate colours, and voila, simple shadows. That's the gist, at least. The shaders mod / Optifine extends this by also storing the colour of the pixel the light can see, so not only do you have a simple shadow, but also the colour of the surface projecting that shadow. If the surface happens to be transparent, which isn't hard to calculate, you can simply swap out part of the calculations for calculating the colour of the shadow for the colour of the surface projecting that shadow.
Note how for coloured translucent shadows, you have a way of knowing what colour the source of the shadow is (and you also know the type of block it is, since the shaders mod / Optifine has a dedicated shader for shadow map rendering). Unlike this, lighting doesn't have a way of knowing what type of block is producing the light.
Author of the Clarity, Serenity, Sapphire & Halcyon shader packs for Minecraft: Java Edition.
My Github page.
The entire Minecraft shader development community now has its own Discord server! Feel free to join and chat with all the developers!
this is a video where the peron does colored lighting at 5:20, so i think it would be possible, i don't know how he did it but it's just for the video so i don't think it would be impossible
I have nothing here, go look somewhere else.
He probably has a mod, which changed the engine to make it possible.
If it's not possible without massive work, it won't be added. Especially if it's just for decorative purposes.
Watch out for the crabocalypse. Some say the day will never come. But it will.
Feel free to drop by for a chat whenever.
If you'd like to talk with me about other games, here are a few I play.
Team Fortress 2
Borderlands series (Borderlands 2 is my favorite game, ever. TPS combat is a lot of fun and makes up for the lower-quality story, in my opinion)
Elder Scrolls series
Warframe (IGN is something like That_One_Flesh_Atronach)
Pokémon series (HGSS forever)
Rocket League
Fallout series
Left 4 Dead 2 (Boomer files always corrupt though)
SUPERHOT (SUPERHOT is the most innovative shooter I've played in years!)
Dead Rising series (Dead Rising 2 is one of my favorite games, and the 3rd was a lot of fun. 1st has poor survivor AI and the 4th is bad)
Just Cause series
Come to think of it, I mainly play fighting-based games.
I'm not saying it's impossible to add. I'm saying it's impossible to add with the lighting system the way it is currently.
It would certainly be possible for Mojang to rewrite the lighting system to support per-block coloured lighting, the problem is, that's rewriting a system that has its roots dug into everything and is holding on for dear life. For something that's mostly aesthetic, I don't think Mojang would rewrite the lighting system solely for coloured lighting. Perhaps they could rewrite it as a general optimisation pass, and might add support for coloured light. Perhaps they swap to using more traditional rendering techniques for rendering light, allowing for shadows and coloured lighting.
As for that specific video; two ways I think he could have done it. 1, using a coloured lighting mod, or 2, modifying the light map to instead be blue. Note how he only showed a blue lamp, that could be because all lamps give off blue light due to the modified light map.
Author of the Clarity, Serenity, Sapphire & Halcyon shader packs for Minecraft: Java Edition.
My Github page.
The entire Minecraft shader development community now has its own Discord server! Feel free to join and chat with all the developers!