Optimizing for AIR 3.2 for Android

Software: Away3D 4.x

Avatar
Baush, Sr. Member
Posted: 03 March 2012 03:27 AM   Total Posts: 135

Hello everyone, for those who like me got their project running on their android device and all, I would like to share my results and perhaps bounce them with yours to see if I’m the only one getting low fps.

My project running on my desktop was hitting steady 60fps no problem with average 512x512 textures and about 20,000 poly in the scene.

When ran on my Galaxy 10.1 Android tablet, it loaded up at 1-2fps.

Then I went on and removed multiple elements of the scene, reduced mesh density, reduced all textures to 64x64, 5000 poly and using 27Mb of ram and managed to hit about 12-15fps top.

has anyone managed to get better fps from projects with more stats than mine?

Thanks!

   

Avatar
maddog, Sr. Member
Posted: 03 March 2012 08:33 PM   Total Posts: 118   [ # 1 ]

Just running the basic 3ds loading example on my galaxy 7 inch runs with low fps, and that is only 10,000 poly. I am beginning to think all the talk about large improvements in performance has not been achieved yet. At least for hand held devices. In the next year or so as handheld become more and more powerful hopefully that will change.

   

Avatar
Fabrice Closier, Administrator
Posted: 03 March 2012 11:43 PM   Total Posts: 1265   [ # 2 ]

I have made 4 demos so far for androids and idevices. 3 are at +70k poly’s, multiple materials and even one at 180k. They run all fine 60/60 on xooom motorolla, htc desire, IPad2 and IPhone 3gs. Init time is instantenious on tablets, +- 3 secs on IPhone, 5 secs init on htc. I haven’t tested the 180k on IPhone yet.

The only diff is that I do not use loaders at all, but the new Prefab’s exports… I’ll run some tests to see if using loaders is causing slowdowns
as I’ve seen more of these reports.

It would be interresting for test purposes If I could have a look at your respective code+models. (offline)

   

Avatar
maddog, Sr. Member
Posted: 04 March 2012 04:07 AM   Total Posts: 118   [ # 3 ]

Is there a new preFab version? I just tested it on the getHub examples for loading 3ds models. It is the one with the solder ant.

   

Avatar
SasMaster, Sr. Member
Posted: 04 March 2012 11:34 AM   Total Posts: 127   [ # 4 ]

@Fabrice , tried on HTC Desire mobile phone ? HD ?

 Signature 

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

   

3dNewb, Sr. Member
Posted: 04 March 2012 01:35 PM   Total Posts: 105   [ # 5 ]

I’m interested in this and would like to run some tests for getting optimal speeds. Where did you guys get the Air version that runs stage3D on Mobile? It isn’t out yet and I can’t find any beta program…

   

Avatar
SasMaster, Sr. Member
Posted: 04 March 2012 01:36 PM   Total Posts: 127   [ # 6 ]

Dude ,in fact Adobe have released already RC version. Go to Labs and download it

 Signature 

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

   

3dNewb, Sr. Member
Posted: 04 March 2012 01:38 PM   Total Posts: 105   [ # 7 ]

Release feb. 27, must have missed that. Thanks, I have a couple 3D projects target for mobile, I’ll post my findings.

   

inSertCodE, Sr. Member
Posted: 04 March 2012 02:09 PM   Total Posts: 105   [ # 8 ]
Fabrice Closier - 03 March 2012 11:43 PM

The only diff is that I do not use loaders at all, but the new Prefab’s exports…

Hi Fabrice. Can you please elaborate a bit what those exports actually do?

   

Avatar
Fabrice Closier, Administrator
Posted: 04 March 2012 09:30 PM   Total Posts: 1265   [ # 9 ]

@michael, I don’t know, a friend was there when I was busy, we tried the apk on his HTC Desire. Runned smooth. Will ask.

@InsertCode, the new Prefab’s AS3 exports are build of series of binaries and classes. In this case the binaries are holding only the geometries. I have also added exports pure as3, which are even faster to init, but are limited to models lower than aprox. 10k faces. Above that the export works, but you get compile errors due to lack of java memory. The exported classes come with a mini parser specifically targetting this part of Prefab’s format.
At some point in future, I’ll replace this format with awd2 once 2.0 is locked, and export a miniawd2 parser specifically made for this kind of application.

I do my best to release something asap. Busy atm, on boring app “must haves” features such as copy, paste etc… Its just lots of work to build such app.

   

inSertCodE, Sr. Member
Posted: 04 March 2012 09:53 PM   Total Posts: 105   [ # 10 ]

Ahh I see what you mean… I wrote my own binary format for away3d a while back and it performs (parses) way faster than 3ds. Same principle, it keeps only necessary geometry to construct mesh. I’ve included option to embed the texture in to the file too but that’s not very smart if you use the same texture for more models as it create new texture for each loaded model (not reusing the same one). However its for static mesh only. Does yours maybe include bones and animation?

   

Avatar
Fabrice Closier, Administrator
Posted: 04 March 2012 10:13 PM   Total Posts: 1265   [ # 11 ]

The exports are smart enough to reuse resources if necessary.
Embeds, (as in previous f10 AS3 exports) is now optional.
Animation exports: vertex yes, skeleton should be finished in few days.

I will probably ask very soon a few users to test the app. if you are interrested, keep an eye on the Prefab forum part…

   

Alex Bogartz, Sr. Member
Posted: 04 March 2012 10:49 PM   Total Posts: 216   [ # 12 ]

Yes, I would love to test.  We have lots of games in the works!

   

Avatar
Baush, Sr. Member
Posted: 19 March 2012 12:31 PM   Total Posts: 135   [ # 13 ]

Fabrice, I understand how coded assets vs loaded assets would greatly improve the init time, but could it really have an effect on the fps at the runtime?

I guess I must be doing wrong (wrong sdk or something) as I can’t get over 2-3 fps on both my android phone and tablet, but get steady 60fps on my desktop.

Could someone package a simple example including the air xml to see if my setup is the problem?

I use intelliJ, with flex sdk 4.6 with Air 3.2 “pasted” over. IntelliJ requires the Air SDK to be within the Flex SDK for some reason.

Thanks a bunch!

   

Avatar
Fabrice Closier, Administrator
Posted: 19 March 2012 02:23 PM   Total Posts: 1265   [ # 14 ]

You save on init time, file size and ram usage mostly.
It doesn’t affect fps, at least not after it’s displayed on screen. So far, I can see the amount of materials is of importance. On phones using only diffuse maps seams to be the way to go.
For instance the ant demo (no shadow) runs 30/60 with diffuse+normalmap 256x256 and diffuse for body ant on Iphone 3gs and 60/60 without light.

Here a totally unoptimized test regarding maps and polycount.
180k polys, this one runs 60/60 on my Iphone, and takes 3 to 4 sec to init.
on tablets motorola, Ipad2, it inits in less than a sec. Runs also 60/60.

But don’t take my word for it, try it yourself:
http://www.closier.nl/RoomDemoCR.apk

   

Avatar
Baush, Sr. Member
Posted: 19 March 2012 02:26 PM   Total Posts: 135   [ # 15 ]

Thanks Fabrice, I’m getting a 404 with the provided link.

Thanks for your help!

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X