照明。
11种不同的亮度。
在Minecraft的亮度影响能见度,生物的出现,树木的生长,以及花和蘑菇会否留下。照明只可以由阳光,火把,火,岩浆,使用中的熔炉,和某些其他对象提供.
历史
Minecraft已经用过了许多不同的方式来照亮这个世界。Classic的照明十分简单,只检查方块是否暴露在天空下。Indev的照明更为复杂并考虑一个方块与最近的阳光和最近的发光方块的距离。Alpha的照明是Indev的细化,分别计算阳光和方块发出的光并利用不同规模的光照强度。早期的Beta更新加入改善Alpha照明的平顺照明选项,而在后期的Beta更新中,整个照明引擎再次被改写来提高效率,有更多的细节,和平稳过渡照明差距。
Classic
在Classic中的亮光。
在Classic中,“阳光”在地图上方边缘发出亮光,并将碰触到其下的任何方块。它将通过透明方块来照亮其下的方块。接收不到光的方块会在昏暗的阴影中,不管它们离光源多远,仍然会是相同的亮度水平。
Indev/Infdev
在Indev和Infdev版本中有16个程度的亮度,最大的15是直接在日光下,最低0是几乎完全黑暗。亮度使用一个线性尺度并表示其值除以15,例如100%是15(15⁄15)而13是86.67% (13⁄15)。
每方块发光都有其自身亮度值,光值每离源头多一个方块,亮度会减少一个级别。如果相邻方块已经有一个更大的光值,它将被忽略,并为每个刚刚改变其亮度值的方块重复这个过程。
白天,阳光具有最大的光值15。黄昏时分,它稳步下降直到它到达一个4的代表月光的夜间最低值。阳光从地图顶部发光,但与“光源”的距离并没有减弱其亮度。在任何高度或深度由太阳光照亮了的方块将有同样亮度。
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.
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.
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:
- The lighting of an area is influenced by the type of light source that is lighting the block: moonlight gives a blue tint, torches and lava give a reddish tint, and complete darkness and sunlight are the same as before.
- Changes in lighting are now instant, and can be gradual as changes in the time of day and the state of rainfall now smoothly change the lighting value rather than individually updating the lighting of chunks one by one.
- Using the new instant lighting, non-sunlight lighting now subtly flickers, although this feature is purely cosmetic and has no effect on gameplay.
- Sunset is much more intense and realistic than before, and it's intensity dims if the player turns away from it.
- At extreme depths, black fog closes in. At the bedrock level, a torch can no longer be seen from 11 squares distance. This effect is inhibited by proximity to open sky (i.e. the degree to which the place where you are standing would be lit by sunlight), whether or not the sun is currently up.
- When inside the void. Lighting operates similar to Classic, where objects in the void will remain at a constant brightness, regardless of how far they travel away from a light source, provided that they remain directly underneath an opening into the void. The brightness of the particular "column" of space is based on the current light level at level 0, the bottom bedrock layer. This applies to all entities, as well as particles.
- Additionally, sitting in the void underneath a shaft which allows sunlight directly into it will remove the void fog, regardless to whether is it daytime or not.
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]
Known Bugs
- There are lighting bugs on ice and portals when Smooth Lighting is turned on, since the transparency is made by the game, not the textures.
- The shading on both still and flowing liquids is not smoothed when Smooth Lighting is on.
- Smooth lighting doesn't seem to have an effect on paintings.
- Glass, if placed directly on another surface, will cast a shadow.
- Smooth lighting doesn't affect players and items when moving from block to block.
- On rare occasions light can render in areas with no light emitting objects whatsoever. This possibly happens when older Minecraft version worlds are loaded into newer versions.
Gallery
- Indoor off.png
Indoor, Smooth Lighting Off
- Indoor on.png
Indoor, Smooth Lighting On
- Outdoor night off.png
Outdoor Night, Smooth Lighting Off
- Outdoor night on.png
Outdoor Night, Smooth Lighting On
- Outdoor off.png
Outdoor, Smooth Lighting Off
- Outdoor on.png
Outdoor, Smooth Lighting On
Effects of light
- Hostile mobs, excluding slimes, zombie pigmen and ghasts, require a light level of 7 or less to spawn.
- The Halloween Update version Alpha 1.2.0 allowed monsters to spawn in higher light levels at lower depths, using the formula 16 - (Layer ÷ 8). At level 8 and below, mobs could spawn even in sunlight. Notch reverted mob spawning to the original method in version Alpha 1.2.1, saying, "it was far too annoying. I have plans on what to do with this."
- Blazes require light level 12 or less to spawn.
- Planted Flowers and Saplings will stay in the ground at light level 8 or higher. They will also stay in the ground if there are no blocks between them and the sky, regardless of light level.
- Mushrooms only survive at light level 12 or less.
- Snow and ice will melt at light level 12 or higher, and won't form at light levels above 10. Sunlight is ignored.
- Trees will grow if the light in the block above a sapling is 9 or higher.
- Crops will only grow in light level 9 or higher.
- Grass will only spread in light level 4 or higher.
- Ambience is triggered by chambers at least 3x3 that are entirely at light level 8 or lower.
- Spiders and Cave Spiders will only become hostile at light level 11 or lower.
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.
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.
| Icon | Block | Light Level | Brightness | Data Value |
|---|---|---|---|---|
| (Sunlight) | 15 | 100% | 1.0F | |
| Fire | ||||
| Jack-O-Lantern | ||||
| Lava | ||||
| File:Glowstone (Block).png | Glowstone | |||
| File:Locked Chest.png | Locked Chest | |||
| End Portal Block | ||||
| File:Redstone Lamp (Active).png | Redstone Lamp, when active | |||
| Torch | 14 | 80% | 0.9375F | |
| File:Furnace (Active).png | Lit Furnace | 13 | 64% | 0.875F |
| (Sunlight, when raining or snowing) | 12 | 51.2% | 0.8125F | |
| Nether Portal Block | 11 | 40.96% | 0.75F | |
| File:Redstone (Ore).png | Redstone Ore, when touched | 9 | 26.21% | 0.625F |
| Redstone Repeater, when active | ||||
| File:Redstone (Torch, Active).png | Lit Redstone Torch | 7 | 16.78% | 0.5F |
| (Moonlight) | 4 | 8.59% | 0.3125F | |
| Brown Mushroom | 1 | 4.40% | 0.125F | |
| Brewing Stand | ||||
| Dragon Egg |
- Since the 1.8 lighting update, some players experience a lighting glitch where all entities appear black. This bug can be fixed by typing 'Light' in the SinglePlayer Commands mod.
[来源请求] - There is a bug in 1.8 which causes light levels to remain higher than they should be over water.
- There is currently a bug where naturally generated Torches in Abandoned Mineshafts or NPC Villages and Glowstone in The Nether do not always emit light and remain dark until there is a lighting update.
References
- ↑ http://notch.tumblr.com/post/3446675806/minecraft-beta-1-3
- ↑ http://www.minecraftforum.net/viewtopic.php?f=25&t=55700 - Minecraft Forums - MrMMods (BetterLight|Grass, SimpleMap)
