Wednesday, March 25th, 2009

3D APIs are coming to the Web in force

Category: Canvas, Mozilla

There have been a few posts on the news that “in response to a proposal from Mozilla, Khronos has created an ‘Accelerated 3D on Web’ working group that Mozilla has offered to chair.”

Chris Blizzard (Director of Evangelism for Mozilla, and top chap) has some really good comments:

We’ve started to see more and more libraries being built to support use cases with Canvas in a 2D context but we really want to take things to the next level and start to allow people to use 3D capabilities as well.  Accelerated 3D graphics with the super-fast next-generation JavaScript engines from nearly every  web browser vendor means that we’re going to be able to start to see more and more advanced applications written using open web technologies.  3D is a huge part of that story and we’re happy to bring our proposal to the table.

The proposed spec (found in one of vlad’s post on 3D Canvas) is a pretty light wrapper on top of OpenGL ES 2.0, with some changes to support some JavaScript pleasantries.  OpenGL ES is a decent starting point, which is why we picked it.  OpenGL is supported as part of every major operating system and in it’s being picked up as a standard on mobile devices as well.  Compared to the full OpenGL spec, the ES variant is a smaller subset that reflects the reality of what’s being used on the ground and most hardware and software vendors have actually been re-tooling to support OpenGL ES with support for older versions of full OpenGL emulated on top of OpenGL ES.  Mixed with the fact that there’s a decent amount of knowledge out there in the industry of how to use OpenGL, we think that this smooths the integration between the current set of OpenGL users and larger web developer community.

And, there is the link back to Vladimir Vuki?evi?, the engineer who did the initial work (and who has been a huge help for Ben and I at Mozilla wrt Canvas and much more).

This is great stuff, and is it is important to clarify that this isn’t about 3D virtual worlds, like some people think. This isn’t VRML. The iPhone and the Mac are doing really nice 3D effects all the time these days. Close a window in OS X / Vista. Launch and quit Time Machine.

I am also glad to see OpenGL ES instead of yet another attempt at doing the 3D. There are a lot of tools and mindshare around this, and people will build great libraries on top of it I am sure for particular niches (apply some effects etc) and maybe we can get some uplift to CSS itself :) Oh, and i am really glad to see Google involved too!

I also saw Ryan Stewart weighing in and liked some of what he had to say, but was surprised by:

So it’s unfortunate to see that even the browser vendors have given up on moving the open web forward through standards. Whether it’s the WHATWG versus the W3C or the trials and tribulations of actually implementing HTML5, things are very broken and everyone is moving on regardless. I don’t blame any of them, but it doesn’t seem like it’s good for web developers.

Standards groups aren’t the place to innovate. Browsers should be creating compelling features, other browsers should copy the good ones, and then we can standardize. XMLHttpRequest wasn’t grown in the W3C. The cool CSS ideas that have been implemented in multiple browsers recently weren’t either. Browsers need to push more, not less. And, then we need the standards groups to rally and try to turn the -vendor-bar-baz into bar-baz. Giving Web developers more APIs is good for Web developers!

Posted by Dion Almaer at 8:59 am
11 Comments

+++--
3.9 rating from 36 votes

11 Comments »

Comments feed TrackBack URI

Your last comment about standards groups and innovation is spot on! In the end, I think the ecosystem of the open web may start from “proprietary innovation”. Everything successful in the open web has happened organically. What makes it part of an open ecosystem is not that it starts in a standards body, but rather that the participants have the goal of moving toward a standard. If 4 browsers implement the same functionality slightly differently, that may be ok in the experimental stage, but as it becomes obvious what the goal is, look at the existing implementation and make a decision. Then as a vendor you need to be committed to accepting the standard.

Comment by genericallyloud — March 25, 2009

The chicken and the egg…

I can’t think of any technology that has teased a feature as much as the canvas tag; forcing devs to write “myCanvas.getContext(‘2d’)” everytime is borderline sadistic!

Comment by rasmusfl0e — March 25, 2009

I’m not quite sure its spot on. The goal here is pretty obvious; low-level 3d api exposed through canvas. Why can’t this be a standard first?

Comment by ilazarte — March 25, 2009

The Khronos Groups *is* a standards organisation. It’s not very different from other places except in that its focus is very vertical. Companies that are interested pay to join, and send representatives to groups that define a specification.

