Interactive Animator » PaperVision3D interactive app on Android Mobile

PaperVision3D interactive app on Android Mobile

Get Adobe Flash player


Papervision3D Demo
I’ve been experimenting with some of the new methods for touch in Flash Player 10.1 using Flash Professional CS5 with the latest Papervision3D targeted for AIR2 on Android 2.1 OS. Papervision does not yet have native support for the new touch features in Flash Player 10.1 but they still look awesome (and run well) on your phone.

3D UI
Interactivity in PPV3D is still very much reliant on Flash Player 9 methods, support for Flash Player 10 is coming soon in the form of PapervisionX, which is being built from the ground up.

In the meantime we are left without the ability to leverage the powerful touch properties from Flash Player 10.1 such as TransformGestureEvent.GESTURE_SWIPE directly on our 3D objects. Instead I used the interactiveScene3DEvent from PPV3D which simply is read as a MouseEvent by the touch screen. To that end, mouseX and mouseY will also control rotation and perspective of 3D objects if you already have a ppv project you want to move right onto your phone, you won’t need to do much else. There are a few demos out there like that now.

This demo does feature some of the new Flash Player 10.1 multi-touch features, particularly ZOOM and ROTATE which I added to the stage.

In the video you can see little touch points I’ve created and left visible so I could experiment with swipes and pinches. Finally I settled on using an ENTER FRAME Event to rotate the planet and changing the variables of speed and rotation with the UI. Each piece of the UI has its own listener for touch in the form of a simple Mouse Event. Obviously the UI would be hidden in the final build to give the illusion you are swiping the planet into the direction you want. This takes a bit of logic also.

What I really want is to tie in the swipe data into your rotation speeds or tween data. This unfortunately is not possible yet without a custom class delegating the events.

Performance
Next I wanted to test out was performance on Qualcomm’s Snapdragon 1GHz processor using ENTER_FRAME and TweenLite within Papervision3d. TweenLite performed pretty well, with the exceptions being any strong easing. ENTER_FRAME events using rotation properties seem to work the smoothest for interactivity for now but obviously there is no cool easing.

Optimization
In this demo I created one sphere and texture mapped it with a fairly decent sized png and used a quick jpg compression in properties (not the preferred method) to cut down the size. I used 20 poly’s on the sphere. There is one ENTER_FRAME event running on the stage to rotate the planet.

.apk size manageable!

.apk File Size.
Overall the .apk size was manageable which leads me to believe that you could do some very small interactive applications using Papervision3D right now.

thats a lot of bytes!

The class structure itself is where most of the byte size comes into play, but how that translates over to .apk size I have yet to investigate. I did not use best practice project and I could have exported a swc and optimized the image better.

Away 3D
I did not use Away3D for this demo simply because I didn’t have the time and both Away3D and Papervision are very similar. I did my homework and it seems Rob Bateman is doing awesome things with Away3DLite. The title of this post however is Papervision3D…. I promise to use Away3D on my next article so you can see the differences…and because I’m all about easier material mapping…but was it so hard in PPV? IDK.

History & Conclusion
In the past 3D games and UI didn’t flourish on mobile because of many reasons. Its not that there wasn’t a 3D Flash Lite platform in 2008, because there was. There were all those Java based 3D games as well. Poly counts using Java (J2ME) have never been as good as Flash Lite, but Flash Lite games never got much exposure because of their platform. The lines in the sand will be a little clearer now.

Well I hope you enjoyed this brief article about Papervision3D interactive apps on Android Mobile devices.

Posted on July 1, 2010 at 5:03 pm by Runtime · Permalink
In: ActionScript 3, Android, Articles, CS5, Flash, Mobile, animation · Tagged with: , , , , ,

Leave a Reply

You must be logged in to post a comment.