Flat Lighting on bitmapMaterial
June 26th, 2007
Click on the Turtle, or here, to see!
The day started badly, as I’ve spent two evenings working on an algorithm for smooth lighting and it’s simply too heavy for Flash. All I got was a snail for running speed. You just can’t work at the pixel level in Flash…
But I was walking around for a few days with a little idea in my head. For the ‘bitmapdata only’ renderers I am working on, I have written a flat lighting routine. A simple bit of code, but a very efficient one! So - I decided to apply it to the bitmapMaterial.
And what a nice surprise, it seems the material does like it! After the defeat of the smooth shading, I could balance it with a very fast flat shading. If there are sufficient triangles, you even could get a smooth-shading illusion!
Fabrice





