WebGL Roadmap

Yes you can for a while now, however displaying a single sbsar in a Sketchfab scene compared with numerous Substances in a Unity WebGL scene is a rather different task. This is where the squeeze on performance becomes an issue with WebGL 1.0. Hopefully WebGL 2.0 will provide better scope for this :).

6cd36769aa2b406cbf87df35052ec58e

In the meantime, we can use the Export Bitmaps option in the Unity Inspector once we have adjusted our Substance procedural settings:

1 Like

Eric Batut from Allegorithmic says : "
More work is needed on the Unity side (shared array buffers or something like that) to emulate threaded operation between the Main Thread and the Substance Thread before integrating a WebGL build of the Substance Engine can be considered.

Rewriting the entire Main Thread ↔ Substance Thread communication layer to be single-threaded (and making all Substance operations blocking operations) could be a workaround, but this would be throwaway effort and is very much not on the roadmap right now.

Best Regards,
Eric"

So is WebGL 2.0 good to go in Unity 5.4? I noticed it’s not listed as experimental in the project settings. I’m eager to try it out so we can put skinned mesh renderers on the gpu (our current biggest bottleneck on webgl).

This is what the blog post says:
We’re also excited also to announce that WebGL 2.0 is available in Unity as an experimental target. While the WebGL 2.0 spec is still a draft and not yet in current releases of the web browsers, you can get a head start with Firefox or Chrome, by enabling it in Unity.

1 Like

A new problem is on 64bit Chrome( last version - 54…m(64 bit) ) a WebGL doen’t work !!! :face_with_spiral_eyes:

WebGL supports WWW class to download of video?

Notice Android is getting Linear color space, can you comment on if is planned for webGL soon?

Unity WebGL is going to get linear color space too, though we don’t have a date yet since we depend on browsers to implement srgb texture compression format support. It is currently being worked on so hopefully it won’t take too long.

1 Like

Any updates on wasm as browsers are on the brink of enabling it?

http://www.infoworld.com/article/3137206/javascript/webassembly-now-available-as-release-candidate.html

PS It would be great to see a asm.js vs wasm benchmarks comparison using the Unity WebGL benchmark.

1 Like

There’ll be an experimental build with wasm support for you to test with in the future.

It is running internally and we are in contact with all the browser teams to iron out the kinks and give feedback. As mention in your linked article the spec isn’t completely done yet.

I have been side-scripting JS on PlayCanvas the past couple of months and their WebGL does seem very efficient and rarely crashes my Firefox. In the below link, they say that they “handcrafted” their WebGL engine for maximum efficiency and that Unity and Unreal both use a less-than-efficient “Emscripten” translator that processes through 3+ languages. Hopefully, Unity dev team is looking to make its WebGL more efficient – and competitive. :wink:

2 Likes

I’m not sure if the roadmap thread is the right place to discuss things like stability, reliability and performance. But the blog post of PlayCanvas describes many pains we also have in our Unity app.

I think you can not directly compare Unity and PlayCanvas. But I would also like to see WebGL as a first-class citizen in Unity. In my opinion at the moment the WebGL export is not really “web ready”. Yes it works somehow but it’s not really reliable and competitive. The following sentence expresses the state of the WebGL export quite well:

And I can provide numbers from our real world app. We prevent all mobile users and all users with pre Internet Explorer 11 versions from starting our Unity build and we are still losing almost 15% of the remaining users. In total numbers this is for the last 7 days: 17584 users tried to start the Unity build and only 15034 acutally saw the first scene. This is a dropout rate of 14.5% which is enormous high especially because we already prevent users with “problematic setups” to start our build.

I hope the WebGL export will be reliable one day soon because rewriting our whole Unity app in something like PlayCanvas would be a huge invest in time and money.

Are you guys planning to use more of the web technologies which the web platform already offers or are you betting for web assembly to solve all these issues?

2 Likes

Let me tell you, Unity’s WebGL has come a LONG way since it’s first beta release. I consider it usable now, albeit pretty limiting. I do Arch-Vis work and send a link to clients with spicific browser recommendations. I could see how you would run into trouble managing users from across the board. I’ve experimented using a lightweight SketchFab snapshot of my scene for mobile since most people are checking email that way. Better than an error message and gets their attention better than am image.

I’ve also looked into PlayCanvas and some others including Arch-Vis spicific WebGL solutions. I just couldn’t reproduce my work in another environment. My biggest complaint is graphical quality. I use forward rendering because the built in AA is far superior to any of the differed post processing options. But if you ad any additional effects it breaks the AA.

Standalone is dying. No one wants to download anything, and god forbid have to update it. In my opinion If the technology doesn’t work on the web, it doesn’t work.

2 Likes

Amen brother, say it like it is.

At the moment, there are issues with the builtin AA and ImageEffects on Windows, due to the rendering back-end (Angle) used by several browsers. This problem is solved with WebGL2.0 in 5.6 (we might consider back-porting to previous versions). By the way, we are updating docs with this information.

For the time being, if you need both Image Effects and AA, I suggest you do not use the built-in AA, use a post-processing base technique instead.

Unity3D 5.5 : WebGL: Aded the option to use Brotli compression instead of Gzip.
What’s it mean? Files .*gz will be changed?

You should indeed. Especially since 5.5 is only released now. How many months would we have to wait for 5.6?

So I installed 5.5.0f3 this morning, and then published a project using the WebGL 2.0 build option (or just WebGL since WebGL 2.0 is the default).

I’ve been assuming that WebGL 2.0 would yield considerably smaller build files and be less demanding as far as browser memory is concerned.

I enabled WebGL 2.0 in Firefox and then loaded the project. While I have not done extensive testing, I cannot see that file sizes are any smaller and the load time is still pretty long.

I am sure that the build is much better considering the long list of enhancements and fixes to WebGL, but am I wrong to assume that file size and load times should be much smaller (compared to 5.3)?

Is it that the published content still needs to accommodate browsers that don’t support WebGL 2.0?

WebGL 2.0 is just the graphics api. It has very little to do with load times and build size. I think what you are actually waiting for is webassembly (not in 5.5, maybe 5.6).

WebGL 1.0 = OpenGL ES 2.0.
WebGL 2.0 = OpenGL ES 3.0.

1 Like

What @kognito1 said is spot on. WebGL 2.0 doesn’t do anything to file size or load times. It just allows you to use fancier OpenGL/graphics stuff in your shaders and enables us to support more gfx features.

With 5.5 we’ve made WebGL 2.0 the default graphics API. You could do that in 5.4 yourself already if you wanted to.
When a browser doesn’t support 2.0 the Unity content will fall back to 1.0 unless you explicitly removed 1.0 from the graphics APIs before building your project.

The confusion here probably comes from the ambiguous naming of things. We named the platform as a whole WebGL while it is also the name for the Khronos groups graphics API standard.

2 Likes