Current light implemented on #30 is very "blockly", this happens because each voxel face knows nothing about it's surrounding and light values has a huge step between then (~6,66%). The solution for this problem is to smooth lighting per-vertex per-faces using it's surrounding data.
While doing it, Ambient Occlusion can also be implemented, since both techniques are very similar.
In general, those goals should be accomplished:
Gather the light information of all neighbors, including edge (NW, SW, NE, SE) ones, this should be 54 neighboring voxels per voxel;
For each face, for each vertex, compute the avg value of 4 surrounding light neighbors. Also apply AO on this step;
Update faces_merge to only merge if all 4 vertices of the given face has the same value;
Step 1 should be the most complex one, since it can be very expensive, so a neat algorithm should be used.
Current light implemented on #30 is very "blockly", this happens because each voxel face knows nothing about it's surrounding and light values has a huge step between then (~6,66%). The solution for this problem is to smooth lighting per-vertex per-faces using it's surrounding data.
While doing it, Ambient Occlusion can also be implemented, since both techniques are very similar.
In general, those goals should be accomplished:
faces_merge
to only merge if all 4 vertices of the given face has the same value;Step 1 should be the most complex one, since it can be very expensive, so a neat algorithm should be used.