Wednesday, May 20, 2009

[Flash10] Want to know maximum triangles via Pure Flash 10 3D can render?

it's been a while after my latest test via Flash10 about 3D thingy, after mess up with native 3D function, the result is...here ;)

What i just found out?

got fps speed up by Vector, it's not new, just mention ;)

  • Vector is access fast, forget about Array and Object
  • Vector with typed is faster, for example :  Vector.<int>
  • Vector with typed + fixed length is fastest, for example : Vector.<int>(10, true)

Required?

and let's mix thing together!

Result?

- faster? slower? huh? let's hello world 1st with 2 earth
http://sleepydesign.com/labs/as3/Open3D/ExSphere.html

image

- ASE after optimize z-sort ,rip some loop, changed to Vector, but still use array sortOn (faster) http://sleepydesign.com/labs/as3/Open3D/ExASE.html

image


- final one is depend on your machine, just click it and feel free to leave your result as comment
http://sleepydesign.com/labs/as3/Open3D/ExSphereSpeedTest.html 

image

as you can see, without both z-sort (move mouse to left) for meshes and faces, we can pump up to 26,600 faces 30/30fps with medium quality via Intel Quad Core, (and drop to 29fps sometime while i hold key to take screenshot ;p) and ~12fps when z-sort is on, culling is on which mean around ~13,300 is real render faces number? maybe i count wrong number? can someone confirm by click and hold your mouse to see wireframe and manually count 'em by hand? kidding ;o

FYI

  • in last demo i try simulate real life job by add mouse event, always rotate all XYZ, bla bla
  • ~7kb engine size for now and can be smaller...lol
  • no "Face class" yet, surprise? i get rid of it cause it's cost ~1fps after promote function to class!, which mean class look up is slow thing down, must figure out better way to seal it ;\
  • last try with ND3D i test only drawTriangles, and look like a good idea to loop and draw 'em as Face one by one, you can get faster result by collect and draw it "just one time" in mesh loop
  • this time i did use Utils3D.projectVectors(projection, vout, triangles.vertices, triangles.uvtData);
  • nothing to do with "Open3D" name, it's just...random idea name ;)

Source?

  • sure, coming soon just need some clean it up a bit ;)
  • maybe finish this ~9kb MD2 demo before release the source svn somewhere

Next?

  • better back on collada thing, i got something about animation clip to share, both good and bad news come along ;)
Technorati Tags:

2 comments:

Unknown said...

Great work!! wishing to see x-wing model too :)

Evan said...

excellent work Katopz!

26,600 faces is impressive, too bad it can't be that high with z-sorting and culling, which seems to be the real bottleneck.

looking forward to your MD2 demo