Tuesday, September 16, 2008

Flash Player 10 : drawTriangles is faster?


Flash Player 10 is out there for a while, and i really want to know is that faster for 3d with core function? let's try it, shall we? let's googling and let's see what i got there


  1. start reading here : http://www.senocular.com/flash/tutorials/flash10drawingapi/
  2. or here : http://www.boostworthy.com/blog/?p=242
  3. more basic sample here : http://flashandmath.com/advanced/p10triangles/index.html
  4. advance sample here : http://pixelero.wordpress.com/2008/08/31/flash-10-part-4-of-testing-drawtriangles-old-school-tunnels/


  1. Flex and Flash Player 10 crazy setup
  2. some old computer...why? you 'll got same 24/24fps both of them in fast computer ;P

And then?

i'm lazy enough to rewrite all that, i think that should be better if we can compare speed with old as3 3d engine and new core drawTriangles function right? so i pick ND3D engine in this case cause it's nice and simple enough for integrate to Flash Player 10 (only need 1 night to integrate), ...tadaaa

Flash10 nulldesign AdditiveCubes 


  1. F9 : http://sleepydesign.com/labs/as3/ND3D/AdditiveCubes.html
  2. F10 : http://sleepydesign.com/labs/as3/ND3D/AdditiveCubes_F10.html


far as i test with my old computer i got Flash Player 10 with drawTriangles is slower than old style lineTo/moveTo for 2-3 fps, and plz don't trust/argue me yet, better follow link here :  http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=72&catid=675&threadid=1387302&enterthread=y


don't ask me! ask adobe! lol ;)


Falken said...

I agree, I get a solid 15/24 with the Player 9 example, and 12 or 13/24 with the Player 10 example.
Player 10, FireFox 3, OpenSuse with Compiz window manager.
Do I remember something about having to add an embed parameter to the HTML to enable acceloration ?

senocular said...

Are you using UVT? The inclusion of the perspective distortion (T) in drawTriangles creates a lot of overhead that will be slower than affine matrix transformations, however, they will have a much more accurate distortion for bitmaps. no longer will you see the stair-stepping effect. You're also greatly reducing the geometry necessary for the same models because tessellation is no longer required to improve bitmap quality.

katopz@sleepydesign.com said...

@falken : it's suppose to be same or faster fps in software mode, right? ;)

@senocular : thx for advice (you are my hero btw ;), lucky that i didn't use UVT yet just UV ;D

promethe said...

Hi, I'm the guy who posted on the Adobe forum about Graphics.drawTriangles.

After a lot of work, it looks like drawTriangles is quite efficient or at least as efficient as the old API methods.

I can draw a LOT of polygons now :P Check it out on my blog or on the blog of my 3D API

katopz@sleepydesign.com said...

Hi promethe, Nice work there, will be chit chat soon ;)