Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does Minecraft perform lighting? [closed]

Tags:

The only model I'm familiar with is diffuse lighting but this look way more complicated than that.

like image 998
Xavier Avatar asked Dec 26 '10 19:12

Xavier


People also ask

How does Minecraft's lighting work?

The light level depends on how many blocks the light can extend until it goes to light level 0, every block reducing a light level. For example if you were 3 blocks away from a Torch, then the light level would be 11. Torches are the most common source of light during the night.

How do you cover light in Minecraft?

Players can use carpets to hide light sources while maintaining the looks of their builds. Carpets are crafted using two wool blocks. Carpets look natural and can easily blend with the other colors in a build. Players can hide lighting on the floor and cover it with carpeting to prevent hostile mobs from spawning.

What gives off the most light in Minecraft?

By far, the brightest light source in Minecraft is the beacon. However, of all the Minecraft light sources, beacons might just be the most difficult to obtain. Beacons are highly sought after for their ability to shoot a bright beam into the sky that can be seen from far distances.


2 Answers

Each square has a light level from 15 to 0. Each level is 20% less than the level above it. If a square contains a light source it gets the luminosity of that light source, otherwise it gets one less than the brightest neighbor.

Sunlight is special, it suffers no vertical attenuation.

like image 143
Loren Pechtel Avatar answered Dec 12 '22 09:12

Loren Pechtel


While the answer by Loren is mostly correct, I’d like to add that the minecraftwiki has further information.

Sunlight and moonlight works by essentially making blocks with nothing but air and glass above glow with the current lightness (15 at day, 7 at night and something between at dusk/dawn)

The falloff described by Loren means that level 0 still has 0.8¹⁵·100% = 3.5% lightness (to quote my own edit in the minecraftwiki)

The smooth lighting intruduced with Beta 1.3 works by using the light values of the adjacent blocks to generate a gradient.

like image 34
flying sheep Avatar answered Dec 12 '22 10:12

flying sheep