Closed GoogleCodeExporter closed 9 years ago
Implementation / design ideas:
1. Add a 3-float color to each cube point (but for now, we just assume the same
light)
1.1: What if it comes from a 30 degree angle, so the left sides are more
visible, then front, then top etc.. Math is basically just take the dot-product
and apply the light constant.
2. Apply a top-to-bottom "sun" cast, where any cube that faces (sans
obstruction) up; value is 1
3. For each light surface, apply a linear decay function in all three
dimensional spaces
Original comment by nin...@gmail.com
on 27 Oct 2011 at 8:47
Added torch and lava item for testing. Doing research on Minecraft's approach.
Currently there are three light sources:
1. Sun
2. Lit surface
3. Artificial (torches, lava, etc.)
1 and 3 are self-evident as to how they work; 2 is used as a method of making
the scene look more realistic. The sun applies 100% to any visible surface,
while 2 applies a secondary application of light.
Current approach: (linear-decay pass)
Init: Create a "light map" octree
1. Apply all source lights onto source blocks (i.e. sun applies to
non-obstructing surfaces & light sources)
2. For each world block that has light, bleed to adjacent visible blocks with
slightly less light
3. Repeat 2 up to n blocks (n being a "fudge" value around 3-5?)
Original comment by nin...@gmail.com
on 30 Oct 2011 at 1:59
Implemented a simplified version of the above mentioned system.
Original comment by nin...@gmail.com
on 30 Oct 2011 at 2:05
Closing; will open new bug for torches when the time comes.
Original comment by nin...@gmail.com
on 8 Jan 2012 at 10:27
Original issue reported on code.google.com by
nin...@gmail.com
on 26 Oct 2011 at 10:11