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
Popularity: 1% [?]






Looking good!
Comment by Mr.doob
— June 27, 2007 @ 12:01 pm
Very nice fabrice! How does smooth shading work for non-animations? My particular needs include 2Dimensional graphics rendering of 3D objects, so frame rate isn’t as crucial.
Comment by Avi
— June 28, 2007 @ 9:51 pm
Smooth shading at the pixel level is very heavy, but gives the nicest results. http://www.closier.nl/blog/?p=27 is a little research i just uploaded… it is useless for live 3D, but I just wanted to be sure it was not possible.
Soon a new bitmapdata only materials will be released. You could then render a model with lots of faces. Since it’s bitmapdata based and uses no containers, you could even add some custom code to enhance the pixel information of the result, for instance by adding reflections, projected shadows, blurs, glows.
It could generate a kind of artistic impression, but that’s up to you!
Comment by Fabrice
— June 29, 2007 @ 4:59 pm
not bad at all
Comment by oleg 3d
— April 6, 2008 @ 3:47 pm
[...] Away3D Flash Engine Flat Lighting on bitmapMaterial Posted by root 10 minutes ago (http://away3d.com) Jun 26 2007 comment by fabrice netherlands june 29 2007 4 59 pm training for 3d in flash novice to intermediate middot flash 10 speed tests middot away3d industry standard powered by wordpress web design by laurentiu piron Discuss | Bury | News | Away3D Flash Engine Flat Lighting on bitmapMaterial [...]
Pingback by Away3D Flash Engine Flat Lighting on bitmapMaterial | home lighting
— June 13, 2009 @ 8:50 pm
Looks really nice! Flatshading is underrated I think, from an aesthetic point of view.
It would be awesome if you could share some code or insight on how to achieve this.
Comment by Thomas
— January 15, 2010 @ 6:30 am