26

I understand that light levels decrease by 1 each block farther away from the source you get, but is that measured diagonally as well as along the axes? Another way of asking this is: does a light source illuminate a square area around it or a diamond-shaped area?

Also, does light spread around corners? And if so can it "turn" more than once? In other words, if you put a torch on a pillar will things on the opposite side of the pillar receive any light?

3 Answers 3

25
+50

A light source illuminates a diamond (it doesn't "travel" diagonally).

Light does spread around corners, but does not travel through most solid objects. A torch placed on a pillar will provide light on the opposite side, but the light has to travel around the piller. The open space immediately adjacent to the piller and opposite the torch, is 2 spaces away, but takes the light 4 spaces to go around the piller. Therefore, from a starting light level of 14 at the torch, the open space will have a light level of 10, in the abscence of another source of light.

1
  • 13
    An easy way to visualize this is to turn off the "fancy" lighting in Minecraft's video options. This will cause each block to have a uniform amount of illumination across its surface, with harsh transitions at the edges. This makes the light levels — and the "diamond" effect — clearly visible.
    – Ben Blank
    Commented May 5, 2011 at 18:33
3

As day breaks, or the sun sets, you will see the light (or darkness) 'ripple' out into the distance. This is because all visible chunks needs to be updated as the global light level changes, and your computer can't do this large operation quickly enough for it to appear seamless. Chunks are updated in an order starting with the ones closest to you and finishing with the ones furthest away.

For this reason, you will see the dawn light ripple away from you in all directions, and the speed of light spreading is determined by the speed of your computer, and how fast it can update the new chunks.

3
  • Bah, I hate it when I read the question title, write an answer, then read the question body.
    – fredley
    Commented Aug 18, 2011 at 20:57
  • 2
    Still, it's a neat tidbit about the "speed of light" in Minecraft. :-)
    – Ben Blank
    Commented Aug 18, 2011 at 21:24
  • 1
    And with the update of the lighting engine in 1.8 (whenever that actually comes out), it won't be valid :(. The transition from day to night and back takes place on a different 'lighting layer', and is instant across all chunks, since chunks won't need to independently update upon the day->night transition.
    – thedaian
    Commented Aug 18, 2011 at 21:58
-2

it uses the bucket-fill aka flood-fill algorithm to do it - you can google it. https://en.wikipedia.org/wiki/Flood_fill

1
  • 3
    It's better to paraphrase the content in the source you're linking instead of just a plain link to it. Also, this doesn't really provide much more than what it would be if you edited this into the accepted answer.
    – Riking
    Commented Jun 13, 2013 at 18:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.