Stage3D/Away3d 4…Performance Tuning? Need for Skills !

Software: Away3D 4.x

Concept Z, Sr. Member
Posted: 15 July 2011 03:13 AM   Total Posts: 124

When came to performance tuning, it’s really a big headache for me !

I think, for most of us ,when the scene get big and complex, we will face the same problem… framerate drops, it drops so quickly and so easily!

So , i need work very very carefully when to add new things to the scene.
This really limited our creative imagination…

I tried Fabrice’s Merge tools and Flash Player 11 Beta 1 , it do improve the performance a little some time, but still can’t get significant changes or improvement!

(Also, I was wondering whether the Merge Class do have the effect for general performance improvement. e.g: i have a scene with 9 Meshes , 1 ObjectsContainer3D, 4 lights, 2 BitmapMaterial(each 512*512 texture map), before Merge to 1 Mesh, it has 1956 POLY, average framereate is 5-6, but after Merge to 1 Mesh,use 1 single BitmapMaterial, it has 15780 POLY,average framereate is 1-2 ,this really made me confused !).


Adobe says: Stage3D’s realtime rendering performance is the same level like Sony’s Playstation 2.5, or Nintendo’s Wii, but from my test , it’s far far behind these game machines !

Any advice for Stage3D/Away3d 4 performance tuning ?

 Signature 
signature_image

Anyone can cook but only the fearless can be great

   

