Trying to get an idea of what performance I can expect...

1 view
Skip to first unread message

OJDee

unread,
Nov 24, 2009, 6:19:15 AM11/24/09
to away3d.dev
So I've knocked up a very basic scene with a lot of planes in it. Is
this an unrealistic expectation for Away3d or have I used a very bad
technique for this kind of scene? I'm getting about 5fps.

private function away3dcreate(e:Event):void
{
addChild(_view = new View3D( { x:stage.stageWidth / 2,
y:stage.stageWidth / 2 } ));
_view.renderer = Renderer.BASIC;
_view.camera.rotationX = -90
_view.camera.moveBackward(500);

for (var i:int = 0; i < 500; i++)
{
_plane = new Plane( { material:new WireColorMaterial() } );
_plane.width = _plane.height = Math.random() * 5 + 20
_plane.x = Math.random()*2000 - 1000
_plane.z = Math.random() * -1400
_planes.push(_plane)
_view.scene.addChild(_plane);
}

addEventListener(Event.ENTER_FRAME, away3dloop);
}

private function away3dloop(event:Event):void
{
for (var i:int = 0; i < _planes.length; i++)
{
_planes[i].rotationY+=1;
}

_view.render();
}


Thanks
Oli

Peter Kapelyan

unread,
Nov 24, 2009, 9:41:43 AM11/24/09
to away3...@googlegroups.com
You'll get better performance if you used a bitmap material, the smaller resolution, the better. And chances are you can get away with "medium" quality. Also a smaller sized (800 x 600 or lower) swf will work better than say a 1200x800 one.

Use those three things together,  it should be running a steady 24+ fps

-Pete
--
___________________

Actionscript 3.0 Flash 3D Graphics Engine

HTTP://AWAY3D.COM

OJDee

unread,
Nov 25, 2009, 3:49:33 AM11/25/09
to away3d.dev
Thanks for your reply, I have stage set at 1000 x 800 and medium
quality. Using bitmap or wirecolor doesn't seem to make much
difference. I guess I am surprised that I still only get about 4fps
with 1000 planes.

Given that the demos show 20000 faces on textured globes rotating at
approx 30fps, how can 2000 faces only manage single figure framerates?

Surely I should be able to throw 10000 planes around with no problem?

Oli

katopz

unread,
Nov 25, 2009, 4:06:46 AM11/25/09
to away3...@googlegroups.com
maybe you talk about away3dlite?

btw, plane didn't shared vertices like sphere and there are separate meshes  so it's should be slower than sphere obviously

hth 

2009/11/25 OJDee <odai...@gmail.com>

OJDee

unread,
Nov 25, 2009, 5:02:44 AM11/25/09
to away3d.dev
I'll see if away3d vs away3d lite makes any difference, I thought the
lite version just stripped out some of the features of away3d for
smaller filesizes.

As for sphere vs plane, I apperciate that sphere's share vertices but
even given this, 20,000 faces at 30 fps vs 2000 at 3fps? I can't see
how sharing vertices could give this difference?

Oli


On Nov 25, 9:06 am, katopz <kat...@gmail.com> wrote:
> maybe you talk about away3dlite?
>
> btw, plane didn't shared vertices like sphere and there are separate meshes
>  so it's should be slower than sphere obviously
>
> hth
>
> 2009/11/25 OJDee <odain...@gmail.com>
Reply all
Reply to author
Forward
0 new messages