How does the lighting engine work? #101
-
The Veloran Book mentioned that the terrain could be several kilometers high. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The world can be many kilometres high, yes. The maximum bounds of a chunk are also very large. However, most chunks have a bound that sits far below the upper limit. We achieve this by giving each chunk:
With this strategy, we're able to place chunks at almost any position in the vertical axis without incurring any substantial overhead. Very tall (i.e: where the distance between the lowest and highest blocks is large) chunks do incur a slightly larger overhead for lighting, and indeed it is possible (using build mode) to create very tall chunks indeed, which can take a long time to calculate lighting for. In practice, we've made sure that such extreme cases never appear naturally. There's more detailed information about how this approach works in this blog post. Other than that, the voxel lighting (distinct from point lights such as lanterns) is broadly similar to that of Minecraft's floodfill lighting. |
Beta Was this translation helpful? Give feedback.
The world can be many kilometres high, yes. The maximum bounds of a chunk are also very large. However, most chunks have a bound that sits far below the upper limit. We achieve this by giving each chunk:
With this strategy, we're able to place chunks at almost any position in the vertical axis without incurring any substantial overhead.
Very tall (i.e: where the distance between the lowest and highest blocks is large) chunks do incur a slightly larger overhead for lighting, and indeed it is possible (using build mode) to create very tall chunks indeed, which can take a long time to calculate lig…