Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Reconsider supporting a HTML5 + WebGL Javascript API Exporter

Discussion in 'General Discussion' started by UniteMage, Apr 20, 2013.

?

How do you support WebGL?

  1. No WebGL ever....

    17 vote(s)
    19.5%
  2. When HTML5 becomes available, support WebGL

    24 vote(s)
    27.6%
  3. WebGL NOW

    50 vote(s)
    57.5%
Multiple votes are allowed.
Thread Status:
Not open for further replies.
  1. UniteMage

    UniteMage

    Joined:
    Aug 22, 2012
    Posts:
    120
    Imbarns

    IE - 11 is developing something like WebGL through DirectX.

    CSDG
     
  2. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    +100
     
  3. pkid

    pkid

    Joined:
    Jul 10, 2009
    Posts:
    201
    Not sure if this was posted before, but it looks like WebGl is probably coming to IE:

    http://www.theverge.com/2013/3/30/4...bgl-support-internet-explorer-11-windows-blue
     
  4. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
  5. UniteMage

    UniteMage

    Joined:
    Aug 22, 2012
    Posts:
    120
    OK Guys

    The HTML5 and WebGL is all NEW... It is all very exciting. Just take a look out there. It is booming so bright, can't you see what's going on?

    Other game engines are jumping on this... I am jumping on this... What ever game engine supports this, I am supporting it.

    Come on Unity - Please support this!

    CSDG
     
  6. pkid

    pkid

    Joined:
    Jul 10, 2009
    Posts:
    201
    That might be true, but it is probably a year + before we would see any Unity support anyway, so this is all about the future.
     
  7. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    No, it's new "to you", and you're jumping around all exited as if it was the 2nd coming of christ, to many of us it's not new and something we've followed before it even released. So we don't need to "review" or "think about it" or "have a look", we did.
     
  8. UniteMage

    UniteMage

    Joined:
    Aug 22, 2012
    Posts:
    120
    Thank You pkid... There is hope after all.

    CSDG
     
  9. fbgbdk4

    fbgbdk4

    Joined:
    Apr 10, 2012
    Posts:
    128
  10. ColossalDuck

    ColossalDuck

    Joined:
    Jun 6, 2009
    Posts:
    3,246
    This thread is hilarious. It feels like I just read an argument between a teacher and a teenager that 'knows everything'.

    The cost is definitely not worth the port at this point, and my guess would be it won't for years.
     
  11. Dabeh

    Dabeh

    Joined:
    Oct 26, 2011
    Posts:
    1,614
    Mate, ronan, I think he's screwing with you.
     
  12. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Well i was unsure for a while, and pretty sure when i said i'd stop answering him, but it was the night i had nothing to do anyway :)
    Can't beat the troll, but you can try rawr!
     
  13. Dabeh

    Dabeh

    Joined:
    Oct 26, 2011
    Posts:
    1,614
    What a biased poll...wheres the option for "Want WebGL, but not at top of priorities"? Any new platform is good, but I understand it's very unrealistic for Unity to support it. Doesn't mean I don't want it, doesn't mean I want it now.
     
  14. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    *runs to make a poll for glide support"
     
  15. Filto

    Filto

    Joined:
    Mar 15, 2009
    Posts:
    713
    Well I learned a couple of things so it was a useful thread despite the trolling. And kinda entertaining seeing ronans frustration
    . Got any hair left or did you pull it all off? :)
     
  16. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    I don't even have nails left, actually i think i may be missing 1 or 2 fingers too!
     
  17. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,614
    I'm not against HTML5/WebGL export support for Unity, but I can think of a hundred other things I care more about them delivering first.
     
  18. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,337
    Unity core features have been slowed down due to multi-platforms support (yeah the lowest common denominator rule).
    No I don't want more platforms, I need a rock solid optimized and improved version of Unity. The more you support platforms the harder it's to add new features to the engine.
     
  19. SomeDude

    SomeDude

    Joined:
    Feb 16, 2012
    Posts:
    95
    This
     
  20. Filto

    Filto

    Joined:
    Mar 15, 2009
    Posts:
    713
    Porting to JS was exactly what Unreal did though. Atleast thats what my friend who is very much an expert on WebGL said :)
     
    Last edited: Apr 21, 2013
  21. pkid

    pkid

    Joined:
    Jul 10, 2009
    Posts:
    201
    With HTML5 out there is now a push to get rid of plugins. If you are on a windows 8 computer you can not install plugins in "metro" mode, which is the default mode. I think if IE starts to support WebGl then unity will eventually have to support a WebGl export, especially since their competitor seems to be going in that direction.
     
  22. jc_lvngstn

    jc_lvngstn

    Joined:
    Jul 19, 2006
    Posts:
    1,508
    Yep.
     
  23. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953

    No,
    they used an incredibly optimized programming language (not JS) that works only in nightly builds of Firefox. This is not effective for Unity.
     
  24. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Nope since they are going to support metro apps their much easier and user friendly dolution would be to link to the windows store app link for those who can't use the player. Not to a heavily degraded and slower in browser version
     
  25. techmage

    techmage

    Joined:
    Oct 31, 2009
    Posts:
    2,133
    I really wish unity had a webgl html5 export.

    I don't want the whole engine, all I want really is just to be able to export 3D models with some basic scripting in them to be viewed in webgl. Like export a archviz of a building, with some script for controls, and some UI.

    Cause if unity doesn't do that, that means i'm going to have to go to something else for that.

    I think it could be feasible for them to port the core of the rendering engine to webgl, with a mono convertor that translates some of the most base functions, to allow you to do simple thing with WebGL. Albeit, I don't expect that to happen. As I think it would only be valuable for guys doing archviz where, just a model and simple controls is valuable. Which I don't think Unity really recognizes there arcvhiz users specifically, yet. I hope they do at some point...
     
  26. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    If what you want is just a way to go from unity scene (with only basic features, just models textures and basic light) and have that explorable in webgl then it should be pretty easy to write something (don't need source access) that exports the scene model lights info that you could load in a html5 engine. I don't think unity should do that, sounds more like something that could be filled by some asset store offering.
     
  27. Dabeh

    Dabeh

    Joined:
    Oct 26, 2011
    Posts:
    1,614
    I think he was making a joke, because the OP never stopped talking about WebGL when it was about JS.
     
  28. jonkuze

    jonkuze

    Joined:
    Aug 19, 2012
    Posts:
    1,685
    didn't follow the whole debate...

    but i think Unity should support WebGL someway somehow... as what WebGL is presenting is the ability to run an Application or Game in the browser without any plugins. People want faster and faster speedy access to everything on the web, even if it means 1 less click or 2 from installing a webplayer or plugin / update then i'm pretty sure this going to be the next big thing!

    WebGL is totally a Create Once Published Everywhere Solution of the Future. Just about everything has a Web Browser today... Mobile Devices, Video Game Consoles, and of-coarse Computers. this may be a little far fetched here, but imagine every hardware / device with a Web Browser supporting WebGL in the near future with good performance?

    You could now build your game and Publish as WebGL Client, now everyone can access, play the game on any gaming hardware or device. While that sounds COOL! I know we are a long way before this happens if ever...

    I'm keeping an eye out for WebGL, whether Unity Supports it or Not doesn't matter to me personally (would be nice), but if they don't i'm pretty sure I will start working with another engine designed for WebGL like http://www.ambiera.com/coppercube/ eventually as I personally believe the Browser is the OS of the future... we spend most of our time in the Browser, with Chrome OS ahead of it's time, i think it says alot about what's coming along side the development and growth of Cloud Computing.

    if Unity does not eventually support WebGL aside from the technical reasons, it could also be because they are working on a Cloud-Based Game Streaming option with a Company called GameString see article here: http://www.gamasutra.com/view/news/..._For_CloudBased_Web_Player_Game_Streaming.php

    seems like they will be able to render games on the server side, and stream them via HTML5.

    Only time will tell...
     
  29. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    There are already tons of quick opens to deploy something in a few click, if that was really important they could convert fully to .net support clickonce deployment for exemple which would mean clicking on a link and poof the game is ready.
     
  30. Molt

    Molt

    Joined:
    Sep 6, 2011
    Posts:
    103
    Given that WebGL via WebKit is being implemented in systems like set-top boxes nowadays, and hardware like the nVidia Tegra is becoming more available in that space, I'd say ignoring would be a mistake. Why wouldn't you want your game to run on any modern television? What about being able to play it on tablets in a browser without needing plugins?

    That's the key here, it's WebKit without plugins, it's running content without needing any extra software installed. There is a reason Epic are working on getting Unreal working in the browser without plugins, it's not just them having a laugh.

    I have played with compilation of C++ to Javascript before using the Emscripten LLVM backend, and it's managed to handle some quite hairy image analysis code of mine without too many problems. I'm no expert in the field but things did go a lot easier than I expected. In other work Mozilla have already demonstrated it's use in 3d projects with their BananaBread demo, taking a pre--existing open source C++ 3d API and recompiling it to Javascript and getting something which works. It's not a case of porting your entire runtime, it's reworking those pieces which won't fit through Emscripten.

    Now for Unity we're talking about the Mono runtime, a good deal of extra support libraries for things and a good amount of support code in both C# and C++. I've never had need to look at the Mono sourcecode myself but given how many different architectures it's compiled for I'd expect it to be pretty architecture-neutral nowadays, which is a good thing when it comes to putting it through something like Emscripten. Most of the nasty edge-cases in the code have been revealed on previous architectures it's already been built for, and patches have been made to make it work nicely. I'm not saying it wouldn't take effort to get it to work, it would, but it's a manageable amount.

    With the Mono runtime in Javascript you're well on the well to having the Unity core, all of your custom C# code should work now as you have the runtime to host it, although you're going to be playing about a lot when you're handling the links to native code. The native C++ stuff, and this will likely include a majority of the renderer code and a lot of the other support libraries, will need some work after being compiled over to Javascript but at this point it's dotting the T's and crossing the I's. The core is stable.

    You're going to be taking a massive performance hit but people tend to expect less from browser-based games than other games, and if you really wanted to you could probably port some of the C# code you're using in the Mono runtime to 'native' Javascript using the Mono LLVM compiler (Not Mono compiled to LLVM, a modified version of Mono using LLVM) and avoid the slowdown of the JS Mono runtime. Given that a program will spend the vast amount of it's time in a relatively small amount of it's code it'd be possible to get most of the potential speedup here by reworking a small proportion of the codebase, and technology will help by continually getting faster.

    Unity have already targeted the Flash runtime, and I personally would have expected that to have been an equally massive task, using the Adobe Flash C++ compiler instead of Emscripten, but I don't think it was as sensible a move as a HTML5/WebGL version would be now. When Unity released the Flash runtime it was already looking like Flash was a dying technology, cancellation of the Mobile version and people increasingly moving RIA development over to HTML have pretty much left it as "That way of playing DRM'ed video"- that's not a small market but it's no longer a web powerhouse.
     
  31. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    It's quite a bit more complex than the unreal case, not just because there are 2 sides (C++ mono) but because those 2 sides interop, porting C++ with llvm is pretty easy, it's bytecode to javascript, not much of a problem here, you probably could do the same with .net (well, not as easily but still) but i don't see how you could automate converting C++ code that calls into .net code. Sounds like a whole other can of worm

    I've had a look at BananaBread and if that's the nice webgl demo then i'm actually disapointed by the tech (while i was interested untill now). 10 year old looking fps runing at 12-15FPS on a decent pc? hell no i'm not impressed, it's horrible, flat, small levels, and runs abysmally slow while i'm alone in a level that is barely more than 1 room large!

    I get the point for TVs but not for tablet, why would you want your game, on an already slow tablet, to run at very slow speed instead of native speed with the current unity deployment to tablets?
     
  32. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,306
    Wow, quite a heated discussion. As Eric pointed out: They did something comparable already with Flash. And to be honest, I think the whole point of having a Flash export is that they've shown now that they can do it. Flash is dead. That said: The beta-Flash export wasn't that bad. It wasn't great, either, and it has its limitations, but it's still good enough for creating awesome games with it. And given the technological challenges involved, I think it's totally awesome they did this. Even though I think Flash is dead (and from that perspective, I could think it was a waste of time ... but I don't think so ... precisely because of HTML5/WebGL).

    HTML5 / WebGL on the other hand could be the future of "Web games". My understanding is that HTML5/WebGL isn't quite there, yet (at least not for Unity games) - but eventually, it will be. It's just a question of time.

    And then, it's almost certain that we'll be getting that build target. Probably this won't mean "you take your fat game you developed two years ago, click 'build for HTML5', and it will work". But what it will mean is "if you start developing a new game and it's important for you that it works on every browser without having to install a plugin, you can use Unity to create that game and have it deployed for HTML5".

    Most things are only impossible for you if you believe they aren't possible. And that applies to a lot of things a lot of people are completely certain are impossible. So, yeah, if UT thought HTML5/WebGL wasn't possible, there would be no chance we could ever get it. But as far as I can tell, they don't think it's impossible - they only think it's not worth the effort, yet. And I agree with that ;-)
     
  33. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Sure, no one says it's impossible, it's just prohibitively cost ineffective.
    If they really wanted to support html5+webgl they probably would be better off rolling an alternate engine anyway instead of an export.
     
  34. Mwsc

    Mwsc

    Joined:
    Aug 26, 2012
    Posts:
    189
    I know this is a little off-topic, but I have a question/comment about flash being dead. The reason flash is said to be dying is because of the notion that HTML5 is the same thing only better. I agree that HTML5 has the advantage of being vendor-neutral, not controlled by any one company, and does not require a plugin. These are all great and fine advantages over flash. However, my impression of flash is that it (ignoring for a second its vastly important use in playing videos) is first and foremost a content-creation tool that provides excellent support for creating vector animations that can be made interactive via scripting. The fact that flash player is very commonly found on almost everybody's browser makes flash an even more attractive option. However, HTML5 is just some languages. Where is the content-creation tool for creating vector animations? That's what flash is really about. I don't see how we can claim that HTML5 has replaced flash until a GUI tool similar to flash has been created that exports to HTML5. Why do people think that HTML5 is somehow performing the same service as flash when HTML5 is just a spec for a runtime that uses certain languages and APIs, and flash is an elaborate animation-creation system? The two are almost orthogonal. The flash runtime could in principle be extended to output to formats other than swf. Other content-creation systems could output swf. We are talking about entirely different things.
     
  35. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    I'm pretty sure it doesn't really work that way. You have guys making the engine, then you have other guys (because Unity is a decent-sized company with more than 3 employees now ;) ) who do the iOS export, then other guys who do the Android export, etc. I would guess their job description is basically "make Unity run on Platform X, and if a feature can't work because of limitations on the platform, leave it out." That's what fits the actual evidence anyway. There used to be a lot of features in Unity that didn't work on iOS, for example, but that didn't stop them having those features in the base Unity engine, nor did it stop them adding many of those features to iOS later on as it became feasible.

    --Eric
     
  36. lmbarns

    lmbarns

    Joined:
    Jul 14, 2011
    Posts:
    1,628
    So what js engine do people propose Unity use for html5 js?
     
  37. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    Considering how you're really getting nowhere with this argument, perhaps you'd be better just to let it be. You don't have to convince them. You've made your point, now walk away. Let people choose whom they support and be done with it. :)
     
  38. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Well i think it's worth a comparison, actually that may be a nice future for unity (a single editor exporting data files to a single format, consumed by multiple diferent unity "engines" for platforms that diverge heavily)
    And that option is at least technically very feasible / doesn't imply a lower quality result / could be financially viable.
     
  39. Harissa

    Harissa

    Joined:
    Nov 13, 2008
    Posts:
    138
    I think this is where Adobe is moving in the future. Flash is gaining the ability to export HTML5 and adobe are sponsoring HTML5 libraries like CreateJS. They don't really make any money from the player so if HTML5 works just as well then it suits them to carry on selling the vector tool and just export to HTML5.
    "Flash is dead" is usually a huge simplification. The player is in decline but there's no reason why the vector tool won't carry on being used in the background and is no less likely to die than photoshop or illustrator.
     
  40. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,337
    Unfortunately some features must work on all platforms (and their integration is heavy long). For example Mecanim would never get integrated into the main branch if it doesn't work properly on all platforms. There's only one team for Mecanim but they must ensure it works properly on all platforms. An other good example, the outdated PhysX and Sound system in Unity. Having 10 platforms (one team for each platform) makes core features longer to integrate. That could possibly explains why Unity 4 had less features than Unity 3. Tough, I'm not complaining, I'm happy with Unity the way it is, I'm just saying what I think. :rolleyes:
     
  41. marty

    marty

    Joined:
    Apr 27, 2005
    Posts:
    1,170
    Export to WebGL would rock. ;-)
     
  42. keithsoulasa

    keithsoulasa

    Joined:
    Feb 15, 2012
    Posts:
    2,126
    I feel a bit silly jumping in all late , but if you feel web gl is that big of a deal , go ahead and use one of these engines . No one forces you to use Unity after all .
     
  43. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    WebGL will be a big deal.
    Though as it stands today, its questionable for more than experimental usage, tech demos and similar purposes.

    Reason is that the performance aint where it could be (the HTML standard problem all over again) and the broad support is more than just lacking.
    Even Flash Stage 3D is a significantly better choice for production use and Unity dropped that as a target platform already and if you ever used it and saw the performance difference, you know why.

    Also the only real incentive, which is 'mobile browsers will potentially never support plugins' (cause on Desktop we have the Unity webplayer and it is constent and low level optimized - a performance level webgl will never beat) is an inexistant one as 2 of the 3 big mobile platforms don't support it (WP8 and iOS) and on Android its hell flacky (depends on OS and Browser). The only platform where you have a consistent and somewhat reliable experience is Blackberry (be it Playbook 2.1 or BB10), but thats the minority platform so thats of no use.
    Perhaps, as time goes on, its viability as a production usable technology gets better (I truely hope so cause you can do great things) but for the time being, its barely more than a toy to show what web experiences could be like if we didn't have these annoying browser manufacturer egoist trips and ignorance towards W3C etc
     
  44. keithsoulasa

    keithsoulasa

    Joined:
    Feb 15, 2012
    Posts:
    2,126
    If a player doesn't want to install Unity Web Player, he or she doesn't need to play my game . Your going to have just as many problems with different browsers implementing things in a different enough manner to totally break your game .
     
  45. inafield

    inafield

    Joined:
    Feb 26, 2013
    Posts:
    281
    Given how flaky the browser support has been and how slow the major browsers and drivers have been for supporting WebGL... I'd rather have no support for WebGL than have to deal with 5 gazillion players complaining that my game is broken... just because their video card and/or browser doesn't work. IE 11 is the first Microsoft browser going to support it, but do you guys know how long it's going to take for IE11 adoption to occur? Asia is still running Windows XP with IE6 and IE7. The rest of the world is on a smattering of IE9 and IE10. I've got IE11 on my work computer running Windows 7, but I can tell you that a lot of corporations are going to block it for quite awhile. My money is on MS not fully implementing WebGL to a 100% usable/compliant state yet.

    Either it works right, or it doesn't... and as a technology, WebGL doesn't seem stable yet and the downloads are hella long. Anytime I see WebGL on a page I go somewhere else.

    My point is that I would rather Unity do it when the time is right, when it can be decently supported, and when it actually makes sense.
     
  46. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,516
    Last I heard, which was admittedly a couple of years ago, requiring a plugin turns away 90% of your users. Mobiles are not the only incentive.

    They never "need" to play your game. It's a game. A luxury item. Not a requirement.

    The question isn't whether they need you. It's whether you need them. And if you need them then it's important to make it as easy as possible to get into your game.
     
  47. deram_scholzara

    deram_scholzara

    Joined:
    Aug 26, 2005
    Posts:
    1,043
    Ronan, living is hard, dying is easy.
     
  48. Deleted User

    Deleted User

    Guest

    Last edited by a moderator: Sep 16, 2013
  49. inafield

    inafield

    Joined:
    Feb 26, 2013
    Posts:
    281
    Right, but considering how few people have browsers capable of truly playing WebGL... that's a really small number right now. Maybe in a few years that will change.
     
  50. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,516
    No argument here. I'm just saying that there are incentives other than outright code performance, which end users typically don't care about.

    But who knows, by the time WebGL becomes standardised enough for use maybe the Unity WebPlayer will be as ubiquitous as the Flash Player is today and it won't matter?
     
Thread Status:
Not open for further replies.