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

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.