Tuesday, December 07, 2010

 

Adobe molehill 3D APIs - real 3D!

I've been asked a lot lately about the Molehill project. "Molehill" is an internal Adobe code name for a set of low-level, GPU-accelerated 3D APIs we announced at MAX 2010 (another reason never to miss Adobe MAX)!   The new Molehill APIs enable advanced 3D experiences across screens through the Flash runtimes and allow developers to leverage GPU hardware acceleration for significant performance gains. 


How it works today in Flash Player 10.1


Flash Player 10.1 renders thousands of non z-buffered triangles at approximately 30 Hz.  For true 3D, z-buffering is required.  This refers to the management of image depth coordinates in three-dimensional (3-D) graphics models.  It is very difficult to accomplish in real time due to the immense processing power required.  Unlike X and Y coordinates where there is a physical boundary, Z coordinates can extend infinitely, although the range of human eye perception is somewhat limited.


You can spoof 3D effects today using the Flex attributes "rotationX, rotationY and rotationZ".  Here is a project I made using a simple photo that moves it in 3 axis based on user input.  This is not true 3D however.



The source code for this project:






The Adobe website on Molehill states: "With the new 3D APIs, developers can expect hundreds of thousands of z-buffered triangles to be rendered at HD resolution in full screen at around 60 Hz. Using the new 3D APIs in Flash Player and AIR will make it possible to deliver sophisticated 3D experiences across almost every computer and device connected to the Internet.


The 3D capabilities enabled by the new APIs will also be available to the broader developer community through popular ActionScript® 3D frameworks, such as Alternativa3D, Away3d, Flare3D, Sophie3D or Yogurt3D."


Probably the single best description is from Thibault's video embedded below.  I cannot wait to get my hands on the technology!



http://tv.adobe.com/watch/adc-presents/molehill-3d-apis

Labels: , , , , ,


Monday, December 06, 2010

 

Generating a PKCS12 certificate for Android Market

I've been writing several Android applications lately (Video,   Scribbler,  FileBrowser) with the Flash Builder 4.5 (Burrito) preview release.  During the process of uploading one *.apk file I can across an error within the Android Market form.  Well, it wasn't a real error per se, more or less an oversight from me.  The error stated:


"Market requires that the certificate used to sign the apk be valid until at least October 22, 2033. Create a new certificate."






This is a requirement which I had overlooked.  By default, creating a certificate via Flash Builder (File > Export > Release Build) will not work as it is not valid for the length required by the Android Marketplace.  


I set out to make a proper certificate however there was not a lot of very current information available.  After a lot of searching, I found the answer right in front of me.  Using the AIR 2.5 SDK, you can create a self signed certificate using the line command tool.  If you have the same issue, follow these instructions:



  1. If not done already, download and save the Adobe AIR 2.5 SDK from http://www.adobe.com/products/air/sdk/

  2. With a line command tool, navigate to the /bin directory.

  3. Copy and paste the following command, replacing the values in braces with your own values.
    ./adt -certificate -cn (duaneallannickull) -ou (adobesystems) -o (sharkwithfrigginglaserbeamsinc) -c (CA) -validityPeriod 25 2048-RSA (./androidsigner.p12) (password)
  4. The country code must be in upper case characters and correspond to an ISO country code. For example, this is what I entered to create mine:

    ./adt -certificate -cn duaneallannickull -ou adobesystems -o sharkwithfrigginglaserbeamsinc -c CA -validityPeriod 25 2048-RSA ./androidsigner.p12 password

  5. Now enter the command "dir" (Windows) or "ls" (Linux || Unix) and you should see your certificate.  A screenshot is below. 

That's pretty much it.  You can use this to sign your applications in a variety of ways, depending on which development tools you use.  For Adobe Flash Builder 4.5, you can reference this certificate during the release process as shown below.


Thursday, December 02, 2010

 

Video Article - Comparing AIR for Android Development Processes

Yesterday I made a post about my experiences with the new Flash Builder 4.5 and 4.1 IDEs while developing mobile applications. Today, we follow this up with a video to illustrate some of the key points you'll need to get started.



Flash Builder 4.5 download

FileBrowser.fxp (Flash Builder 4.01/AIR 2.5 SDK project - 76 kb)
FileBrowser.apk (Android Package - 1.02 MB)
Installed application size = 1.02 MB (without graphics, icons, splash images etc)

MobileFileBrowser.fxp (Flash Builder 4.5 project - 840 kb)
MobileFileBrowser.apk (Android Package -1.78 MB)
Installed application size = 768 kb (with graphics, icons, splash images etc)

Have fun!

Labels: , , , ,


Wednesday, December 01, 2010

 

Mobile Development with Flash Builder (Tutorial and Source Code)


Today I am releasing a set of two applications, one built using the Flex 4.1 SDK and one built using the Flex 4.5 SDK (Burrito version of Flash Builder using the "Hero" framework).  Although the base application is essentially the same, the differences are astounding in terms of development ease and performance. 

The project itself is a simple project to demonstrate how to read/write to a file system.  The application is named LetMeC (“let me see”).   The screenshot below is of the application built using Flash Builder 4.01 overlaid with the AIR 2.5 SDK.  This one uses the FileSystemDataGrid component and has several helper classes.  The source code for the AIR 2.5 project is available here: 

FileBrowser.fxp (Flash Builder 4.01/AIR 2.5 SDK project - 76 kb)
FileBrowser.apk (Android Package - 1.02 MB)
Installed application size = 1.02 MB (without graphics, icons, splash images etc)



This second screenshot (below) is basically the same application written using the Flash Builder 4.5 Burrito preview.  This application is open and you can use it or install it on your device:

MobileFileBrowser.fxp (Flash Builder 4.5 project - 840 kb)
MobileFileBrowser.apk (Android Package -1.78 MB)
Installed application size = 768 kb (with graphics, icons, splash images etc)



Note that the installed sizes of the applications vary.  The first one is larger even though I never used any graphics for icons, splash screens or other bits.  The Flash Builder 4.5 Burrito application has a larger installer, however on the Google Nexus 1 disk, the installed application is only 768 kb, of which roughly 398 kb is images alone coupled with 230 kb of icons!  The Hero framework rocks! Here is a screenshot.




The differences in development are vast and I am definitely favoring the direction Adobe is running towards with respect to the Hero framework.  Mobile development in Flash Builder 4.5 is much easier.  For starters, there is a notion of "views" and features such as screen orientation are supported.  The first thing you will notice is that the list of components is greatly reduced.  The version of this I built using 4.1 used the component.  This component by itself is very heavy weight (it is still MX or Halo qualified, not Spark).  The scroll bars are difficult to use as the hit area on a touch screen is very small.  Also the orientation is something you have to do manually if you want your application to resize and reorient when the phone is tilted.

One item that works well on PC, Mac, and Linux is AIR’s “openWithDefaultApplication()” method.  No such luck on Android as the architecture uses a notion of “intents”.   It is easy to write code to access the functionality rather than accessing the notion of a "file".  One line of code will open up an SMS, URL, or even phone someone.  As the code samples from James Ward illustrate below:



Last thoughts?  I am now addicted to mobile development!  Adobe Flash Builder 4.5 rocks (even though it is a preview and somewhat "beta").  The most beautiful thing is that I can use 95% of my code for a desktop application too.

Try it for yourself.  Download the Flash Builder 4.5 preview from http://labs.adobe.com

I will post a video of this whole process very shortly on this blog.

Peace, love and may your code compile on the first try!

Labels: , , , , ,


This page is powered by Blogger. Isn't yours?