Jump to content

Like
5Likes
Dislike
Why NASA Switched from Unity to Blend4Web


NASA Unity Blend4Web WebGL
A simulated Mars rover experience you can control, produced by NASA and developed with... Blend4Web??

2: Adsense

Introduction


Recently, NASA published their press release which mentions the unique possibility to drive around on Mars. I couldn't help myself and right away clicked on the link that lead to an amusing interactive experience where I was able to drive the rover around, watch video streaming from its cameras in real-time and even find out the specs of the vehicle. However, what shocked me the most was that this has all been done using the Blend4Web engine - and not Unity.


Attached Image: gamedev_nasa1.jpg


Why was I so surprised? Even two yeas ago (or more) there were publications about NASA creating a similar demo using Unity. However, it didn't get passed the beta stage, and it looks like the space agency had moved on from Unity. It is interesting that the programmers of such a large organization chose to discontinue the time-invested project and begin from scratch. It took a little time but I was able to find the above-mentioned Mars rover app made in Unity. Honestly, it looks like an unfinished game. The scene loads slowly (especially the terrain), functionality is primitive – you can only drive, the overall picture is of horrible quality.


Attached Image: gamedev_nasa2.jpg


We all know wonderful games can be made with Unity and its portfolio is full of hundreds of quality projects. So, what's the deal?

What's the Deal


The reason is that Unity is seriously lagging behind when it comes to their WebGL exporter. The first alarm rang when Google Chrome developers declared NPAPI deprecated. This browser's global market share is too significant for any web developer to just ignore. You can find a lot of “advice” on using a magic option, chrome://flags/#enable-npapi, online. However, in September 2015 this loophole will disappear.

Creating games and web visualizations is an enterprise and nobody likes losing customers. Earlier, downloading the Unity plug-in was not as big of deal as it was with Flash – but now the situation has become completely different. The web plug-in can not be used anymore, while Unity's WebGL exporter is still in its infancy.

Developers of all kinds caused uproar, requiring the Unity team to proactively respond. Finally, Unity 5 has been released with WebGL support but only as a preview. Half a year has passed and the situation is not any better. They even came up with an “ingenious” method to check the user's browser and then recommend using Unity in another browser. Unfortunately, and for obvious reasons, it is not always reasonable.

And still, what's happening with Unity WebGL? Why is there still no stable version available? What are the prospects? These questions are of much interest to many developers. I'm not a techie, so it's difficult for me to understand Unity's issues in this area, but what I've found online is making me sad.

WebGL Roadmap


The official Unity forum has a thread called “WebGL Roadmap”. A team representative explains the future of WebGL in Unity. I have looked through this text thoroughly and it convinced me that the bright future Unity keeps promising is still in the far removed distance.

WebGL should work in all browsers on all platforms including mobile ones by default. It's not there. If you happen to successfully compile your game for WebGL, strike out mobile devices from the list. The reasons are clear: Unity's WebGL has catastrophically large memory consumption and bad performance. Yes, a top-of-the-line device can still manage to run the game at decent speed, but a cheaper one will run it as slow as a turtle.

And forget about hoping your project will work on desktops with ease. Browsers are the programs which eat all of a computer's free memory, and the half-finished Unity WebGL build often causes crashes and closes browser tabs (especially in Chrome).

There are some problems with audio. I personally tried to export a simple game for WebGL, and got croaking noise as the main character moved. The sound literally jammed and I could not fix it. The reason is poor performance, but other engines still work somehow...

Forget about in-game video. MovieTexture class is simply not supported for WebGL. As an alternative, the devs are suggesting to use HTML5 capabilities directly.

Network problems. System.IO.Sockets and UnityEngine.Network classes do not work for WebGL and will never work due to security issues.

I haven't enumerated all issues, but this doesn't answer the question – when will it start working? Alas, Unity devs' comments are unclear, obscure and don't include a specific timeline. Although I did find something:

“We are not committing to specific release dates for any of these features, and we may decide not to go ahead with some of these at all.”

They're Waiting


