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:
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.
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.
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.
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.
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?
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.
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.
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.
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.