I recently benchmarked the four most popular 3D engines (Papervision3D, Away3D, Sandy, and Alternativa3D). The latest versions of each. Default settings, no mip mapping or any advanced features turned on.
My main reason for doing this was to see how my 3D engine compared, performance wise.
But I thought I would post the benchmarks, as I’m sure some of you might find them interesting, or useful, if you use Flash 3D engines.
First I’ll explain the benchmark and why I did this particular test. It’s 1000 texture mapped planes, 100 by 100 pixels, each comprising of 2 polygons. So that’s 2000 polygons and 4000 vertices being rendered per frame.
Now my reason for doing textured mapping is because the vast majority of people are going to use texture mapping in their 3D work, as opposed to wireframe or vector filled polygons, so obviously the texture mapping performance is important.
And I decided to do 1000 small planes, rather than just one huge 2000 polygon plane because this test has a significantly larger amount of vertices than 1 big plane, thus being more of a test for the 3D transformations.
Also being that there are 1000 planes, it tests how quickly the engines traverse the list of models, do the transformations, and add them to the renderer each frame. Again, this is more of a task than having just 1 model.
Now as for the results, funnily enough, they are pretty much ranked in terms of popularity Papervision being the clear winner, then Away3D, then Sandy, then Alternativa.
I get 19fps for Papervision, about 11fps for Away3D, 7.5fps for Sandy, and a shocking 2.5fps for Alternativa.
It’s given me a new found respect for Papervision. It has very respectable performance, much faster than the rest in terms of raw poly pushing power. I previously thought PV was overrated, and it’s success mainly due to great marketing etc, but no. From the demos etc, I thought away3D would be faster, but actually PV is almost twice as fast.
It’s impressive that they’ve created a very easy to use, versatile and user friendly engine, with pretty good performance to boot. I think I underrated PV before, because I’d seen fairly simple things like a 3D menu, or some 3D images run at like 10 frames a second and use 75% of the CPU. In hindsight, this was obviously just some horrible programming, by people who didn’t know what they were doing.
I thought I would stick up for Alternativa though. It might lose badly in terms of raw polygon pushing, but it’s a very advanced engine, and goes about things in a different way. The reason it can handle those big scenes in the demos on their site is because of some fairly advanced clipping and dynamic triangulation, minimising the amount of polys being rendered at any one time. Particularly the dynamic triangulation. Objects that are further away have their polygons reduced dramatically, then more polygons are added when viewing up close, particularly at an angle.
Kind of surprised about Sandy. Having a skim through the classes, it seems pretty well written and fairly lightweight and streamlined. Papervision seems a bit bloated in comparison. But PV’s code is clearly far more efficient.
I’d also like to say this doesn’t mean you shouldn’t use Away3D, Sandy, or Alternativa. Obviously I explained A3D above, and I know Away 3D has a lot of features that people like, and things generally look quite good in Away3D.
As for Sandy, I know it has a solid mode 7 engine for example, that seems to run fairly well, and good handling of 3D sprites, that alone could be a reason to use it.
But if you want raw poly pushing performance, possibly for a game, or just shifting a large number of images etc, Papervision is the engine to use.
Enough of the essay, here are the benchmarks -
http://rumblesushi.com/bench/PV3D_bench.html
http://rumblesushi.com/bench/Away3D_bench.html
http://rumblesushi.com/bench/Sandy_bench.html
http://rumblesushi.com/bench/ALT3D_bench.html - WARNING - you might want to just take my word for this one, and not run, as it froze my browser.