Feb 12, 2009

3D vs. 3D

We were curious if we could run a simple test that quickly compares the new Flash10 3D capabilities and Papervision3D.

We are totally aware of the fact that Flash 3D and all other 3D engines like Papervision3D or Away3D are very different approaches.
The Question is more: Flash10 3D or Papervision3D for simple 3D features on a site?

Our quick and dirty test is to create 1000 rectangles, randomly place them in 3D space, animate it a bit and see what is faster.



Test Environments:
1: Dual 2.3 GHz PowerPC G5 / Mac OS X 10.5.6 / Flash Player 9.0.124.0 (SA Debug)
2: Dual 2.3 GHz PowerPC G5 / Mac OS X 10.5.6 / Flash Player 10.0.12.36 (SA Debug)
3: 2 x 2.8 GHz Quad-Core Intel Xeon / Mac OS X 10.5.6 / Flash Player 10.0.12.36 (SA Debug)

Both Flash10 and PV3D stages are 600px*600px with 120fps and quality set to medium.


Test 1: Planes – 1000 * 100x100 planes
Engine (Compiler)


comments:
  • for zSorting we use the SimpleZSorter Class written by Ralph Hauwert
  • papervision3D seems to run more consistent
  • Flash10 3D runs slower on older machines but seems to use hardware acceleration on newer machines and speeds up a lot
  • something is going wrong with "Flash 10 ‐ SimpleZSorter" when compiled with "Flex SDK 3.2.0 (Release Build))". haven't had time to look further into that but same code runs almost 4 times faster when compiled from Flash CS4 IDE


Test 2: Videos – 10 * 800x600 FLVPlayback planes
Engine (Compiler)


comments:
  • we used the standard amount of segments in the pv3d-planes that causes a lot of flickering when they intersect. more segments will reduce the flickering but also lower your framerate
  • a different video codec, bitrate, can change the result significantly
  • the video we used in the test: 400px*226px, Sorenson, 30fps, CBR One Pass @ 700kbit
  • later tests with different flvs showed a much bigger difference between pv3d 2.0b and 3.0a. some videos run almost twice as fast in Pv3d 3.0a.

Conclusions
Papervision 3.0a PapervisionX rocks. And it's an absolute plus that it still works in Flash Player 9. Flash10 3D seems to be pretty good once everybody has newer machines and hardware acceleration kicks in.
Depending on what kind of effect you want to achieve both solutions can work. I'd use Flash10 3D for easy and small 3D effects with objects that are highly interactive e.g. parallax environments. For most other 3D effects i would consider using papervision.
Things to think about and to weight before you start:
  • What's the target audience and target player?
  • Grade of interactivity?
  • Small 3D effect or heavy 3D objects?


If you want to run the tests for yourself, here (zip, 24mb) are the source-files that we used. Hope this is somehow helpful and thanks to Benjamin for the help on the tests.

Update 02/13/09:
The papervision3d version that we refer to as “Public Alpha 3.0 PapervisionX” is the CS4 branch in the SVN. All source code that we used is included in the zip file.

Share this Post


                           

Comments


Turkse Community     Mar 16, 2010
Does papervision support Flash cs2?

oyunlar     Feb 06, 2010
Thanks for the work but the test isn't really fair unless you set PV materials to smooth and precise.


The Joker     Apr 18, 2009
During a recent interview in BusinessWeek magazine, Amazon CEO Jeff Bezos observed that frequently companies look at there internal skill set and then come up with the product solution that the market wants instead of (correctly) the other way around. This 3D on flash test is an example of this. What you should be doing if you want to use 3D is develop a true 3D pipeline instead of trying to tweak flash to do low quality 3D.

elliotrock     Apr 16, 2009
Unit,

Thanks for the information and @Daniel for the test. I am looking forward to putting PapervisionX through the paces..

E

Flash Framer     Apr 16, 2009
This is excellent. This is very useful data. Thanks for running this report.

Jeff Yamada     Apr 07, 2009
Great post! Thanks for the comparison. I have been doing a lot of simple transitions in Papervision lately and wondering if I should try out the built in 3D finally...you've inspired me!

Richard Vacheresse     Feb 24, 2009
thx for your work on this...very interesting results

Kaleb Wyman     Feb 20, 2009
Interesting test... need a correction in the hardware list of your Test Environment #3: Intel doesn't make a G5 processor. :)

3: Quad 2.8 GHz Intel G5 / Mac OS X 10.5.6 / Flash Player 10.0.12.36 (SA Debug)

Billigflug     Feb 19, 2009
Hello and good day,

