AIR 3.2, Stage3D and Minko: 100k polygons at 26fps!

AIR 3.2 beta 5 is available on Adobe Labs, but one of the most ancitipated new features is the addition of Stage3D for Android and iOS devices (iPhone and iPad). Thanks to AIR 3.2 and Stage3D, Flash developers will now be able to create 3D applications targeting mobile devices. According to Adobe’s engineer, GPU-wise performances are very close to what you would have with a native apps. And that’s really incredible (I guess we now just have to wait for the VM to catch up but thing are getting better and better…). As a member of the private prerelease program, I have access to AIR 3.2 for Android/iOS with Stage3D enabled. So I decided to give it a try with the latest prerelease drop. And boy was I impressed! My test device is an HTC Desire HD with Android 2.2 (official HTC rom). I build a very simple mobile application with Flash Builder 4.5 and Minko (thank you Thibault for letting me post that photo!):
The framerate, memory usage and other values are tracked with monitor. And that’s right, it’s a bit more than 100 000 polygons at 26 frames per second! Here is the code: You can find the full source code on my GitHub. That’s only a few lines of code, and yet it displays a Utah teapot with cel shading and a rotating light. An important thing to remember is that this cel shading effect is coded using ActionScript shaders. AS shaders is a feature of Minko: you program the GPU with ActionScript code and Minko’s JIT compiler turns it into AGAL bytecode at runtime. And the ActionScript to AGAL shader compiler runs just fine on mobile devices. Even better: Minko 2 will feature a new and even more optimized compiler so it will be very easy and very efficient to program mobile GPUs with ActionScript code! Considering my phone is not supposed to perform as well as the Samsung Galaxy SII or the iPad 2, I can just imagine what you can do on those! But I’ll have an iPad 2 tomorrow and I’ll try to see how BlackSun performs on it, so just be patient :) AIR 3.2 will be available “very soon” and so will be Minko 2. In the meantime, you can start playing with Minko 1 and get ready to rock on mobile devices! As usual, if you have questions/suggestions, please post them in the comments or on Aerys Answers.
  • Erravenden

    I can’t wait to see how well the iPad 2 handles it. 😀

  • http://www.austinkottke.com Austin

    Holy crap, this is awesome man. Keep up the great work – I cannot wait for this to be released!!!!!!!!!!!!

  • edi

    is any chance to get full working code??

  • edi

    thx much :)

  • edi

    it looks amazing.. i have changed framerate to 60 and my fps is around 45 on my Ipad1.. thx for great example. :)

  • http://marbayclip.blogspot.com/ marbayclip

    Hi.
    air3.2sdk Where can I find? What version of the SDK or different?

    • Promethe

      As far as I know the AIR 3.2 SDK is not available outside of the prerelease program.

      Regards,

  • http://studio3wg.com alchymi

    Euh …… La version de AIR que tu utilises est bien la http://labs.adobe.com/technologies/flashplatformruntimes/air3-2/ ?

    Parce que je crève d’envie de tester une des maquettes que j’ai faite http://www.jeu-de-voiture.com/course+de+voiture+radiocommande.php
    (Qui ne devrais pas marcher à cause de box2D qui utilise Alchemy)

    • http://studio3wg.com alchymi

      Bon je me répond à moi même j’avais pas lu la suite de l’article ..

      As a member of the private prerelease program, I have access to AIR 3.2 for Android/iOS with Stage3D enabled. So I decided to give it a try with the latest prerelease drop.

      Les boules ^^

  • Andrew

    Can’t wait for the full release! 😀

  • temp

    Sounds good.
    I’ve tried ND2D on my iPad.

    Cloud sprite test
    PC: 25 000 sprites
    iPAD: 19 !!!
    Everytest is slow like hell..

    What i’m doing wrong?

    • Promethe

      It’s hard to tell. I don’t know how ND2D works.
      But the iPad (1 and 2) seems to have difficulties when you try to use more than 200 draw calls per frame. Which should be enough for a game if culling is done properly.

      Regards,

  • Lotus

    Hello ~
    I’ve been trying this source in flash C5.5 with of course the update of AIR 3.2…
    But this i cannot get this teapot to work. I get the following errors :

    CelShadingShader.as, Line 77 1180: Call to a possibly undefined method lessThan.
    CelShadingShader.as, Line 46 1180: Call to a possibly undefined method getNamedParameter.

    I really dont understand why i get this. I would be really great-full if anybody have a fix for that.

    Best,

    • Promethe

      Hello,

      please use the sources available on my GitHub:

      https://github.com/promethe42/teapot-mobile

      This project was made with a development version of Minko available as a SWC in the /libs folder.

      Regards,

      • Lotus

        Oh thank you –
        So this swc is a part of Minko 2 ?
        Everything is working well now, i’m also really curious to try the shader lab soon ^^
        Really great work.

        Best

        • Promethe

          That swc IS minko. But an intermediate unreleased version of Minko 2.0.
          It features only a small subset of the new features.