Architosh

WebGL 2.0—Why It’s the Path to Stable Open Standards-based 3D Web Graphics

HERE AT ARCHITOSH, we have had a long history of focusing on not just the CAD and 3D applications that make the AEC and manufacturing industries go around, but the core technologies that are behind these applications. Few core technologies, if any, are as vital in the current era as WebGL.

Why WebGL—Its Importance

WebGL is hugely important for several reasons. As a technology, it is a “plugin-free” 3D graphics technology for the modern web browser. The Internet has a long history of attempts at 3D graphics in browsers via plugins, but users, in general, are not particularly adept at managing the plugin process and the process of installing plugins are disruptive to contemporary expectations around business workflows. So no plugins.

01 – WebGL 1.0 is currently highly utilized and enables professional apps like Onshape and Frame to run in modern web browsers across many operating systems. It works well because it taps into the openness of OpenGL. WebGL 2.0 will propel this standard and drive innovation across all types of professional 3D apps on the web.

WebGL is also based on OpenGL ES, a hugely successful open industry standard for portable graphics that works across every computer operating system of significance. While there has been a massive explosion of 3d capabilities in hardware across devices of all types—from workstations to smartphones—, the web browser itself hasn’t been a major consideration for a 3D application target for developers until the Khronos Group established the WebGL Working Group and a set of development standards.

WebGL History

WebGL 1.0 was launched in 2011, the year the Apple iPad began to see significant interest in enterprise industries like AEC. Heralded as a cross-platform, royalty-free web standard that brings high-quality 3D graphics to the web browser with plugins, WebGL has taken off. It is by far the most widely used web graphics API on the market and is universally supported by all the major browser vendors from Apple, Google, Microsoft, and Mozilla.

 

 

We wanted to be successful in bringing the power of visual expression to the huge numbers of web users.

 

 

The beginning of WebGL started in 2006 with Vladimir Vukicevic, then Senior Software Engineer at Mozilla, who began experimenting with 3D concepts on the web at a time when Javascript was nowhere near as powerful as it is today. While at Mozilla he began creating prototype OpenGL 3D context in Canvas, and then, he approached the Khronos Group about starting a new working group for a web-centric OpenGL variant, which was later dubbed WebGL.

Early WebGL Supporters

The early supporters of WebGL included AMD, Apple, Microsoft, Mozilla, Google, Intel, NVIDIA, Opera Software, and Qualcomm. This group helped redefine the standards for web graphics, which at that point were a mixture of proprietary technologies like Adobe Flash and Unity’s 3D player. Such technologies asked users to install something, typically a plugin. However, users’ interests fall off each time they are asked to install a plugin, so WebGL from the beginning was going to be automatic and require nothing on the end-users’ part to utilize.

02 – The Khronos Group’s long journey in bringing about open, industry-standard Web-native 3D Graphics. (image: Khronos Group / Architosh. All rights reserved.)

The goal of the WebGL Working Group was simple: bring 3D graphics to the web, on every browser, with no security issues for the end user, without requiring a plugin, and with high performance.

“We wanted to be successful in bringing the power of visual expression to the huge numbers of web users,” says Ken Russell, Software Engineer, Google, and WebGL Working Group Chair. Olli Etuaho, Systems Engineer, NVIDIA, adds, “The main principles were clear: to be robust, portable, stable, and fairly high-performance in as many places as possible. And, of course, it couldn’t have any security issues for the end-user.”

Overcoming Barriers—The Long Road to a Successful WebGL Standard

WebGL didn’t have an instant success path, despite the heavy hitters listed above all being behind the new standard. There was suspicion about its long-term security due to the API being able to access data. To solve this, the working group developed WebGL so that graphics memory is always initialized before use, ensuring that websites won’t be able to access any data they’re not supposed to. There are also many other security layers built in, giving WebGL industrial-strength security for developers and their end-users.

 

 

People were suspicious of WebGL early on, even in the 3D space. Plugins had come and gone and had had various catches and caveats, so people were gun-shy with WebGL.

 

 

Another challenge WebGL had to overcome was proving its capability in the market. The working group made sure all the major browser developers were behind the new standard and that compliance testing could show that the WebGL code was portable across browsers.

MORE: A Unified Graphics Future—How The Khronos Group Intends To Get Us There (Part 1)

“People were suspicious of WebGL early on, even in the 3D space. Plugins had come and gone and had had various catches and caveats, so people were gun-shy with WebGL,” says Jeff Gilbert, Senior Software Engineer, and WebGL Lead, Mozilla. “For a game or an application, it was a big gamble to stake their future on. From their perspective, it was: ‘We are going to do this because WebGL allows us to do this. I really hope WebGL is still around in a few years.’ So, having to prove that wasn’t easy in the beginning.”

One advantage WebGL had was it was an open standard freely available for the company to participate in. As an open-source API, it meant feedback through Github through issues and pull-requests has been vital to conformance testing and the community played a huge part.

02 – WebGL 2.0. An image of the standard showcasing some of its features. (image: Khronos Group / Architosh. All rights reserved.)

“Open participation has been absolutely key in the development of WebGL 2.0, especially in the related conformance tests and in knowing where we needed to invest our development time to make sure it would behave portably and that it would provide end-users with what they need,” says Russell. “It couldn’t have worked, at least not as well, in a closed forum.”

Setting a Standard of Collaboration