They are waiting for WebGL 2.0, which will be based on OpenGL ES 3.0. The future version, Unity 5.2, is planned to have an export option for the new API. However, I'm not sure that browsers will work with it – now WebGL 2.0 is available only as an experimental option.

They are waiting for WebAssembly, which is very promising but has just started being discussed. Nobody can even guess the date when it will be implemented.

I'm sorry, but if the problem can only be fixed, as they say, by upcoming third-party technologies, then maybe the problem lies in Unity WebGL itself?

Unity is a convenient, popular and cross-platform engine, an awesome tool for making games and I love it a lot. Still, this is a tool which can no longer be used for the web. The most annoying fact is that the future holds too much uncertainty.

You may say, “you are a pessimist!”. No, I'm just a realist, just like the NASA guys. This is the answer to the title of this article: “Why NASA Switched from Unity to Blend4Web”.

It's simple: Unity's WebGL is not ready... and will it ever be?

“We are not committing to specific release dates...”

So what about Blend4Web? I can only congratulate the developers with such a conclusive win in the field of WebGL – NASA's app has been showcased at the opening of the WebGL section on SIGGRAPH 2015 – which means competitors have no intention of waiting.

Background


This post is a translation of the original article (in Russian) by Andrei Prakhov aka Prand, who is the author of three books about Blender and a Unity developer with several indie games released.

About the Author(s)

Pierre Bezuhoff translates Russian technical articles back and forth.

License

GDOL (Gamedev.net Open License)

11 Comments

Aug 17 2015 07:14 AM

Title is a bit misleading since the article is just your speculation.

 

Also, I would think the reason is more likely to be "Someone else eventually got the contract who preferred blend4web"

Aug 17 2015 12:07 PM

It is very unfortunate that there are quite some wrong information and unprecise statements. As the author draws a major conclusion based on those, the whole article's quality lacks.

 

First of all, Unity already offers solution for video playback and networking in WebGL. They are freely available in the Asset Store. Besides that, Unity has a new networking solution that already works with WebGL.

And it is pretty obvious that Unity is not waiting for the arrival of other technologies. They are actively working on WebGL improvements. This can easily be found out just by having a look at recent release notes. Unity's WebGL heavily profits from improvements made in il2cpp as well, which is under very active development. That can also be seen in the release notes. This statement is unfortunately not correct.

Of course Unity is awaiting the arrival of improvements, because they will profit from those. E.g. WebAssembly will help to lower the memory consumption and improve the loading time. SIMD and multi-threading are already used in Unity and once they are supported by the browsers, Unity can use them without the need to implement them from scratch.

Aug 17 2015 08:31 PM

I'm not sure who the author is, but I have a concern about this post.  It does not appear that he has any inside information or experience with NASA, Unity, or Blend4Web - although if he does, he should obviously say so.  Assume that he does not, which seems highly likely given the way the post is written, then it appears the author has posted a title making a simple claim to basic factual and interesting information, without any such information.  If he had simply titled it something else, such as "Why I think Blend4Web was a better choice for NASA" or "Unity WebGL support seems laking, Blend4Web is ready now" ... or any other title that didn't lead any reasonable reader to think there was some information related to NASA and their decision making.

 

 

Speaking on behalf of someone with whom you have no relations is simply unacceptable ... and for that reason alone I must request that this article be taken down until it can be re-titled appropriately.  Everyone at gamedev expects an article titled "Why Blizzard Wrote Their Engine In House" ... to be authoritative, and most likely written by a key person involved in that process.  Anything less completely blurs the difference between gamedev and reddit.  I might give a pass if the author added (Speculation) to the title, and clearly said so in the lead paragraph.

Aug 18 2015 02:08 AM

Before any steps are taken toward censorship, I'd like to make some comments.

 

I'm not the author of the original article. Moreover, I don't agree with some things the author stated. However, I do believe that this post thoroughly expresses hopes and fears of a typical Unity developer who faced problems with the current WebGL implementation in Unity.

 

