Monday, October 24, 2022
HomeGame Developmentlighting - Daylight propogation with infinite peak?

lighting – Daylight propogation with infinite peak?


I am attempting to wrap my head round making use of voxel daylight propagation to a map with infinite peak.

My preliminary Concept was to have a height-map representing the very best block generated by the terrain noise, That means, I needn’t load any chunks to examine for daylight with generated terrain. However there are some points. Like updating terrain’s daylight by way of unloaded chunks:

. – Air, % – Not generated chunks # – Generated Terrain, 1 – Participant One, 2 – Participant Two

……………1

……………#

%%%%%

%%%%%

%%%%%

…….2…….

If Participant One is digging a gap by way of a flooring hundreds of blocks up from Participant Two, Then there could be inconsistencies. One other drawback, Is that the heightmap might probably need to go throught hundreds of air blocks to search out the following highest block.

The daylight solely propogates vertically, And it dissipates after round 60,000 blocks.

How can I propogate daylight with out loading vertical chunks?

I am not asking for code. I simply need to know the way to do that correctly.

Right here is how the sunshine part of the server works:

Is the terrain modified? In that case, Than run the daylight algorithim.

Daylight algorithim:
  Is topmost loaded chunk occluded? In that case, Than do not gentle the block.
  

  In any other case, Verify the lightmap. If the block is decrease than the lightmap worth: do not gentle

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments