[Papervision3D] Rasterizing in AS3 with ByteArray

Carlos Ulloa c4rl054321 at gmail.com
Sun Jan 7 06:40:50 EST 2007


Very interesting.

And it actually doesn't use ByteArray :)

For the lines, it uses good old setPixel, and for the triangles, it uses
fillRect. This shows how incredibly slow the Graphics api is. It also shows
how fast AS3 is, executing so much code per pixel and still rendering faster
than the player itself. I would like to see their examples with
quality="LOW", though.

I've been doing some performance tests recently as there has been some
changes in the projection code (the code that converts from 3D to 2D). After
spending hours working on 10 lines of code, you always want to measure your
results.

I'm going to publish the benchmarks shortly, but just so you know, in a
typical AS2 scene 60% of time is consumed by the 3D code. The other 40% is
taken by Flash for drawing the screen.

In AS3, the 3D calculations take less than 10% of the time per frame. The
other 90% is hijacked by Flash for screen drawing.

Papervision3D AS3 code is more than 15x faster than its AS2 counterpart, but
the results are hindered by the screen drawing routines, which obviously
haven't changed much from Flash 8.

Optimization of the 3D code is less important than finding a faster way of
drawing triangles. That's why this is so interesting. I would love to have
time to do some tests with this. I would say that ByteArray is got to be
faster than doing setPixel one by one. But with Flash you never know.

C4RL05
// noventaynueve.com
// papervision3d.org



On 07/01/07, ricardo cabello ~ mr.doob <info at mrdoob.com> wrote:
>
> Just so you know... it's now opensource and it includes a poly raster.
> http://www.bytearray.org/?p=67
>
> --
> Ricardo Cabello ~ Mr.doob
> Designer + Developer
>
> Web: http://mrdoob.com
> RSS feed: http://mrdoob.com/rss.php
> Skype: r0802
>
>
> Carlos Ulloa wrote:
> > http://www.bytearray.org
> >
> > This guy has written a rasterizer class using ByteArray that seems to
> > be a lot faster than the native Graphics class.
> >
> > The Graphics api is our bottle neck. Any efforts in this direction
> > would significantly increase render performance.
> >
> > Excellent news.
> >
> > C4RL05
> > // noventaynueve.com <http://noventaynueve.com>
> > // papervision3d.org <http://papervision3d.org>
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Papervision3D mailing list
> > Papervision3D at osflash.org
> > http://osflash.org/mailman/listinfo/papervision3d_osflash.org
> >
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20070107/086cfc7d/attachment.htm


More information about the Papervision3D mailing list