Vibrant Lighting

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Vibrant Lighting

by runs » Post

For me Minetest is better than Minecraft. Well, I adore Minecraft a lot, is a great and eternal game indeed, but Minetest has something special for me.

But the worst thing for me is the lighting. When I play Minecraft I feel it quite diferent. The colors and light in Minetest are "sad" and "dull". I do not know the cause: textures? no shadows? no proper ambient light? no real dynamic lighting? bad fov?

Image
Minecraft

Image
Minetest

In this images the difference is obvious.

:-O

User avatar
ShallowDweller
Member
Posts: 77
Joined: Thu Nov 02, 2017 22:23

Re: Vibrant Lighting

by ShallowDweller » Post

I blame the texture pack you are using in minetest.
Well, I think the lighting could use some improvements, but there has already been a recent discussion about it, so I'm hoping the next MT version will have improved something.

One way to test if it is the texture's fault is by using MC's default resource pack and applying the textures to MT to see if anything feels better (be sure to post some screenshots if you do this test). With MC having access to 32x32 textures and forbiding everything else from doing the same, it could be the texture's sizes' fault.
I personaly don't see the lack of shadows as a problem. Unless a better lighting would require shadows, that is.

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: Vibrant Lighting

by paramat » Post

GayJesus,

What you 'complained' about was not a bug or a problem, everything is explained in detail your thread. What you got used to in MT 0.4.16 was the bug and the problem, then you did not like it when that was fixed. Your issue is irrelevant here as this thread is not about darkness in completely dark areas.

runs,

When i looked at your screenshots i actually assumed that MT was the top one and MC the bottom, because the top one looks so much worse: Washed out, little 3D definition, almost no shadow under that bridge, almost no ambient occlusion (ugly textures too).
I am surprised to discover that the screenshots are actually the other way around.
If that is your interpretation of these screenshots i think you have very strange visual taste.

Anyway, MC generally looks much better than your screenshot, so i assume you have chosen a poor example.
Textures have a big effect on appearence and i agree that default MTG textures are not great. Differing textures make this hard to judge.

MC does not have dynamic lighting / shadows as standard, so those features are irrelevant to the comparisom.
Ironically it is actually the MC screenshot here that is lacking shadows =)

User avatar
sorcerykid
Member
Posts: 1841
Joined: Fri Aug 26, 2016 15:36
GitHub: sorcerykid
In-game: Nemo
Location: Illinois, USA

Re: Vibrant Lighting

by sorcerykid » Post

I suspect the reason you're noticing deficiencies with Minetest lighting is because you are running an extremely obsolete version. The engine has improved a lot since 2013, including fixes to lighting. I would recommend upgrading to at least 0.4.17.

Image

User avatar
Hugues Ross
Developer
Posts: 72
Joined: Mon May 06, 2019 22:52
GitHub: Df458
Location: Kitchens, Pantries, etc.
Contact:

Re: Vibrant Lighting

by Hugues Ross » Post

This doesn't affect natural lights, but one thing that makes Minecraft's artificial lighting look much better is the way they color lights. It has been a while since I last played, but iirc artificial light isn't pure white, it gets tinted on a gradient from white (brightest) across the spectrum through yellow/orange/red as it darkens. This gives a more natural/dynamic feeling to the resulting light because it isn't perfectly uniform in color.

It wouldn't be hard to add this to Minetest as well, I actually hacked the feature together in a couple hours as a test a few months back.

User avatar
Hume2
Member
Posts: 709
Joined: Tue Jun 19, 2018 08:24
GitHub: Hume2
In-game: Hume2
Location: Czech Republic

Re: Vibrant Lighting

by Hume2 » Post

Hugues Ross wrote:This doesn't affect natural lights, but one thing that makes Minecraft's artificial lighting look much better is the way they color lights. It has been a while since I last played, but iirc artificial light isn't pure white, it gets tinted on a gradient from white (brightest) across the spectrum through yellow/orange/red as it darkens. This gives a more natural/dynamic feeling to the resulting light because it isn't perfectly uniform in color.

It wouldn't be hard to add this to Minetest as well, I actually hacked the feature together in a couple hours as a test a few months back.
This is a good idea actually. The light is now stored in two numbers: day light and night light. And the actual lighting is also affected by the current time. So it can be like this: (day light/ night light)
0/0 - complete darkness, lighting #000000 in both day and night
0/16 - lit darkness, lighting #FFC080 in both day and night
16/0 in the night - area lit by the Moon, lighting #202040
16/0 in the day - area lit by the Sun, lighting #FFFFFF
And you get the rest by linear combinations.
If you lack the reality, go on a trip or find a job.

