Search Unity

WEBGL Unity3D Exporter

Discussion in 'Asset Importing & Exporting' started by mlyons, Feb 3, 2012.

  1. mlyons

    mlyons

    Joined:
    Dec 31, 2011
    Posts:
    51
    If anyone wants to know how to use Unity3D to export to WEBGL there is an excellent article and exporter script available from the following blog about half way down the page it details the instructions...

    http://blog.tojicode.com/2011/10/building-game-part-2-model-format.html#more

    It also goes on to detail exporting skinned models and animations through the exporter from Unity to WEBGL again in the last half of the page...

    http://blog.tojicode.com/2011/10/building-game-part-3-skinning-animation.html

    Incredible - Enjoy!

    If some guy on his own can do this imagine what a committed team of developers at Unity could do?
     
    Last edited: Feb 3, 2012
  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    Nothing because no game usable audio means no audio, means no game, simple and 'idiot proof' as it can be, isn't it?
    Also what it supports is a joke, thats < 0.1% of the unity code base and nearly as nothing of mono, if you have the real thing the performance will go into free fall due to javascripts major problem on performance for real code bases, not minimal ones (there is a reason that most webgl projects so far stopped at the level of tech demos or at the quality level of quake 1 or 2, all without sound or relying on flash to play sound which in itself kills the whole reason to start using webgl right from the start)
     
  3. mlyons

    mlyons

    Joined:
    Dec 31, 2011
    Posts:
    51
  4. fanjules

    fanjules

    Joined:
    Nov 9, 2011
    Posts:
    167
    Oh no not again!

    I don't see at present how you will ever get anything like regular Unity to WebGL without the feature set being considerably curtailed, or the performance considerably curtailed.

    With that in mind, what would your target audience/platform be? On mobile the performance would be even more rubbish, not that WebGL has any sort of deployment in mobile yet - you might as well use Unitys existing mobile exporters.

    In the browser, the performance would be worse than Flash's Stage 3d (which can use C++ code through alchemy), which in turn is slower than Unitys own Web Player. There's only so much you can cut down the features/quality of your game.

    I also don't see it being anything other than hugely buggy/variable from one browser to the next - and that applies to WebGL even more than HTML5. And it doesn't work on the biggest browser of them all - Internet Explorer, with still no plans to support it in the future.

    Lastly, all of your game code will be visible to the world in Javascript. Maybe somebody will steal your super-clever AI script, or more likely - if your game is multiplayer - find exploits.

    Compare how much interest there is from the Unity community in a WebGL export (very little, about 3 people including yourself) to a Linux export (yes, Linux) which currently has over 11,000 people backing it! Silly as that may sound, Linux really is an untapped market. By contrast WebGL doesn't allow you to target any new consumers which can't already be reached by better platforms on the same device.
     
  5. mlyons

    mlyons

    Joined:
    Dec 31, 2011
    Posts:
    51
    I see the reasoning here - the browser doesn't reach any device that can't be reached by writing a native app for every device. Yes that's extremely clever? Ps Unity won't support Metro oh dear there's a problem? Of course writing a new native build for every smart tv that ever comes out and every new operating system is clever why didn't I think of that it's pure genius.
     
  6. fanjules

    fanjules

    Joined:
    Nov 9, 2011
    Posts:
    167
    I agree with you entirely - all my games so far have been browser based because it was the easiest way to reach everybody. That is the ideal, and what everybody was striving for "do it all in the browser". :)

    However, a certain Steve Jobs thought it would be much better we have app stores, 30% fees, kill Flash, and so on. HTML5/WebGL are just a smokescreen. Why the Internet hasn't been up in the arms about this is because everybody has been conned into thinking that HTML5/WebGL will offer the same experience as Flash. It won't, and he was genius enough to know that native apps will out perform the new technologies much more than before (at a time when Flash was actually narrowing the gap). But now the gap between native apps and web apps will continue to grow right up to the HTML5 release candidate which is a glacial 10 years away.

    The world is changing and people on mobile devices just go straight to the appstore now. I don't know anybody on iOS who hits the web to look for games in the browser. Even if you do an awesome WebGL game, if a competitor were to duplicate it and put it on the appstore (and with far, far better performance/graphics) they would get scores more sales.

    Your example of Metro is critically flawed - we are much more likely to see Unity in Metro than we are to see Microsoft permit WebGL in either Metro or IE on the desktop! On that note I can be sure 90% of the Unity devs would like to see a Unity Metro exporter than a WebGL one.

    Lastly, I do think there is a place for WebGL export in Unity - but in simpler games which would be separate projects. Though given the prospect of moving the Unity core into Javascript one has to wonder if some alternative WebG-specificL authoring software isn't just around the corner. Unity themselves have said they are monitoring WebGL's - but it's not up to performance yet. I don't think all your bitching is going to get them to change their mind, it's up to the WebGL tech to come to Unity and raise it's performance/capabilities.
     
  7. mlyons

    mlyons

    Joined:
    Dec 31, 2011
    Posts:
    51
    Fanjules - there's a whole world of markets out there that have nothing to do with running some silly app on an under powered computer. If no one accepts slight lowering in performance why do they buy an iPad for $600 and play games on it when they could get a PC with a video card for the same price capable of doing 10x the speed which is far greater than the difference between the speed of WEBGL and native.

    A little thing called the Cloud is coming and online all the time connected through smart single devices like TV's - no XBox, no PS3 just hit the native plethora of devices and be online in an MMO game environment or virtual world. Applications - MMO, Education, Leisure, Exercise Classes, Medical, Mining, Geographical and the list goes on...

    Writing a game is just one application of 3D immersive technology, the markets are endless and so is the audience and possible devices and none of them want to download an app every time each individual needs to use one of these 100's of different things. They just want to get on line and do it.

    The App store model is rubbish unless you want to sell an app or use the native device which most 3D applications don't need to apart from the graphics card. If you want to run a service on line using immersive 3D I personally as a business owner couldn't care less if it's an app I just want to reach the maximum target audience the easiest way possible.

    The native model is just one model - the web model is the competitor which will win? Don't care - a product like Unity following one direction is foolish. The Flash / Unity plugin model is pushing them down one direction Native for a lot of devices and plugin for those that will allow it - it's a foolish decision which basically just equates to backing the app model and not the internet one - many smug business people have fallen on that sword.
     
  8. fanjules

    fanjules

    Joined:
    Nov 9, 2011
    Posts:
    167
    Whilst I don't share some of your views - maybe worth giving Copperlicht a punt?
     
  9. andorov

    andorov

    Joined:
    Feb 10, 2011
    Posts:
    1,061
    Broadly speaking, the "web model" doesn't work for interactive apps. Is there any successfully monetized web game written in HTML5/WebGL? All I see is partial, half-complete tech demos being pushed by evangelists. Its great that you froth at the mouth at every buzz word you find in a blog -- the Cloud is coming! HTML5! WebGL! Standards! WOOOOO! All I hear is the millions (billions?) of dollars Flash/iOS/Android/WebPlayer games rake in... You live in an unrealistic world.
     
  10. mlyons

    mlyons

    Joined:
    Dec 31, 2011
    Posts:
    51
    All I hear is the Trillions of Dollars made from Web Sites and eCommerce. And add Advertising to the list of uses above - as in iOS adding WEBGL for Advertising native unlike Flash.
     
    Last edited: Feb 8, 2012
  11. andorov

    andorov

    Joined:
    Feb 10, 2011
    Posts:
    1,061
    So that's a "0" as far as a single successful WebGL/HTML5 game? And the sites that you point to, they don't use WebGL, they use HTML4. Not sure if any commercial site uses WebGL in any capacity.
     
    Last edited: Feb 8, 2012
  12. mlyons

    mlyons

    Joined:
    Dec 31, 2011
    Posts:
    51
    Browser Usage tells the story of those who resist the open web: http://www.w3counter.com/trends

    MS are feeling the wrath it used to be them that said Resistance is Futile now Microsoft's Restance is Futile as it is for all others who try to stand in the way of the almighty and all powerful web. RIP.
     
  13. fanjules

    fanjules

    Joined:
    Nov 9, 2011
    Posts:
    167
    Users originally dumped IE for Firefox due to extensions and concerns over security.

    People are moving to Chrome for performance/feel and because it handles things like Flash updates automatically.

    Internet Explorer does HTML5 but not WebGL, they're hardly resisting the open web since WebGL is not part of the HTML5 spec - it's an opt-in add on. It's not about resisting the "open web".

    So far by championing "the open web" (by Apple initially) it has actually increased the gap between native and browser based applications, and it's of no surprise that now many people looking to Flash alternatives now find they suck. It's not in Apple's interest to have an "open web" that has any decent level of performance, at least not if people like yourself are going to be adopting the open webs technologies to bypass their app stores. ;) The same applies to Microsoft who have adopting the same strategy via Metro.

    The funny thing is you are supporting the same "open web" movement that has actually made browser-based games less viable.

    In any case I realise you are wasting your breath. So far you need to convince not only Unity but also Microsoft to do as you want. And I would go further than that and add you need to convince the WebGL group to find a way to vastly boost performance to levels approaching if not exceeding Flash and Stage3d. Sadly WebGL is managed by Khronos group of which Apple is a member, and presumably with the biggest influence.
     
  14. mlyons

    mlyons

    Joined:
    Dec 31, 2011
    Posts:
    51
    fanjules - I've thought about all this and I'm still backing the Web for 3D - I'm going heavy into 3D Transforms supported by IE10 and all other major browsers and Metro the only cross platform 3D environment supported by Metro. WebGL will be supported by Metro by the time they have any market share. With 3D transforms the browser already has more 3D support than Unity has for Metro. I'm spending money on hiring people to use these technologies - no one ever got anywhere being second or even further down the pack to do something.

    As I've said before this is not about games for me it's about 3D and its applications.
     
    Last edited: Feb 17, 2012
  15. fanjules

    fanjules

    Joined:
    Nov 9, 2011
    Posts:
    167
    Okay fair enough.

    FWIW I did see a WebGL 3d game the other day (can't recall the name, I think it was in the Chrome browser store). It wasn't great - but it was a lot better than I thought it would be!
     
  16. cctman

    cctman

    Joined:
    Apr 23, 2008
    Posts:
    12
    I'm not sure I'm waisting my breath here on an older post but I found it interesting. There are already to many side tangents in this thread but I wanted to offer a different perspetive on web(WebGL) vs. plugin (unity3d/flash) dynamic content. Purely, based on history alone I don't EVER see a single ACCEPTED body of standards in a democratic world. Every entity or large bodies suggested even within political and government systems fails miserably when it comes to centralizing ideas and stimulating the imagination. It is no different in the IT community.

    It's a vicous cycle that will never stop as long as people have the democratic freedom in which to express their ideas and desires. IT is just another avenue we use in our world to accomplish this end. Web users want standards to establish a base line to accomplish business, entrainment and educational goals. However, in those same fields at various degrees there will always be new tehnologies that come along that push the envelope of what can and can't be imagined. People are not drones we don't want the same thing and businessess do not successfully thrive on cycling the same copy cat style applications. To this end web will never out do plugins, 3'rd party vendors, hardware/software manufactures, addon's, ect. As soon as HTML5 does support some form of 3d hardware acceleration, people will want more than this standard can support. So new forms of devices supported by private and coporate parties will come about. As long as people are free to imagine and create they will never be happy or satisifed with any standards. When HTML5 figures 3D out in say WebGL then it will be to late as we will probably be pushing 4D.

    On a side note if your really hard pressed for web standards then you are in the wrong forum. And to totally throw some gasoline on the fire. This web standards talk reminds me of the same polticial one world currency, all religions lead to the same god, Obama is the messiah , hope and change, Al Gore-Global warming, Apple is for open standards (cough app store), liberals can save the planet, lets hold hands and sing kumbaya while we save the beetles and crickets but abort our children talk I here all the time.

    :p
     
  17. juanfx

    juanfx

    Joined:
    Jan 10, 2013
    Posts:
    1
  18. ARealiti

    ARealiti

    Joined:
    Oct 4, 2013
    Posts:
    133
  19. kamullis

    kamullis

    Joined:
    Feb 7, 2013
    Posts:
    21
    has anybody played around with interesting little tool?

    http://www.frost.io/html5#editor

    Looks like it might have some promise.

    As things stand now is there a way to have a web app communicate with a unity app?
     
  20. awdng

    awdng

    Joined:
    Nov 8, 2012
    Posts:
    5
    @kamullis
    yes, websockets! THat frost.io stuff looks interesting, i guess they are using some form of emscripten to compile to Javascript/Asm.JS. I just wonder what there pricing would be like...

    In general the discussion in this thread is very interesting, albeit a bit aggressive in tone.
    A year passed and we have seen alot of new developments that make HTML5 more viable, its progressing very fast

    - WebGL capable browsers are the norm, even IE will finally support it in Version 11
    - emscripten as LLVM-to-JavaScript compiler and the development of asm.js open up new possibilites: http://www.unrealengine.com/html5/
    - more and more gamedev tools in development, one of the most impressive ones: https://artillery.com/

    Basically i am in on the vision of @mlyons, a few years down the line the browser embedded in any device with a screen can be a gaming console. The AppStores are a very successfull tempoary distribution model, but theres no reason believe they are exclusive to native content.

    Id like to reignite this thread and hopefully have some good discussions!