0
\$\begingroup\$

Chaps, I'm sure we all know at a high level how Minecraft's lighting engine works. Light sources flood surrounding blocks with light, which themselves flood their neighbors and so forth. However, I believe this doesn't fully explain the picture. For example, consider this image:

Image 01

Clearly the vertical faces of the sand are lower light level than the horizontal faces. With the left faces being even darker than the front faces. I'm unable to see how any incarnation of the above method would produce such results - all faces are exposed to sunlight, they should all be the same brightness surely...

Does Minecraft use an additional layer of OpenGL diffuse lighting? If so, where is the light source? The Sun? What about in caves? Any insight on this would be much appreciated - Many Thanks!!!

\$\endgroup\$
2
  • \$\begingroup\$ Minecraft uses an additional layer of direction-based lighting. E.g. the bottom of a block is always half as bright as the top would be at the same light level. Horizontal faces are alternately 60% or 80% as bright. \$\endgroup\$ – user253751 Jun 6 '16 at 8:16
  • \$\begingroup\$ This is NOT a duplicate of the linked question. \$\endgroup\$ – user253751 Jun 6 '16 at 8:16
0
\$\begingroup\$

Last time I checked the cel based approach was popular (and I believe minecraft does something similar)

That said here's a previous answer to this problem:

How can I implement lighting in a voxel engine?

\$\endgroup\$

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