User avatar
voxelproof
Member
Posts: 1087
Joined: Sat Aug 05, 2017 08:13
Location: Europe

Re: Vibrant Lighting

by voxelproof » Post

runs wrote:For me Minetest is better than Minecraft. Well, I adore Minecraft a lot, is a great and eternal game indeed, but Minetest has something special for me.

But the worst thing for me is the lighting. When I play Minecraft I feel it quite diferent. The colors and light in Minetest are "sad" and "dull". I do not know the cause: textures? no shadows? no proper ambient light? no real dynamic lighting? bad fov?

In this images the difference is obvious.

:-O
Maybe try to experiment a little with the MT advanced settings. As for me, although I'm fully aware of the shortcomings of the MT gfx, it's still good enough to have a pretty good time rambling across the awesome landscapes of the tweaked mapgens.

Image
Attachments
MT_New_World2.jpg
MT_New_World2.jpg (754.89 KiB) Viewed 2102 times
To miss the joy is to miss all. Robert Louis Stevenson

User avatar
sorcerykid
Member
Posts: 1841
Joined: Fri Aug 26, 2016 15:36
GitHub: sorcerykid
In-game: Nemo
Location: Illinois, USA

Re: Vibrant Lighting

by sorcerykid » Post

Hugues Ross wrote:This doesn't affect natural lights, but one thing that makes Minecraft's artificial lighting look much better is the way they color lights. It has been a while since I last played, but iirc artificial light isn't pure white, it gets tinted on a gradient from white (brightest) across the spectrum through yellow/orange/red as it darkens. This gives a more natural/dynamic feeling to the resulting light because it isn't perfectly uniform in color.

It wouldn't be hard to add this to Minetest as well, I actually hacked the feature together in a couple hours as a test a few months back.
There was a PR from 2017 that aimed to implement natural vs artificial light, but unfortunately it remains closed. Hopefully someone can pick up the reigns and get it working properly.

https://github.com/minetest/minetest/pull/5687

User avatar
Linuxdirk
Member
Posts: 3217
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: Vibrant Lighting

by Linuxdirk » Post

Hugues Ross wrote:This doesn't affect natural lights,
Actually this affects natural light, too. Minecraft’ lighting is just perfect. It has different light temperatures depending on what time it is and in what biome you are. This is barely notable but adds a lot to the overall look. Just check out the ice spikes and the swamp biome pictures. The effect is best visible in the sky.

https://minecraft.gamepedia.com/File:Ice_Spikes.png
https://minecraft.gamepedia.com/File:Swamp.png

Just open both images and flip back and forth between them to see the difference.
Hugues Ross wrote:but one thing that makes Minecraft's artificial lighting look much better is the way they color lights.
Absolutely. Colored lights are an absolute must-have in my opinion. Light from torches simply does not have the same color as light from the sun in a desert – which has a different light temperature than a dusky deep forest.

Irrlicht actually supports various colored dynamic lights with proper reflections and shadows but unfortunately this isn’t usable because how Minetest uses Irrlicht.

This guy uses an GLSL shader

User avatar
sorcerykid
Member
Posts: 1841
Joined: Fri Aug 26, 2016 15:36
GitHub: sorcerykid
In-game: Nemo
Location: Illinois, USA

Re: Vibrant Lighting

by sorcerykid » Post

Seeking core dev opinions:

How hard do you think it would be to implement dynamic lighting capabilities as shown in the video above into the engine?

I'm thinking this could be entirely separate from the existing precalculated lighting system, and would be simply a post-visual effect applied client-side during rendering (hence, getting param1 in mods would still return the current daylight vs nightlight value irrespective of the dynamic lights applied). If it were done that way, would it be feasible?

User avatar
Linuxdirk
Member
Posts: 3217
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: Vibrant Lighting

by Linuxdirk » Post

Yes, colored light being entirely visual in the client would be absolutely enough. Having it in the API so mods can access (read and write) this value would be a bonus (example use case: a mod that adds mobs that are afraid of red light but attracted to green light).

But every step forward would be a good step.

User avatar
Hume2
Member
Posts: 709
Joined: Tue Jun 19, 2018 08:24
GitHub: Hume2
In-game: Hume2
Location: Czech Republic

Re: Vibrant Lighting

by Hume2 » Post

