1. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice
  2. We're looking for feedback on Unity Starter Kits! Let us know what you’d like.
    Dismiss Notice
  3. We’re giving 2017.1 beta testers a chance to win t-shirts and a Nintendo Switch. Read more on the blog.
    Dismiss Notice
  4. Unity 2017.1 beta is now available for download.
    Dismiss Notice
  5. Unity 5.6 is now released.
    Dismiss Notice
  6. Get further faster with the Unity Plus Accelerator Pack, free for new Unity Plus subscribers for a limited time. Click here for more details.
    Dismiss Notice
  7. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice
  8. Learn how you'll soon be able to publish your games to China in four simple steps with Xiaomi. Sign up now for early access.
    Dismiss Notice

WebGL and WebVR

Discussion in 'WebGL' started by MaT227, Mar 8, 2016.

  1. MaT227

    MaT227

    Joined:
    Jul 3, 2012
    Posts:
    572
    Hi there,

    I am wondering if Unity currently supports Oculus, Vive or some VR device using WebGL or if there's a way to do VR using Unity and WebGL.

    Thank you !
     
    linojon likes this.
  2. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    996
    Not at the moment. We have done some initial investigation and we will likely implement it at some point in the future, but this is not on our short term roadmap.
     
    Blarp likes this.
  3. MaT227

    MaT227

    Joined:
    Jul 3, 2012
    Posts:
    572
  4. arapps3d

    arapps3d

    Joined:
    Jan 13, 2015
    Posts:
    15
    Hello Unity team, can you specify when this would be approximately implemented?
    I'm searching for a solution to build a Cardboard VR project from Unity (WebGL Target).......Or maybe there is already a Web GL / WebVR Cardboard solution that I just did not find yet? Thanks in advance.
     
  5. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,477
    Today, it is possible to use WebVR in Unity using this plugin: https://github.com/gtk2k/Unity-WebVR-Assets

    In the future, we will have WebVR support integrated into Unity WebGL, so that Unity VR projects will work without modifications. We have a working prototype of this, I expect this to ship in Unity 5.6, or maybe 5.5.

    That said, since you mentioned Cardboard, I assume you want to target mobile phones. Due to performance and memory constraints in Unity WebGL, this is currently not recommended or supported. You can still try it, but expect results to be unsatisfactory.
     
    JairoGLoz likes this.
  6. arapps3d

    arapps3d

    Joined:
    Jan 13, 2015
    Posts:
    15
    Hi Jonas, thanks for the fast reply! I will check the github solution.
     
  7. BadSeedProductions

    BadSeedProductions

    Joined:
    Dec 26, 2014
    Posts:
    81
    Any updates? Is there anywhere I can go to follow the development of this?
     
  8. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,477
    No updates yet. This will not be in 5.5, possibly 5.6.

    That said, I think this feature will stay in an "experimental" state for a while to come. Not because WebVR doesn't work by itself (it does), but because the tech stack of the WebGL platform is, IMO, not ready to drive VR content yet (outside the realm of simple demos). VR requires consistently high frame rates with no hick-ups - but on a platform without threads, it is not possible to achieve that during the load of scenes for instance. So we will need other problems solved first before being able to use this for real production content. That said, I think there is value in having the feature available to experiment with before that.
     
    BadSeedProductions likes this.
  9. diegopit

    diegopit

    Joined:
    Aug 29, 2015
    Posts:
    4
    Hi Jonas, just wanted to ask if you have any updates on WebVR with WebGL. I have a lot of projects that are pending on this and some colleagues are considering to migrate to PlayCanvas (such a waste of time and resources).

    Thanks,
    Diego
     
  10. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    613
    Unfortunately this will not ship in 5.6. Chances are it will be part of Unity 5.7 as an experimental feature.

    But the limitations of WebVR in general still apply as laid out above.
     
  11. mhazani

    mhazani

    Joined:
    Jun 18, 2014
    Posts:
    1
    Great thread here, thanks for the clarifications and the link to the repo.

    Does anyone know how good the controller support is with the current third party solution? Can I expect Vive compatibility? I tinkered with it a while back and I remember the (old DK2) headset worked incredibly well.
    Thanks!
     
  12. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,477
    I don't think it has controller support - but it would be possible to implement that in JavaScript yourself.
     
    mhazani likes this.
  13. AbhimanyuAryan

    AbhimanyuAryan

    Joined:
    Apr 22, 2015
    Posts:
    13
    Looks like the future of web is also in Unity. Unity is more than gaming engine now...powering businesses
     
  14. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    284
    Im trying to understand whats the difference between VR and 3D, they both seems to be the same to me, except VR wants to you spend money buying goggles and controllers, memory and CPU, to get the same thing we had before using 3D.
     
  15. AbhimanyuAryan

    AbhimanyuAryan

    Joined:
    Apr 22, 2015
    Posts:
    13
    try AR if you don't want to spend money
     
  16. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    284
    Whats the difference between VR and 3D?
     
  17. JairoGLoz

    JairoGLoz

    Joined:
    Mar 9, 2017
    Posts:
    3
    Hi Jonas, any updates on this?

    WebVR support was not included in 5.6 u.u is it in 2017.1? or is it going to be in 2017.2?

    I'm currently working on a project in which building for WebVR is almost mandatory. I'm about to test with the project you suggested (https://github.com/gtk2k/Unity-WebVR-Assets), but nothing like having a Unity integrated tool for doing it.

    I really think WebVR is going to have a key role in game development in the years to come so I hope (and I'm almost sure) building for WebVR natively from Unity is going to be possible very soon.

    Thank you in advance.
     
  18. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    613
    It will not be in 2017.1 and probably also not in 2017.2.
     
  19. JairoGLoz

    JairoGLoz

    Joined:
    Mar 9, 2017
    Posts:
    3
    But it will be fur sure, right? next year maybe?
     
  20. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    613
    It is probable but usual disclaimer: predicting the future is tricky business.
     
    Last edited: May 12, 2017
  21. DNArt

    DNArt

    Joined:
    Jan 16, 2014
    Posts:
    16
    O wow Schubkraft thanks for your response but that is a bit disappointing and also worrying. I also noticed there are no new WebGL related improvements on the road map of 2017.1 and most is now labeled as in research. Does this mean the current state of the WebGl implementation is at good as it gets for us in the coming year?
     
  22. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    613
    Well, sorry if that is disheartening to not get WebVR soon. But we are still committed to WebGL as a platform and are actively working on it.

    We have some items on our internal roadmap that are in our hands to make and fix. We'll let you know once we know our scheduling.

    The items on the public roadmap are things were we are dependent on the browser vendors. We and they are currently working on fixing and improving WASM. Once people are happy with that the next step is probably going to be JS threading, after that threads for WASM and after that we'll see.

    There are also many things being worked on at Unity that will benefit WebGL a lot (better stripping, better asset bundle handling, ...) but are not part of the WebGL team.

    What WebGL specific features would you like to see? What is stopping you from making a WebGL game now?
     
  23. DNArt

    DNArt

    Joined:
    Jan 16, 2014
    Posts:
    16
    :) Hy Schubkraft Happy to read your response! I was afraid WEBGL was loosing attention slowly but this sounds very lively. I'm compiling to WEBGL at the moment with the template from Github. Using that seems easy so hopefully it works to. WebVR Its not so much for me as for my students at an art school that really love to get there hands on VR and WebVR particular. Me, I would be very happy with texture arrays for WEBGL. If i'm informed correctly the texture arrays could already be implemented i would love to use them for a custom shader and it could bring assets like mega splat potentially to others. from there forum "
    Q: Would this work on WebGL 2? If it is supposed to be functionally equivalent to openGL 3.0.
    A: In theory yes, but I don't think Unity has added Texture Array support to their implementation yet.."
    The threading would be a mega jump for sure. Thanks for the upbeat notice Web based 3D applications wil grow big so good to know Unity is still pushing hard for helping that happen.
     
  24. roka

    roka

    Joined:
    Sep 12, 2010
    Posts:
    291
    Hello and thank you for the information.

    I think that nothing stop us to release a game in WebGL exepting few bug but as exemple : https://issuetracker.unity3d.com/issues/wasm-runtime-error-integer-overflow-slash-unrepresentable , it has been reported a month ago and we still not have a fixe.

    I have found again a bug today with the camera using depth and MSAA (i will make a report tomorrow), and for me, it look that i spend all my time on making report for you, google ,firefox...

    I have reported a bug on google report 2 month ago (https://bugs.chromium.org/p/chromium/issues/detail?id=701970), and it's still not fixed ... , it's crazy... how we can move forward with some lazy guy like that ..

    I know that you (unity) try your best with the WebGL and i'm angry against the web browser vendors who have dropped the support for the unity web player before a perfect replacement solution.

    I have lose a lot of players because the performances for a 3d game using WebGL are not acceptable at the moment. I know that one day we will have similar performances WebGL/Unity Web Player but the process is soo long .... A lot of game are dying because of that.

    Have a good day.
     
  25. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    613
    We've got the WASM bug fixed internally and it will hit the 2017.1 beta soon (together with all other wasm bugs we know of). And it is labeled it as an experimental feature to indicate it is to be used with caution and that the ride might not be smooth.

    We know the pain of the death of the Unity plugin and we are in regular meetings with most of the browser vendors to coordinate and pass on your and our feedback. However the plugin was a very different platform. It was just a standalone build running in a browser window.
     
  26. roka

    roka

    Joined:
    Sep 12, 2010
    Posts:
    291
    Thank you for your answer.