I think that I did a good job translating it because the article have got attention not only from Unity or WebGL developers, but also from the browser vendors, see this Hacker News thread for example.

 

I hope together we will eventually come to a mutually acceptable solution.

Aug 18 2015 04:11 AM

Before any steps are taken toward censorship, I'd like to make some comments.

 

I'm not the author of the original article. Moreover, I don't agree with some things the author stated. However, I do believe that this post thoroughly expresses hopes and fears of a typical Unity developer who faced problems with the current WebGL implementation in Unity.

 

I think that I did a good job translating it because the article have got attention not only from Unity or WebGL developers, but also from the browser vendors, see this Hacker News thread for example.

 

I hope together we will eventually come to a mutually acceptable solution.

 

Censorship would mean to eliminate uncomfortable or unwanted information. In this case, it is unfortunately unprecise and wrong information alongside with speculation. That's not really a good basis to draw conclusions and nevertheless the author does it.

It is obvious that there is a lot of emotions and frustration involved, but that doesn't excuse that lack of precise information. This article is structured like a serious technical article and will be recognized by many as such.

Justifying an article by the attention it is getting may work in the boulevard press, but is thankfully not a criterion for technical articles.

Aug 18 2015 08:31 PM

 

 

WebGL should work in all browsers on all platforms including mobile ones by default. It's not there. If you happen to successfully compile your game for WebGL, strike out mobile devices from the list. The reasons are clear: Unity's WebGL has catastrophically large memory consumption and bad performance. Yes, a top-of-the-line device can still manage to run the game at decent speed, but a cheaper one will run it as slow as a turtle.

True, some WebGL games are simply too ambitious for mobile, but there are some impressive WebGL demos such as this one on my iPhone 6 Plus at an intractable framerate. As far as large amounts of memory consumption: probably a byproduct of much of everything being in JavaScript --even if running as an IL/emscripten approach. WebGL's currently-supported implementation is the JavaScript equivalent to the OpenGL ES 2.0 API in C, which Unity's supported for some time now. They'd mostly have to use some sort of IL approach, such as JS.asm/emscripten to convert the code-base over to something browsers, even Node.js could run. It sounds like their own IL2CPP is their solution to that. If anything, just switch your platform and renderer to OpenGL ES 2.0, and you've got yourself a natively-written app. Now, your only hurdle is Apple's App Store review process. Sure, there are plenty of hurdles that Unity's got to jump, but their publicly-released efforts regarding WebGL look pretty solid so far.

Aug 24 2015 05:33 AM

The article fails to mention that many of the problems also stem from a poor WebGL implementation in most browsers and various limitations surrounding it.

Aug 26 2015 05:54 AM

It's just as likely that NASA as a government body have a policy in place to always prefer free open solutions over closed platforms.

 

This would be a big reason to choose Blend4Web (which is open source) over unity, which is a commercial product.

 

I think this very important reason for the choice may have been skimmed over or completely overlooked...

Nov 14 2015 12:31 PM

I think major reason to prefer blend4web for nasa is just chrome dropping NPAPI support that would make ~70% of unity web player users to stop using unity games on web, combine that with preference for NASA for open platforms.

Why do not browser vendors make an agreement on a language simpler than JS (but that can cooperate with it) that can be implemented in a more efficient way so that in future webGL platforms can just compile to that language ^^

Another speculation:

I just think Unity development life cycle is not well-suited for a programming team that has already its way of working, if you want to put many programmers together in unity you have to resort to frameworks like Svelto in order to make team work possible.

May 12 2016 04:41 AM

Hello Pierre Bezuhoff,

It would have been really amazing driving the rover around and wathing things from the camera in real time. Great read though.

Thanks.

PS: My Blog: xbox membership codes

Aug 31 2016 06:32 PM

You really make it seem so nike air max 90 pas cher easy with your presentation but I find this topic to be really something which I think I would never understand. It seems too nike air max 90 femme complicated and very broad for me. I am looking forward for your next post, I will try to get the hang of it!

Note: GameDev.net moderates article comments.