For grass changing colour according to biome:

What if there was a texture modifier like ^[biome which took a file with tints and tinted the texture according the current humidity and temperature? The image with tints could be a square like this one: https://minecraft.gamepedia.com/File:Grasscolor.png
If you lack the reality, go on a trip or find a job.

Astrobe
Member
Posts: 571
Joined: Sun Apr 01, 2018 10:46

Re: Vibrant Lighting

by Astrobe » Post


User avatar
Hume2
Member
Posts: 709
Joined: Tue Jun 19, 2018 08:24
GitHub: Hume2
In-game: Hume2
Location: Czech Republic

Re: Vibrant Lighting

by Hume2 » Post

Today I spent 10 hours by trying to improve the lighting. The lighting code is so bloated, it is being calculated on many different places. And the handling of daylight is poor too, the lights should add up but they override each other instead. (eg. red + blue should result in purple but it results in blue instead) The "alpha" thing in lighting is a crap, there's nothing like translucent light. The light can be stronger or weaker but not translucent. To make the light weaker, reducing all RGB channels should be sufficient. Emitting a black light shouldn't do anything. Currently, Minetest is set so that emitting black light makes a shadow, which is completely wrong!
If you lack the reality, go on a trip or find a job.

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: Vibrant Lighting

by runs » Post

I feel like the sky is better in Minecraft. I mean the blue color, in Minetest is most a gray blue. Also the sunset, in Minecraft is more orangish.

I will be happy with a better sky color.

I think a slight improvement in this area, lighting-coloring would be cool.

User avatar
Hume2
Member
Posts: 709
Joined: Tue Jun 19, 2018 08:24
GitHub: Hume2
In-game: Hume2
Location: Czech Republic

Re: Vibrant Lighting

by Hume2 » Post

I agree there. Also the sky in Minetest seems to be nearly a plain colour while the other game uses a way more dramatic gradient.
If you lack the reality, go on a trip or find a job.

User avatar
Linuxdirk
Member
Posts: 3217
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: Vibrant Lighting

by Linuxdirk » Post

As posted earlier: Even within Minecraft the sky varies. Not only spectacular lighting in morning/evening situations (looks awesome with mountains in the background) but also between different biomes. It sometimes is barely noticeable but subliminally adds a lot of atmosphere to the game.

User avatar
Hume2
Member
Posts: 709
Joined: Tue Jun 19, 2018 08:24
GitHub: Hume2
In-game: Hume2
Location: Czech Republic

Re: Vibrant Lighting

by Hume2 » Post

Well, it could vary more then ;)
If you lack the reality, go on a trip or find a job.

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: Vibrant Lighting

by texmex » Post

Have you tried enabling tone mapping?

User avatar
Hume2
Member
Posts: 709
Joined: Tue Jun 19, 2018 08:24
GitHub: Hume2
In-game: Hume2
Location: Czech Republic

Re: Vibrant Lighting

by Hume2 » Post

texmex wrote:Have you tried enabling tone mapping?
It's slightly better but it doesn't actually solve the problem.
If you lack the reality, go on a trip or find a job.

User avatar
sorcerykid
Member
Posts: 1841
Joined: Fri Aug 26, 2016 15:36
GitHub: sorcerykid
In-game: Nemo
Location: Illinois, USA

Re: Vibrant Lighting

by sorcerykid » Post

Linuxdirk wrote:Yes, colored light being entirely visual in the client would be absolutely enough. Having it in the API so mods can access (read and write) this value would be a bonus (example use case: a mod that adds mobs that are afraid of red light but attracted to green light).
My thought is that dynamic colored lighting could be implemented as a special type of LuaEntitySAO, therefore no change to the database format or network protocol would even be required (I think). Here is a very basic specification that comes to mind:

Code: Select all

{
    visual = "light",
    visual_size = {x=1, y=1},
    light = {
        type = "spot", 
        color = "#FF000077",
        curve = 0.5
        focus = 1.0
    },
    collisionbox = { -0.5,0.0,-0.5, 0.5, 10.0, 5.0 }
    intensity = 1.0,
    is_visible = true,
}
The collisionbox property specifies the bounding box of the light. The light source is always located at {0,0,0}. In the case of "omni", the falloff is half the shortest dimension. Therefore, the bounding box should be specified as a cuboid with a center of {0,0,0} for an even falloff in all six directions. Otherwise, the falloff will be cropped. In the case of "spot" or "flat", the falloff is calculated as the length of ymax minus ymin. Therefore, the bounding box should be specified as a cuboid with ymin of zero and with a center of zero in the x and z dimensions, otherwise the falloff will be cropped.