Avatar
theMightyAtom, Sr. Member
Posted: 15 July 2011 08:04 AM   Total Posts: 669   [ # 1 ]

My only advice is to optimise the rendering loop and don’t make unnecessary changes to models/textures. I haven’t hit this problem despite working with large models. Seems from this example Molehill has the capability!
http://www.ringo.nl/labs/MassParticles/  (2,000,000 triangles)

   

jtopaz, Member
Posted: 15 July 2011 08:16 AM   Total Posts: 53   [ # 2 ]

Me too. I still don’t know how to tune away3d performance.
I have a post before talking performance tuning. I did follow the advice to combine 50 mesh to a single mesh, but it only have 10% improvement.

I have seen other example with 60k+ polygon with at least 30+ fps. My application ony have 3k polygon but only get 12 fps. I am very confused.

   

Concept Z, Sr. Member
Posted: 15 July 2011 09:43 AM   Total Posts: 124   [ # 3 ]

Peter, thank you ! it’s nice demo! but it’s very simple scene,very simple.

Until now, i have’t seen a demo with a little more complex objects, complex material & shaders, complex lights , complex animation ,and runs very smooth…..it’s far away from commercial projects needs!

It’s really not easy to optimize a complex scene!

 Signature 
signature_image

Anyone can cook but only the fearless can be great

   

Mr Margaret Scratcher, Sr. Member
Posted: 15 July 2011 01:29 PM   Total Posts: 344   [ # 4 ]

I’m also going to be looking for a solution to this, as what i plan will involve around 4000 cubes, but merging is going to be tricky as I want them dynamically created, each with a different texture, and still for each one to be respond individually to mouse events…

   

Avatar
SasMaster, Sr. Member
Posted: 16 July 2011 12:02 PM   Total Posts: 127   [ # 5 ]
Peter Strømberg - 15 July 2011 08:04 AM

My only advice is to optimise the rendering loop and don’t make unnecessary changes to models/textures. I haven’t hit this problem despite working with large models. Seems from this example Molehill has the capability!
http://www.ringo.nl/labs/MassParticles/  (2,000,000 triangles)

You should not compare the Away3D 4 performance to a pure molehill made demo.All the engines based on molehill perform much slower than an app written in pure molehill. The architecture and the engine pipeline complexion reduce the performance generally.Also the tricks shown by Ringo and by FUnkyPants use a one big single batch of the geometry with predefined start and end velocities where the particles transformations are interpolated entirely on GPU ( at least that is the case in FunkyPants demo) So while it looks super cool in terms of FX and Performance it lacks much of flexibility needed in most cases .The engines bring us that type of flexibility but we pay back with some performance penalty.
Having said this ,Away4 still allows you to deploy big scenes with tons of geometry and maintaining a good fps.I wrote an app some 3 months ago just to see how far Away 4 can get .I put into scene 5000 buildings that resulted in around 440000 polys ,All the geometry had a light source ,normal maps, post processing filters.Also I had the Flint particles emitter emitting some 50-90 particles a second.And also birds flock in the sky with steering behavior applied.So with Flint turned off I had in average around 45-59 fps.The lower value had been received only when the view frustum was catching almost the whole city (from the birds eye view))which was around 140000 polys to draw.Only switching on the particles reduced the performance to around 25 fps but that was really too much as back than Away branch in FLINT was not optimized .That was before I implemented pool buffer in Flint which now gives a superior performance .And also it was before Fabrice released his Merge class which could be really helpful in my case where I could have just merged all the building and by means of this reduced the number of draw calls.

 Signature 

This looks like a job for superman
http://blog.alladvanced.net

   

Avatar
theMightyAtom, Sr. Member
Posted: 16 July 2011 04:13 PM   Total Posts: 669   [ # 6 ]

Relax SasMaster, I think if you read that back I said “Molehill has the capability” i.e. it’s not Molehill which is necessarily the bottleneck. In many of the examples I see here and on the old google list poor performance is due to AS3 scripts that are part of the rendering loop that are either badly written (for example making new instances of objects every frame), or run with every cycle even though they are not needed. In Away3D this is where the average programmer can look for optimization and speed increases. That remains my simple advice.

   

Avatar
SasMaster, Sr. Member
Posted: 16 July 2011 04:52 PM   Total Posts: 127   [ # 7 ]

Ok , but why should I relax ? wink

 Signature 

This looks like a job for superman
http://blog.alladvanced.net

   

Mr Margaret Scratcher, Sr. Member
Posted: 19 July 2011 03:55 PM   Total Posts: 344   [ # 8 ]

Aaaalso, I’ve just found that (on my system at least) I don’t get the performance slowdowns with multiple objects when I publish in ‘Release’ mode, as opposed to ‘Debug’ mode. It seems for me that the debugger causes a bit of a slowdown…

   

Richard Olsson, Administrator
Posted: 22 July 2011 10:54 AM   Total Posts: 1192   [ # 9 ]

Are you guys (those of you who have extreme performance problems) really running in the correct wmode? Please make sure that your SWF files are embedded using wmode=direct. It seems very odd that you would be having performance problems after just a couple of thousand triangles in less than ten meshes.

   

Mr Margaret Scratcher, Sr. Member
Posted: 22 July 2011 02:40 PM   Total Posts: 344   [ # 10 ]

In what I’m working on, I have one obj mesh with about 800 polys, and then 80 dynamically created cubes, and it sits at a steady 55 - 60fps… So anyone having problems with less that 10 meshes must be doing something wrong…

   

Concept Z, Sr. Member
Posted: 25 July 2011 02:06 AM   Total Posts: 124   [ # 11 ]

Please do remember , the scene what i test is based on a 1920* 1080 resolution.

For example , when test at such Full HD Resolution , my scene runs at 14-21 frames per second. when set to 640*480, it runs very smooth on 54-60 frames per second!

Just rebuild your Away3d scene to Full HD Resolution , 60FPS, have a try ...Challenge the limit!

 Signature 
signature_image

Anyone can cook but only the fearless can be great

   

Mr Margaret Scratcher, Sr. Member
Posted: 25 July 2011 01:02 PM   Total Posts: 344   [ # 12 ]

Mine is running at 1366 x 768, on a dual core (from just before they made the switch to the i3 processors) laptop. So not quite as big as you suggested, but certainly not 640 x 480 either…

   

wagster, Member
Posted: 28 October 2011 07:08 PM   Total Posts: 68   [ # 13 ]

I’m trying to optimise this app (which is fairly intensive really) to work all all machines, even in software mode, which is turning out to be difficult.

The one thing I’ve found is that the screen area of your View3D is the single biggest performance factor, you can remove lights, MouseEvent3D listeners and meshes and you can optimise code all you like, and it all helps, but if you want speed, reduce the amount of pixels rendered.

Merge has been a great help, as has not nesting lots of ObjectCOntainer3Ds.

If anyone has any other tips, please post them.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X