Unplayable use of Unity3D and Oculus Rift

    There are very few articles on Habr dedicated to non-gaming applications of Unity3D. We decided to fix this annoying situation and talk about how we did (and continue to do) the online apartment planner (yes, the next one!) With the  rendering of high-quality images on the server side and  integration with Oculus Rift .

    According to our estimates, the material is typed into a dozen articles, so we’ll talk a little about the project itself, and you choose which topic to open in more detail.

    Disclaimer: all the images in the article are either screenshots from the browser, or are automatically generated on the server, and do not have any pre- or post-processing.



    How we have been doing others for many years


    A long background for the curious

    From TurnTool to Unity3D


    We were engaged in 3D-interactive for a long time, until 2006 using Flash and  TurnTool . For example, back in 2006, we built an apartment with our own hands interactive for the St. Petersburg shopping center Great (it still works, but only in IE). For that time - the coolest thing, with a folding sofa and changing textures.

    Interactive apartment at TurnTool, 2006

    After TurnTool, we started tormenting VirTools , where we developed online races: first on trucks, and then on track cars. A critical limitation of the technology was the complete absence of the server part, which had to be written independently.









    Game on Unity3D


    Therefore, finally, in 2009, we started developing Unity3D, then still version 2.0, and after a while we finally switched to it and completely transferred our online race, TurboDrive, to the new engine.











    The game had different tracks, coloring cars, handling collisions and falling off the bumper. It still works as a VKontakte application (run strictly via http, not https!), But is no longer developing. About TurboDrive, you can add a separate epic story of cones, files and discoveries.



    History has shown that the final transition to Unity3D was the right decision: TurnTool and VirTools died completely, Flash lost the market as a tool for 3D-interactive.

    From Racing to Online Planning


    Working on client projects, in 2010 we made the first interactive walk around the apartment on Unity3D for the Swedish developer NCC. In it you can wander around the apartment, look at the real view from the window and change the decoration options.





    The project was successful, and we decided to invest all the available experience and experience (as well as part of the agency’s profit) in creating an online tool for planning apartments and interior design. So it appeared ...

    Planoplan


    For two years since 2011, we created an online apartment planner . And not “just a scheduler”, but the first scheduler on Unity3D with rendering high-quality images on the server side.

    For ordinary private users, he works on a  freemium model - you can register and use it for free.

    It has all the relevant functionality such as arranging walls, hanging textures and arranging furniture - we will not talk about this. We will only touch on some of the "chips" that have become possible thanks to Unity3D (and limitations too, so be it).

    Image quality in browser


    Due to the fact that Unity is sharpened for productive 3D-graphics, we get excellent image quality in the browser without losing speed. Realistic lighting on fairly powerful computers has also become possible.

    If earlier in the triangle “speed - quality - the possibility of free viewing angles” any two points could be selected at best, then in “Planoplan” all three could be selected.



    Visible, for example, translucent curtains. The entire room is reflected in the chrome leg of the chair. It is possible to have many accessories that revive the interior: books, trinkets, oranges. Unity3D runs significantly faster on the same computer than Flash or HTML5 solutions with the same image quality. And it gives significantly higher picture quality than Flash solutions with the same speed.

    The video below shows the quality of the picture (it is better to watch in HD, fullscreen, with the setting "Scaling is Off").



    How other schedulers look in the browser

    Apartama. Unity3D, fast, low quality, 8 viewing angles with a walk.


    AutoDesk Homestyler. Flash, slowly, medium quality, 8 viewing angles without a walk.


    FloorPlanner. Flash, slowly, medium quality, free without a walk.


    IKEA Planner. Own plug-in, slow, low-quality, discrete viewing angles.


    Outline3D. Own plugin, slow, low quality, free to walk.


    Planner5D. HTML5, medium fast, medium quality, free to walk.


    Realaxy. Flash, slow, super quality, free to walk.


    Interactive elements


    Exactly for the same reason (Unity is imprisoned for productive 3D-graphics), we were able to make the fire burn in the fireplace, the radio rustled, and the clock showed the current time. Sofas unfold, doors open and close ... In general, a wide field for the gamification of interior design.


    Screenshot from the browser, the flashes of the fireplace give live "playing" lighting.

    Fast math


    In Planoplan, curved walls, curly openings in walls, procedural generation of meshes for creating contour objects in rooms (multi-level ceilings, curly skirtings, podiums, beams) are possible; intersections of skirting boards, walls and door frames are correctly calculated.


    Correct intersections of all surfaces.


    An example of a procedurally generated ceiling skirting with a complex profile.

    The position of the sun in the celestial sphere (and as a result, the illumination of the apartment with daylight) can also be calculated automatically directly in the browser, depending on the specified coordinates of the apartment and the current time of day.



    Server rendering


    So far, such functionality is only in AutoDesk. We made a bunch of “Unity Web Player → Custom Server → Unity Standalone → Render Server”, and now clicking anywhere you can get a high-quality picture. In fact, most beginners and middle-aged designers no longer need the services of 3D graphics specialists.











    And a bunch of sample pictures from our regular users





















    To test the limitations of the technology, we rendered an image of 15,360 × 8,640 pixels (the image below is clickable, leads to Yandex.Disk with 10 MB JPG). It’s not good news from the point of view of the interior, but you can see how the whole kitchen is reflected in the teapot that has grown into the countertop.

    A huge picture with a teapot

    Cross-platform and mobile devices


    Unlike Flash schedulers, Planoplan works wherever a plugin is installed in the browser. That is, on Windows and MacOS. On Linux, only standalone builds currently work.

    In addition, we can quickly and easily make ready-made projects created online, builds for mobile devices on both iOS and Android (in the video below - from 04:00 ). This allows you to add an interactive demonstration of layouts and interiors to mobile applications with the same picture quality and speed.



    Virtual reality


    Unity3D developers are people worthy of a monument to life and real estate in Hawaii. They very quickly began to provide the ability to display pictures in 3D. At first it was a 3D monitor with glasses. It was cool, but not super cool.


    It’s not the photographer’s hands that are shaking, it’s 3D mode with NVidia 3D Vision.

    And then he appeared - the Oculus Rift helmet (in the video below - from 00:30 ). With it, we can immerse a person in the space of his future apartment (if he buys an apartment) or interior (if he uses the services of an interior designer, buys furniture or decoration materials).



    Technology blows our own roof and 98.5% of visitors to our stands at exhibitions. The remaining 1.5% are boring people who don't like grain and low resolution.

    By the way, anyone can see it with their own eyes on November 18-22 at the Expocenter at the exhibition Furniture 2013 and November 30 - December 1 in Sokolniki at the  CG Event .

    Limitations


    There is no complete happiness in life, of course. And Unity3D technology, in addition to its wide capabilities, gives only a few drops of tar. Here is a complete list of what we could not win in a year and a half of development.

    • The memory limit in the 32-bit version under Windows and the fall of the 64-bit build. Now developers are actively working on this and promise to fix it soon, we are in touch with them.
    • For mobile devices and for Linux, separate assemblies are needed, in the browser this splendor does not work yet. It remains only to believe in developers, but so far there have been no promises to change this situation.
    • Oculus Rift cannot be screwed to the web version because it does not allow third-party libraries to be connected. We believe that the guys from Unity and Oculus will somehow agree.

    And much more


    In the process, we had to go a long way, and on the walls next to some developers are visible dents from the head. Vote, what would be interesting for you to ask our Unity veterans in the first place.

    Upd: By the way, in the comments appeared one of the Planoplan development fathers, FoxUmkov - respect and questions can be addressed to him directly.

    Только зарегистрированные пользователи могут участвовать в опросе. Войдите, пожалуйста.

    Я хочу узнать подробнее:

    • 23.8%Приключения с GUI в Unity3D146
    • 31.1%Тайны школьной геометрии, триангуляция Делоне, кривые Безье и суперплинтусы191
    • 15.6%Связь Unity3D с рендерфермой и дорога в облака96
    • 10.7%Загрузка объектов интерьера в базу и скрипты-помогаторы66
    • 11.7%Переход на Unity3D 4.0 и террор девелоперов72
    • 6.8%Я задам вопрос в комментариях или посмотрю результаты голосования42

    Also popular now: