I used global illumination model. Three point lights are attached on the ceiling of the room (the light can be anywhere though), and each wall is made of 20*20*2 triangles, calculating colors on three points of triangles. You may see some cracks when too close to walls. I missed some exceptions when drawing triangles. Once it fixed, I am going to release source code.
Very nice! Might there be an option to turn off interpolation so we can view the room at a higher framerate? Probably using the default drawPolygon methods as well for speed?
Great work! If you can optimize it you could really go somewhere with this idea!
Maybe try caching the results of the lighting calculations so they don't reload, but I don't know how you've coded it so all I can offer is a thought.
Nevertheless, incredible!
@BuilderBoy2005 I confused the term 'local illumination' with 'global illumination', which are very different.... Anyway, I have to correct it. I used LOCAL illumination. GL is not appropriate for real-time programming.
You cannot use graduation with getImage().drawPolygon(). However, you can with java.awt.Graphics2D, so you could creates a buffered image, use Graphics2D to draw your graduated triangle on it, and then draw the buffered image on your actor/world's image.
2012/9/27
2012/9/27
2012/9/27
2012/9/27
2012/9/27
2012/9/27
2012/9/27
2012/9/27
2012/9/28
2012/9/28
2012/9/28
2012/9/28
2012/10/4