Light

From Minecraft Wiki
Jump to: navigation, search
Illumination
Eleven different layers of brightness

Lighting in Minecraft affects visibility, Mob spawning, tree growth, and whether flowers and mushrooms will stay planted. Lighting can be provided by sunlight, torches, fire, lava, in-use furnaces, and certain other objects.

Contents

[edit] History

Minecraft has gone through many different ways to light the world. Classic’s model is simple and only checks whether a block is exposed to the sky. Indev’s model is more complex and considers a block’s distance from the nearest sunlight and from the nearest light-emitting block. Alpha’s model is a refinement of Indev’s, calculating sunlight and block-emitted light separately and using a different scale of light intensities. An earlier Beta update improved upon Alpha's model by adding the smooth lighting option, and in a later Beta update, the whole lighting engine was again rewritten to be much more efficient, have more detail, and be smooth in transition of lighting differentials.

[edit] Classic

Light in Classic

In Classic, “sunlight” is emitted by the top edge of the map and will hit any block that is under it. It will pass through transparent blocks to light blocks underneath. Blocks that do not receive light are in a dim shadow that remains at the same level of brightness no matter how far they are from a light source.

[edit] Indev/Infdev

In Indev and Infdev versions there are 16 degrees of brightness, with a maximum of 15 for full daylight and a minimum of 0 for almost complete darkness. Brightness is a linear scale and represents its value divided by 15, so for example 15 is 100% (1515) and 13 is 86.67% (1315).

Each block that emits light has its own luminance value and the light value diminishes by one level each block from its source. If the neighbouring block already has a greater light value, it is ignored. The process is repeated for each block whose light value just changed.

During the day, sunlight has a maximum light value of 15. At dusk, it steadily decreases until it reaches a night-time minimum value of 4 representing moonlight. Sunlight is emitted by the top edge of the map, but does not diminish with distance from its “source”. A block lit by sunlight will be equally bright at any height or depth.

[edit] Alpha - Beta 1.2_02

Lighting in Alpha through pre-Beta 1.3 works as Indev and Infdev, except that the scale is different and is not linear.

Full daylight provides the maximum brightness of 15. Each value below this is 80% as bright as the one above it. For example, 14 is 80% as bright as sunlight, and 13 is 64% bright. This means that Level 0 still has 0.8¹⁵·100% = 3.5% of the maximum brightness.

Sunlight in Alpha have their own light array and a behind-the-scenes optimization to make dawn and dusk smoother: the amount of light from the sky is pre-calculated and saved along with the blocks, because it never needs to change except when blocks are added or removed. During dusk, nighttime, and dawn, a "darkness" value is subtracted from the sky to create the effects of different times of day.

In the Nether, light decreases by 10% each level, rather than the normal 20%. This means it will never be totally dark in the Nether. The minimum light value is 20.59%, providing a permanent dim ambiance equivalent to normal world's level 8.

[edit] Beta 1.3 - Beta 1.7.3

Lighting from Beta 1.3 to 1.7.3 works the same as how it was in Alpha, but is greater optimized to allow smooth lighting.

[edit] Beta 1.8 - Present

Beta 1.8 pre-release light spectrum during day. The X axis represents exposure to block light sources (i.e.: torches) while the Y axis represents exposure to sunlight
Beta 1.8 pre-release light spectrum during night. The Y axis is colored slightly blue and represents the total exposure to moonlight
Lighting in the Void. Particles and entities are illuminated based on the light level at level 0, and the void fog is gone, as the player is in direct view of sunlight

In Beta 1.8, a new lighting engine was implemented. The new engine has added and changed these following:

[edit] Smooth Lighting

Difference between Smooth Lighting on and off

Smooth Lighting (which includes ambient occlusion as well as interpolating lighting across block faces) is a lighting engine added in Beta 1.3, with the help of MrMessiah.[1] This lighting engine is set on by default, and can be enabled or disabled by accessing Video Options from the Options menu.

The engine blends lighting to add semi-realistic shadows and glowing from light sources. It darkens inside corners, resulting in small spaces appearing much darker. Before Beta 1.3, the feature could only be obtained by modifying the game with the help of MrMessiah's BetterLight mod.[2]

[edit] Known Bugs

[edit] Gallery

[edit] Effects of light

[edit] Light and Non-Opaque Blocks

How ice affects light. Click through to see it animated between ice and water.

Transparent blocks do not affect the light spread, unlike solid ones which will stop the light from being transmitted any further. This includes glass, water, ice, portal interiors, and so forth. See Opacity for a full list.

Certain blocks will only allow light to pass through diffusely. These are water and ice, which reduce light by an additional 2 levels per block, and leaves, which diffuse sunlight but only reduce light by the normal 1 level per block.

[edit] Light-emitting blocks

Blocks that emit light

The following values are the brightness of the block itself. The light emitted decreases by one for each square of distance from the light source. Glass does not diminish the light that passes through it, but water or ice reduces light that passes through it by 3 (2 for passing through +1 for normal block decrease). In Minecraft's source code, the luminescences are defined using the floating point values in the third column. In a weird quirk, these floating point numbers are fractions of 16, but are multiplied by 15 to get the integer light value. This means that both 0/16 and 1/16 (0.0 and 0.0625) correspond to the integer light value 0.

Block Light Level Brightness Data Value
(Sunlight) 15 100% 1.0F
Fire 15 100% 1.0F
Jack-O-Lantern 15 100% 1.0F
Lava 15 100% 1.0F
Glowstone 15 100% 1.0F
Locked Chest 15 100% 1.0F
Torch 14 80% 0.9375F
Lit Furnace 13 64% 0.875F
(Sunlight, when raining or snowing) 12 51.2% 0.8125F
Portal 11 40.96% 0.75F
Redstone ore, when touched 9 26.21% 0.625F
Redstone repeater, when active 9 26.21% 0.625F
Lit redstone torch 7 16.78% 0.5F
(Moonlight) 4 8.59% 0.3125F
Brown Mushroom 1 4.40% 0.125F
Dragon Egg 1 4.40% 0.125F
Brewing Stand 1 4.40% 0.125F
Lighting "total blackness" bug in Beta 1.6.6.
Lighting glitch in a Stronghold in Beta 1.8.1.
1.8.1 (during nighttime) No moonlight, only torch.
1.8.1 (during nighttime) Moonlight and torch.
1.8.1 (during nighttime) Only moonlight, no torch.

[edit] References

  1. http://notch.tumblr.com/post/3446675806/minecraft-beta-1-3
  2. http://www.minecraftforum.net/viewtopic.php?f=25&t=55700 - Minecraft Forums - MrMMods (BetterLight|Grass, SimpleMap) 1.8.1
Personal tools
Namespaces
Variants
Actions
Minecraft Wiki
Minecraft
Toolbox
In other languages

Recent Community Articles

Mojang Tweets

    Getting your tweets...