The Web is the next vanguard for 3D graphics, but programmers who want to embrace the new dimension next year will have to place a bet on one of two competing technologies: Flash or WebGL.
But at the same time, Web standards advocates have toiled to build such technology into the Web itself and not rely on the proprietary and sometimes insecure Flash Player plug-in. That work following in Adobe's footsteps is coming to fruition with the arrival of Web fonts, 2D graphics, audio and video, animated effects, and other features.
"We believe that 3D on the Web should be a first-class citizen running directly in the browser and not through plug-ins," said Tim Johansson, core developer at Opera.
That's a familiar refrain for Web development. There's s big difference with 3D, though: it looks like WebGL will beat Adobe's 3D Flash technology out of the gate.
"WebGL likely won't be finalized until early 2011, though a provisional 1.0 spec may arrive before the end of 2010," said Vladimir Vukicevic, the Mozilla principal engineer who helped create WebGL. Even more importantly, WebGL is the incumbent: developers for Firefox, Safari, Chrome, and Opera all have begun building WebGL into their browsers.
Here's the tricky bit, though: Microsoft is a WebGL holdout. Without Internet Explorer on board, WebGL's utility is greatly diminished to Web developers trying to reach the broadest market. And guess what? Flash works fine on IE.
In effect, Microsoft is an influential swing vote on the future of 3D on the Web. It's been frosty toward WebGL in the past and isn't commenting on it today. But if Microsoft chooses to embrace it in some way--and there are some signs it might--IE9 has a hardware acceleration foundation perfectly suited to the task.
One way or another, all this work will mean 3D will be more common on the Internet. That will help with several scenarios: building browser-based virtual worlds like Second Life, adding a new dimension to online map services such as Street View, bringing splashier interfaces and graphics to Web applications and Web sites, and improving online training and education. 3D isn't just for games.
Adobe's 3D Flash work, code-named Molehill, is well under way, but a beta isn't due until midway through 2011. "I'm thinking end of the second quarter or the beginning of the third quarter," said Anup Murarka, Adobe's director of product marketing for the Flash platform.
Don't count Adobe out just because it won't be first, though. Flash has legions of developers as well as mature programming tools. When it does arrive, it will be integrated well with existing Flash technology so programmers will get "access to the richness of the Flash environment they're already used to" when working with 3D, Murarka said.
The company's message is focused on the broad reach of Flash rather than how soon it will be updated with 3D features. Flash reaches 98 percent of personal computers today, the company said.
"There have been numerous options available for some time--other 3D plugins. That's something we're used to," Murarka said. "Our value is making this consistently available."
Practically speaking, though, Adobe couldn't move to 3D much faster, even with competing interfaces under way. That's because Adobe has been focusing on an even higher priority: support for mobile devices.
"I think the biggest element of the last 18-24 months has been rebuilding the foundation of our code base so it would be capable of being delivered across multiple screens. Designing the foundation to scale across desktop, mobile, tablet, and television is not a trivial undertaking," Murarka said. "Doing an entirely new 3D pipeline and engine isn't a simple task either."
The Molehill coming-out party was October's Adobe Max conference. Adobe showed zombie-slaying and car-racing games, rounded up 3D gaming allies to help show off Molehill, and published several Molehill talks online. In those talks, Adobe revealed that Molehill is a very low-level interface. But other companies--and eventually Adobe itself--will build a higher-level interface atop Molehill for those who prefer to deal with more elaborate 3D constructs such as objects and scene graphs.
With hardware acceleration, Flash 3D should be able to draw imagery constructed of hundreds of thousands of triangles on a high-definition screen refreshed 60 times per second, Adobe said. Under the hood, Flash 3D will employ Microsoft's DirectX 9 interface on Windows for handing off 3D instructions to the video hardware. On Linux and Mac OS X, Molehill uses a different 3D interface standard, OpenGL 1.3, and on mobile devices, it uses the stripped-down OpenGL ES 2.0 that's available on newer iPhone and Android phones.
Flash's plug-in nature, though, keeps it one step removed from Web page elements and all the standards Web developers can use to control such elements.
That isolation might be changing, though.
"The Web community is now looking at new ways to modernize plug-ins--like clever ways to integrate plug-ins more seamlessly so that their content is searchable, linkable, and can interact with the rest of the Web page," Google said in its "20 Things I Learned About Browsers and the Web" book.
Flash also has its own plug-in competitor, Unity 3D. It's been installed on 40 million machines and powers hundreds of online games already. Unity 3D is a higher-level programming foundation, a game engine with abundant built-in features. Thus far, though, it doesn't extend to the mobile Web and doesn't enjoy Flash's widespread use.
WebGL under way
This compatibility with OpenGL is a big selling point for WebGL.
"There are many resources that teach WebGL on the Web, in books, and in classes. In addition, most university students are at least exposed to OpenGL. All this knowledge and information translates easily to WebGL," Vukecevic said.
And programmers won't have to deal with the nuts and bolts of WebGL, said Henry Bridge, a Google Chrome product manager.
Google itself has one of those frameworks. It began as a plug-in called O3D. "The WebGL implementation of O3D is already usable," Bridge said. "Some other popular frameworks are SpiderGL and GLGE, but we're sure there will be many more."
WebGL will work on mobile phones. That's a requirement these days, with smartphones gaining in popularity, power, and usage. Those that support OpenGL 2.0 will benefit from hardware acceleration, which is all but essential for 3D.
Molehill also is designed to work on mobile phones, but Apple's ban on Flash for iOS devices significantly undermines Flash's cross-platform programming sales pitch.
WebGL has its own Achilles' heel, though: Microsoft's lack of support in Internet Explorer, including the new IE9 under development.
DirectX is a powerful Microsoft advantage for keeping the videogame industry in the Windows orbit, and it's no surprise that Microsoft might hesitate to do anything that might undermine that advantage by supporting a cross-platform graphics interface.
But the operating system balance of power is changing. Mac OS X may be an afterthought for personal computer game developers, but the iPhone and iPad definitely aren't. Mobile is a hot, growing new market where Microsoft is comparatively feeble and where OpenGL has the advantage.
Bridge would like Microsoft on board, but believes WebGL will succeed without the company. "Even if they don't implement it..., we're confident that the addressable audience for WebGL content is big enough (and growing) so that it will get traction with developers," he said.
There are signs Microsoft could be persuaded to support WebGL.
Earlier this month in France, World Wide Web Consortium (W3C) members held the weeklong Technical Plenary / Advisory Committee meeting to discuss Web standards. There, Microsoft senior program manager Michael Champion said in a presentation (PDF) that "Microsoft wants to see the next-generation Web innovated at W3C," and mentioned one specific item for discussion: "Getting 3D Canvas work into W3C." The W3C already oversees the Canvas 2D work for two-dimensional graphics; WebGL got its start as Canvas 3D and uses HTML's Canvas interface.
And the W3C is exactly where WebGL appears to be headed.
"It's unlikely that the standard will move from within Khronos, however we expect the standard to be published by both Khronos and eventually the W3C," Vukicevic said. "We're working to make that happen in time for the 1.0 spec release."
A different angle
Another Microsoft-related WebGL hitch is that OpenGL isn't well supported on Windows, where the DirectX interface and its Direct3D component is the interface of choice.
But Google launched a project called ANGLE that grafts WebGL onto DirectX. The technology is "quite mature," Bridge said. "We plan to use it as Chrome's default rendering path for WebGL on Windows, and plan to submit it to Khronos for conformance testing as an OpenGL ES 2.0 implementation shortly."
"ANGLE's actually working incredibly well," Vukicevic said. "I was a bit unsure about that approach originally, but we're seeing virtually no performance difference between using OpenGL directly and going through ANGLE to talk to Direct3D."
Mozilla will provide an even stronger endorsement, too: "We'll be integrating it in a future beta for WebGL support," Vukicevic said.
That's a big help for making sure WebGL will perform well on Windows. But it's no deciding factor.
In all likelihood, WebGL and Molehill will make it to the Web. Programmers will just have to reckon with both.