Concerning your Update sync.
Page 1 of 1
Concerning your Update sync.
In your previous mesage you write :
It's "funny", because I faced exactly the same problem !
Why I did to sort this out is :
For the "gaps" : I had this problem with face culling that are in a chunk border. it's obvious : if multiples chunks needs to be updated after a user created/remove a cube then the chunk rebuild order matters. If I place a seethrough block (= Replacing a block by air = Destroying), then all neighbor chunks must be rebuilt and send to graphic card first, and after that only I can refresh the chunk where the modification did happens. And it's in the other order (block chunk first, neighbor chunks after) if the bloc is blocking light !
For the Light, what I did : When a block is modified, I created a cube range depending on what is the maximum light influence this block could have.
ex : Let's say that that maximum light propagation is 16, then the range will be (For a block located at X, Y, Z) : Min : X - 8, 0 , Z - 8, Max : X + 8, 127, Z + 8.
I do a light source refreshing inside this range.
And after a light propagation on this range + 1 (To take into account the light surrending this refreshed range), so in our case the range will be : Min : X - 9, 0 , Z - 9, Max : X + 9, 127, Z + 9.
Hope it could help you !
The update logic is a bugbear of mine and is basically working at the moment but i am far from happy with it. There are times you can briefly see 'gaps' when you build or dig and the light can visibly update over a few frames. The infrastructure is in place to rework this and it will be something i undertake in the near future, hopefully to get it back to instant updates with no gaps or partial updates.
I have noticed that on occasion the light doesn't look right, and when you build or dig a block in the wrong looking area it corrects itself. Again, this is the update logic problem and hopefully will be fixed soon.
It's "funny", because I faced exactly the same problem !
Why I did to sort this out is :
For the "gaps" : I had this problem with face culling that are in a chunk border. it's obvious : if multiples chunks needs to be updated after a user created/remove a cube then the chunk rebuild order matters. If I place a seethrough block (= Replacing a block by air = Destroying), then all neighbor chunks must be rebuilt and send to graphic card first, and after that only I can refresh the chunk where the modification did happens. And it's in the other order (block chunk first, neighbor chunks after) if the bloc is blocking light !
For the Light, what I did : When a block is modified, I created a cube range depending on what is the maximum light influence this block could have.
ex : Let's say that that maximum light propagation is 16, then the range will be (For a block located at X, Y, Z) : Min : X - 8, 0 , Z - 8, Max : X + 8, 127, Z + 8.
I do a light source refreshing inside this range.
And after a light propagation on this range + 1 (To take into account the light surrending this refreshed range), so in our case the range will be : Min : X - 9, 0 , Z - 9, Max : X + 9, 127, Z + 9.
Hope it could help you !
S33m3- Posts : 54
Join date : 2011-03-23
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|
Fri Jul 01, 2016 7:25 am by croxxx
» Source?
Thu Jul 12, 2012 9:55 am by raistlinthewiz
» Version Available (Take 2)
Sat Jun 09, 2012 3:23 am by kamild1996
» Terrain Rendering Bug
Thu May 17, 2012 8:07 am by sackboy789
» Mystery Block!
Thu Mar 29, 2012 4:42 am by Corvin73
» Your procedural tree/plant seeding technique?
Sat Mar 24, 2012 3:10 am by Slaihne
» Voxeliq project
Wed Mar 07, 2012 4:25 am by raistlinthewiz
» What is a Tech-Test?
Wed Jan 18, 2012 12:32 pm by joeydmars
» Images
Fri Jan 06, 2012 6:02 am by croxxx