Matcha Design Blog

New GPU Support for Adobe Flash Player

Jason Brown - Tuesday, October 11, 2011

With the release of Flash Player 11, Adobe has finally added GPU support to Flash. Now 3D animation in Flash can benefit from full hardware acceleration. This is thanks to a new set of APIs called Stage3D.

Matcha Design Web Development Tutorial Series on New GPU Support for Adobe Flash Player 11

Stage3D is very low-level. That is to say, it's not abstracted from the hardware very far. It involves uploading resources to the graphics card and telling it what to do with them. The benefit of this is that it's extremely fast. The downside is that even drawing a simple cube becomes a pretty complex task. Fortunately there are already several commercial and open-source frameworks available to simplify the various tasks.

After looking at the features of a few of the frameworks, I decided to look more closely at Alternativa3D. Alernativa3D has been around since long before Stage3D, but with the latest release, the ability to leverage the new hardware support features is included. The thing I liked best about Alternativa3D (besides the fact that it's free) is that the objects in 3D space still get treated with the same type of hierarchy structure as existing DisplayObjects and DisplayObjectContainers, right down to addChild and removeChild.

I found Alternativa3D mostly easy to use, and I recommend it, but I mostly want to talk about Stage3D in general. The Stage3D APIs allow drastically improved performance over previous Flash 3D capabilities on most modern computers and other devices, including phones, that support hardware-accelerated graphics. Even on devices that don't support it, Flash transparently switches to a software renderer that's still an improvement over previous versions. This means that developers can create their content without worrying too much about compatibility, which is what Flash has always been good at.

I think this serves to reassert and even reinvent the usefulness of Flash on the web. HTML5 can no longer come close to the full capabilities of Flash. While a few browsers support hardware acceleration on Canvas elements, we're a long way from seeing pure HTML5/CSS3/JavaScript applications that include rich 3D content and interactions that work consistently across even the major browsers on the major desktop platforms. On the other hand, Flash works pretty consistently across all its available platforms and will automatically update to the latest version.

Of course the biggest problem with relying on Flash is the same it's been for some time now - iOS. However, with the ever-decreasing market share of iOS, the increased usefulness and reliability of Flash, not to mention the unfortunate death of Steve Jobs, there's always the slim chance that Apple will decide to allow Flash. I wouldn't hold my breath, but I think it would be in the best interest of their customers. Especially if we see a lot of mobile games made using Stage3D, accompanied by a small decrease in native iOS releases.

Here are some useful links: Adobe Stage3D / Getting Started with Alternativa3D / Alternativa3D / My preferred Flash development environment, FlashDevelop / Flash Player Content Debugger and playerglobal.swc (required to develop for FP11)

To develop with Stage3D using FlashDevelop, you'll need to set Flash Player 11 (content debugger version preferably) as your player in Tools -> Program Settings -> FlashViewer -> External Player Path. You'll also have to target Flash Player 11, and add "-swf-version=13" to Project -> Properties -> Compiler Options -> Additional Compiler Options. Of course you'll also want the latest versions Flex SDK and Air. And don't forget to include playerglobal.swc above.

About Matcha Design
Matcha Design is a full-service creative agency specializing in web design, print, identity, branding, interface design, video production, still photography and motion design. Using our passion for excellence, multi-cultural background, and award winning practices, we consistently provide high-quality, custom, innovative solutions to meet the diverse marketing needs of our clients. For more information, visit www.MatchaDesign.com.