WebGL sets a good standard in open collaboration on development projects. With so much of the work out in the open on common tools like GitHub, the work has made the process more efficient, with a better use of resources, and greatly reducing work duplication. For example, with a shared code base that meets everyone’s needs, everyone can pool resources and focus on making improvements.

Even after embracing the open-source world of collaboration, WebGL wasn’t done breaking new ground. WebGL brings together diverse operating system vendors and hardware vendors toward a common goal. As web developers attempted to make their WebGL code run identically across all devices, many corner cases in the underlying graphics APIs, as well as graphics driver bugs, were found. While no software is exempt from bugs, WebGL promises that your graphics code is written once, and it works everywhere. The WebGL working group worked closely with all of the hardware vendors to report these bugs, get them fixed, and add conformance tests ensuring that they would remain fixed. This close collaboration with the community and GPU manufacturers has improved the overall quality of the graphics ecosystem. WebGL feeds into its partners to create a win-win situation for everyone involved since WebGL stands on the shoulders of those GPUs and drivers

next page: Milestones on the Way to 2.0

Milestones on the Way to 2.0

There were many important milestones on route to WebGL 2.0, with Google Maps becoming one of the biggest users. It was a serious step in verifying the stability and longevity of WebGL.

While WebGL 1.0 was revolutionary because it produced accelerated 3D content on the web with no plugins, it was still modeled on an older API, OpenGL ES 2.0, that came with certain limitations. WebGL 2.0 was released in January 2017 on Chrome and Firefox, bringing in many new capabilities from OpenGL ES 3.0.

Designing WebGL 2.0 started by consolidating some of the functions that had been available through WebGL 1.0 extensions, and then reducing some of the restrictions that had been placed on WebGL to make sure it would run reliably in as many environments as possible. The resulting WebGL 2.0 is a much more flexible API that enables advanced effects with greater ease.

04 – The huge success of Onshape is partly a testament to its SaaS-based agile development model, and WebGL is the final tech that brings this app to life in the end user’s browser.

Updating the architecture of WebGL 2.0 functionality was the biggest single task, but the WebGL Working Group wasn’t alone. All new OpenGL ES features had to be added back into the old architecture, and Intel’s GPU team lent a hand, in both specifications and testing. NVIDIA also contributed to the spec, testing, and implementation efforts. Every aspect of the API was upgraded in some way, and each upgrade was thoroughly tested. Conformance testing alone took nearly a year, but it was necessary to define a consistent behavior and a consistent API set across a range of devices and browsers.

The Khronos Group Ecosystem and the Future of WebGL

As has been discussed on this site many times, WebGL is a pivotal technology behind professional 3D applications delivered via a SaaS (software as a service) model. Key new MCAD applications like Onshape are completely SaaS-based CAD applications working through your modern browser.

 

 

Before WebGL, you couldn’t really do 3D on the web at all. There was powerful 3D hardware everywhere on both desktops and mobile phones, but the web couldn’t tap into any of it.

 

 

The importance of WebGL being created and maintained within Khronos shouldn’t be understated. Khronos brought together the browsers and the GPU vendors, and WebGL’s success is a direct result of tight design cooperation between those communities. Khronos has a long history of bringing those two communities together under one proven IP framework, which is important from a legal standpoint.

Low-Level Explicit API Directions

With the new era of explicit, low-level graphics APIs like Vulkan, a natural interest for those behind WebGL is moving aspects of it in that direction. The Khronos Group welcomes industry discussion around evolving WebGL in that direction. Experience developing WebGL has shown that web API experts, GPU vendors, and native API experts are all needed at the table when designing such an API, and Khronos is the one organization with a proven track record of bringing these experts together.

“Before WebGL, you couldn’t really do 3D on the web at all. There was powerful 3D hardware everywhere on both desktops and mobile phones, but the web couldn’t tap into any of it,” says Vukićević. “There were some plugins, but users had to do an extra installation step that was a huge obstacle to adoption. All the browser vendors knew that this was a challenge that needed to be resolved, which is why we came together as a Khronos Working Group.”

05 – WebGL 2.0 momentum is building as the new standard becomes more widely adopted, backed up by universal support of WebGL 1.0 in all the leading browsers. (image: Khronos Group / Architosh. All rights reserved.)

The Khronos Group admit that WebGL 2.0 was a huge undertaking, but the efficiency, speed, and resource improvements from WebGL 1.0 are very clear. WebGL 2.0 speeds up some rendering techniques, such as deferred shading, and enables new ones, such as stateful particle systems via transform feedback, and volumetric rendering using 3D textures. This improved efficiency leads to better quality and performance at a lower price, improving battery usage on mobile devices.

WebGL—A Natural Part of the Fabric of the Web

WebGL has become a natural part of the web, reliably producing consistent 3D graphics across platforms and browsers. WebGL has 97 percent activation on Firefox and is looking to round that out to 100. WebGL 2.0 implementation is expected on nearly every browser, as it is with WebGL 1.0, along with adding key extensions that will dramatically increase the power of writing WebGL applications.

WebGL 2.0 offers new capabilities, and with WebGL 1.0 still around as the solid foundation, the expectation is that WebGL will continue to effectively and reliably provide 3D graphics with no plugins and the highest level of security.

“From the beginning, my goal was to be on every browser,” concludes Vukićević.

Major browser vendors Apple (Safari), Google (Chrome), Microsoft (Edge), and Mozilla (Firefox) are members of the WebGL Working Group. If you are interested in finding out more about WebGL or accessing the specification, please visit www.khronos.org/webgl

Exit mobile version