They may be less open than others (notably W3C) during the process, but that doesn’t mean they’re not about building de factor standards (besides, they’re doing this under a royalty-free licence). The W3C co-operated with these guys when they did OpenVG (which is great), and all worked fine.

So it’s completely silly to say that browser vendors have given up on advancing the open web through standards. For one, they’re doing that in W3C right now, but what they do in TKG and in a number of other places (e.g. OMTP) — just because you haven’t heard of them doesn’t mean they’re not building standards — is also that. The open web is being advanced through standards more now than ever, and I think we’ve now more or less figured out the experiment-specify loop in a way that makes the ancient innovation v standardisation debate antiquated.

Comment by robinberjon — March 25, 2009

What I personally worry about (after working with both Opera and Mozilla implementations of Canvas3D) is that we may have a mismatch between the low-level OpenGL ES-based API and the high-level JavaScript. What’s simple on C/C++ doesn’t translate well to JavaScript: generating textures programmatically, traversing scenegraphs to regenerate pictures, or process events, practically any kind of animation/transitions, even 3D math takes some noticeable time, and so on.

But OpenGL ES for JavaScript is much better than nothing at all. ;-)

Comment by elazutkin — March 25, 2009

@tobie: that was mentioned here before.

Comment by Aimos — March 25, 2009

Call me a grouch, but this seems like a gimmicky tech demo. While there are 3D features going into browsers already, I can’t say I’m excited by them.

As for standards bodies not being places to innovate. Is this the groupthink of the day. Are you basically saying that CSS, SVG, XML etc were all mistakes. Weren’t most of these “innovative” technologies “designed” by standards groups well before viable end user implementations arrived.

When the browsers wars ended, and the winner stopped implementing newer web standards, the W3C became catatonic. They diverted all their attention away from the browser wasteland to the server, and mobiles.

While stuff like contenteditable and ajax came from outside the bodies. They also came with awkward, odd and sometimes illogical APIs. I would much rather see sane content-editable apis included in HTML5 rather than the gibberish that MS randomly came up with.

Comment by Deadmeat — March 26, 2009

For the kind of web apps/pages most people build the 3d transforms sported in some versions of Webkit would probably be more useful. It would be very difficult to use the 3d if I have to draw something into a canvas first.

Comment by charlesjolley — March 26, 2009

Dion, that last paragraph is especially scary. Browser wars with proprietary APIs are our only way forward and the standards bodies should consolidate the popular ideas “later” and assume all the browsers will just jump on board? Maybe for the major XHR-type features, but not for all. That is a fairly sure way to ensure developers have cross-browser issues. I like the idea that we get away from the unrealistic “standards bodies or nothing” approach, because there will always be proprietary features. But it doesnt mean we need to settle there.

Comment by Jigs — March 26, 2009

The difference between open proprietary innovation and closed proprietary innovation is a big one. Webkit and Mozilla have been extremely open about the work they are doing, putting code and specs into the hands of developers long before they reach a final release. Its not about competition by being different, its about bringing something new to the table to move forward. If it is done with openness and an intent on standardization, I think it is a worthwhile pursuit.

Not every browser vendor has the same interests. Mozilla pushes the boundary on js, Webkit on graphics etc. If you look at it historically, pretty much everything – even CSS and SVG had roots in an implementation before going to the standards body.

Take SVG – it didn’t come from thin air. From wikipedia:
“SVG was developed by the W3C SVG Working Group starting in 1998, after Macromedia and Microsoft introduced Vector Markup Language (VML) whereas Adobe Systems and Sun Microsystems submitted a competing format known as PGML.”

So yes “SVG” was created by the w3c after existing innovations wanted to create a standard. The problem was that Microsoft didn’t want to play ball. It had something already and didn’t want to go with the standards body. Its quite possible that the landscape would be a little different right now if either the w3c had decided to go with VML or if Microsoft had accepted SVG.

Let’s also not forget that specification that came before implementation – CSS3, SVG (specifically SVG as opposed to a vector markup), web forms, have been sitting around without widespread use, while things that exist and become a standard – XHR, Canvas have had much speedier adoption.

Comment by genericallyloud — March 26, 2009

Vlad will give a talk in SIGGRAPH silicon valley chapter on June 11(next Thursday) at Apple:
http://silicon-valley.siggraph.org/next.html

“Graphics on the Web: Going Beyond Images and Rectangles”

Comment by syang — June 2, 2009

Leave a comment

You must be logged in to post a comment.