I had several problems at my Dockstation at work. I googled a few hours and then I found your blog. It really helped me.

It was very easy to understand and I will advocate this page to other colleagues! Next time i will look it up immediatley!

Thank you very much and have a nice day!

amoslanka     Feb 17, 2009
Great information guys thanks! I've been hoping to find some good data on Flash10 vs PV 3d.

thomas     Feb 16, 2009
why this test seems very different http://www.airtightinteractive.com/news/?p=114 ?

Gabriel Laet     Feb 15, 2009
What I've seen so far, the FP Debug version it's really slow compared to the FP Release version. I would love to see benchmarks covering custom Matrix4 classes vs flash.geom.Matrix3D, lineTo vs drawTriangles, code execution time and not only rendering a lot of stuff on screen. Let's wait PV3D/Away3D FP10 branches :)

Dan     Feb 14, 2009
Thanks for the work but the test isn't really fair unless you set PV materials to smooth and precise.
Flash planes are always smooth and show no distortion due to segmentation.

Cheers, D

Andrew Christensen     Feb 13, 2009
Wow, great job guys! This has been something I've been wondering about for some time. Does the Papervision build that you were using take advantage of the new Flash 10 drawing methods (ie: draw triangles)? If so, it would be great to see this test done with the current stable build of Papervision.

Daniel Scheibel     Feb 13, 2009
Hi Ralph, thank you for your input regarding the future of Papervision3D. What we refer to as "Public Alpha 3.0 PapervisionX" is the CS4 branch in the SVN. We used the version name that was defined in the org.papervision3d.Papervision3D.as class. In the CS4 branch it is set to "Public Alpha 3.0 - PapervisionX". To avoid further confusion, you might want to update the VERSION variable in the CS4 branch.

Mikko     Feb 13, 2009
Read UnitZeroOne's comment above. I was looking at this too...

Pradeek     Feb 13, 2009
Is this the pv3d 3.0 alpha source code that is included?

Edzis     Feb 13, 2009
As Michael Baczynski demonstrates in his "Benchmarking gotchas" post (http://lab.polygonal.de/2009/01/21/benchmarking-gotchas/), tests are not really accurate in the "debug environment". As he shows, the results can be quite opposite without debugging enabled and using a release version of flash player.
But anyhow, this is interesting, especially the info about Papervision 3.0.

bartekd     Feb 13, 2009
Thanks for those tests! It's a great help for anyone that will have to take this decision before starting a project.

Just to avoid any confusion: when you refer to Papervision 3 do you mean the code that is in the CS4 branch in the SVN?

Victor Norgren     Feb 13, 2009
Thanks alot, I've thought of doing this test myself. I'm somewhat surprised about the results. Will definetly check out PV3D 3.0 alpha!

Jason     Feb 12, 2009
Do you need cs4 to utilize the speed of papervision 3.0? Or will it be really fast using cs3? I saw one of the papervision creators complaining about the cs4 ide...

UnitZeroOne     Feb 12, 2009
Ok guys, good comparison. But, I've got a couple of corrections. The sources you have been using and naming PapervisionX (which is actually something different then 3.0), are the highly unstable CS4 branch sources. These don't compare to X in anyway, since X will be an entire rewrite, and will only run on 10.

So let me outline the future of Papervision3D.
1.PapervisionX - Flash 10 only. Makes heavy use of Flash 10 3D features, Pixelbender and Alchemy. Not released, no open repo yet.
2.PapervisionIX - Or, Papervision Strict. This will be 3.0. Will be 9 compatible, most likely will support seperate renderers for 10.
3.Papervision2.0 Current version. Will be retained. Stable and fully released. Probably dev will be halted when X and 3.0 are running.

As for your comparison. The hardware accelleration is only partly true. HW accel in FP occurs when you fullscreen, or use the new Flash 10 WModes (and some gl support is used on mac for composition since 8). Someone from Adobe can correct me here.

But, I think the speed comparison between older and newer machines is probably more reliant on multicore machines. Since FP9 / MovieStar, Flash can utilize multiple cores for rasterization. Pixelbender allows threading over multiple cores too. Threading in Alchemy is still on the same core as the rest of the AS, but is so called 'green-threading'. In the old flash days, that was referred to as "multiframing". Essentially, it's faking threads, which is needed to run C.

We'll be rocking your minds with PapervisionX anyway, I'm sure. It's going to be a major release for us. At FITC Amsterdam I'll start showing some initial tech demos. Framerates far exceed your benches above. That being said; at the cost of FP9 support.


Speak






Submit »