The light.type specifies the light source type:
  • "omni" for a point light source
  • "spot" for elliptical beam (like from a par-can fixture)
  • "flat" for rectangular beam (like from a window opening)
  • "gobo" for a textured beam (like from a gobo projector)
The light.color property specifies the color of the light as projected onto the surface of objects. It may include an optional alpha channel for transparency, otherwise it will be rendered fully opaque.

The light.curve property specifies the brightness curve of the light from source to terminus, with 0.0 being fully logarithmic, 1.0 being fully exponential, 0.5 being linear fall-off. The terminus distance is determined by the height of the collisionbox.

The light.focus specifies the sharpness of the beam projection, with 0.0 being fully diffuse and 1.0 being fully sharp. The diffusion is applied inwardly from the collisionbox edges to the center. This property only applies to 'flat' and 'spot' light types.

The textures property specifies an 8-bit gobo mask to project onto the surface of objects tinted with the specified light color. If a spritesheet is defined, then the gobo mask will be animated. This property only applies to 'gobo' type lights.

User avatar
v-rob
Developer
Posts: 970
Joined: Thu Mar 24, 2016 03:19
GitHub: v-rob
IRC: v-rob
Location: Right behind you.

Re: Vibrant Lighting

by v-rob » Post

I think that we should add colored lighting, but there be a thing in the world file that states that there is colored lighting in that specific world, so Minetest will load the world with or without colored lighting depending on that world setting. If the Minetest world is loaded without color support, then any mods that use the colored lighting API in that world will be ignored or give an error unless the world is updated to the new system.

Of course, if we get true dynamic directional lighting, it either won't be stored in the world file or the world file will be broken anyway, so then will be the time to add colored lighting.
Core Developer | My Best Mods: Bridger - Slats - Stained Glass

User avatar
Hume2
Member
Posts: 709
Joined: Tue Jun 19, 2018 08:24
GitHub: Hume2
In-game: Hume2
Location: Czech Republic

Re: Vibrant Lighting

by Hume2 » Post

sorcerykid wrote: It may include an optional alpha channel for transparency, otherwise it will be rendered fully opaque.
What is an opaque light? Does it mean that you can't see through the beams? Or that the light overrides the textures so you can't see them through the light?
v-rob wrote:I think that we should add colored lighting, but there be a thing in the world file that states that there is colored lighting in that specific world, so Minetest will load the world with or without colored lighting depending on that world setting. If the Minetest world is loaded without color support, then any mods that use the colored lighting API in that world will be ignored or give an error unless the world is updated to the new system.
Or the world can be forced to convert into the new lighting format.
v-rob wrote:Of course, if we get true dynamic directional lighting, it either won't be stored in the world file or the world file will be broken anyway, so then will be the time to add colored lighting.
If you leave lighting completely on the renderer, you won't be able to use it in the game logic.
If you lack the reality, go on a trip or find a job.

Astrobe
Member
Posts: 571
Joined: Sun Apr 01, 2018 10:46

Re: Vibrant Lighting

by Astrobe » Post

sorcerykid wrote: My thought is that dynamic colored lighting could be implemented as a special type of LuaEntitySAO, therefore no change to the database format or network protocol would even be required (I think). Here is a very basic specification that comes to mind: [...]
That looks appetizing. Are those specs based on Irrlicht's known capabilities?

Two drawbacks though: static (e.g. lamps) colored lights are not addressed - I fear there that doing this with entities could be expansive at scale - and implementing e.g. a fireball that lights things on its way (or falling torches etc.) will require two entities. I guess in the latter case, the use is more "transient" and the possibly of attaching two entities will make things relatively easy, but hopefully Irrlicht won't have the "strange idea" that entities can block light.

Termos
Member
Posts: 417
Joined: Sun Dec 16, 2018 12:50

Re: Vibrant Lighting

by Termos » Post

runs wrote:I feel like the sky is better in Minecraft. I mean the blue color, in Minetest is most a gray blue.
Agreed.
Which one do you like better?

Image
Image

If you guys like it, I've got a PR ready to roll.
Attachments
screenshot_20200228_202645.png
screenshot_20200228_202645.png (156.81 KiB) Viewed 903 times
screenshot_20200228_201931.png
screenshot_20200228_201931.png (156.95 KiB) Viewed 903 times

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest