Original Post
hi i'm building a basic 3d engine in ... wait for it ... Flash! using actionscript 2.0 ... no sniggering at the back please, i'll have you know i cut my programming teeth doing assembler on 16 bit motorola chips way back in the day ;) wireframe engine was a breeze http://www.jellyandicecream.com/temp/world3d.html (note, camera implimentation is very basic) so then i moved on to solid surfaces ... eh things didn't go quite so well i'll spare you all reams of source code and just ask a few basic questions as i suspect some of my understanding is a little awry the main problem was pretty flakey z depth sorting for the polygons i used the simple method of averaging the z of each point in the polygon to get the average depth and then sorted by that (i have seen other methods but i think this is the only one that's realistic given the computational limits of something like flash although i'd be open to suggestions) i have read that this method isn't great 100% of the time, could anybody explain why? i was using very simple shapes similar to the example above in addition, it turned out it wasn't great, eh, quite a lot of the time because i was doing the dev with a simple cube i used surfaces (or polygons) with 4 points ... now i've always understood that 3d models are made up of triangular polygons, could this be my problem? thanks jim