Search Unity

Project Tiny vs BabylonJS / ThreeJS

Discussion in 'Project Tiny' started by JakHussain, Jan 2, 2020.

  1. JakHussain

    JakHussain

    Joined:
    Oct 20, 2016
    Posts:
    143
    In my company there are both Unity developers and web developers that make apps for the rest of the company.

    What are the selling points of project tiny in its current state / the state it intends to be in by version 1 over other existing 3d libraries for web developers to use and vice versa? Reasons that may make a difference to developers, clients or end users.

    I want to make a case to eventually use the DOTS runtime at work but I don't know enough about either to pitch it.
     
  2. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    320
    What I can say about advantage is

    - It use wasm and DotS, it will scaled better than JS
    - It could reuse most of unity tools and asset we have done in unity
    - Visual editor, I'm not sure we have it in Babylon or Three yet
    - Using C# over JS is the whole reason I personally stick with unity

    Aside from that I don't think Tiny is a great choice. It limit too much capability you could do while you can have freedom using pure JS. It limit in both C# side and JS side. And don't really have timeline of releasing full version. It slow process and don't have clear future. Even the document are not clear. Right now it clearly not ready for production. Earliest would be Q2 or Q3 in this year and that was highest hope. So I don't recommend you to bother with it right now if you already have many experience in ThreeJS
     
    Last edited: Jan 6, 2020
  3. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,138
    I hope that one day we can produce WebGL-stuff with Unity in a quality as sketchfab provides.....
     
    newguy123 likes this.
  4. MindBuild

    MindBuild

    Joined:
    Oct 7, 2018
    Posts:
    22
    I changed from Unity to threejs a few months ago, I am glad I didnt wait for Unity. It is amazing the work they are doing but its going to take another 12 months before stable products are launched without having to rewrite the code every new update.

    Will be interesting to see where it goes, but I think threejs is better.
     
  5. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    7,209
    I thought you could 'compile' JS to WASM and DOTS was limited by WASM to a low or single thread count until a certain browser features was enabled/released?
     
  6. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    320
    I could say that DotS pipeline is optimized in general. It streamline most overhead that normal OOP code would faced, especially dynamic system like JS, into job system that pass around struct reference (which is faster than reference type and has no GC footprint, unlike GameObject and JS object)

    Thread parallelism just boost perf to another level and even it not required, it expectable that support will eventually came anyway
     
  7. a436t4ataf

    a436t4ataf

    Joined:
    May 19, 2013
    Posts:
    403
    I hope that one day we can produce WebGL-stuff with Unity in a quality as Unity 4.6 provided...

    (I still mourn the day when Unity WebPlayer was killed off :). 4 years ago Unity had excellent, fast, export to web, that Just Worked. Still haven't regained what was lost! Hopefully in 2020...)
     
  8. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,138
    Don´t agree, installing Webplayer was a big hurdle ...
     
  9. a436t4ataf

    a436t4ataf

    Joined:
    May 19, 2013
    Posts:
    403
    Agreed on 1st-time install. Which is why WebGL is a much better tech going forwards.

    But many of us worked in environments where webplayer install could be safely assumed (or required!). As a developer, it worked excellently.
     
    Cascho01 likes this.
  10. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    7,209
    It would be great if all browsers just worked with it, if they could dynamically allocate more memory and threads when needed. Or have some way of letting your game/app know it has to work within a memory footprint or on limited threads allowing you to limit what it does.

    Mind you last I checked compiling to WASM was crazy slow compared to compiling and building to native, maybe there are just too many steps in the build process C# -> IL -> IL2CPP -> CPP -> JS(?) -> WASM.

    ? Note sure about JS as I think this is optional for WebGL to JS.

    If we could just build C# -> IL -> WASM it would massively reduce the build pipeline?
     
    Last edited: Jan 9, 2020
  11. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    320
    @Arowx First, new version of tiny are now really truely so fast to build wasm, unlike wasm we used to build normally, but it trade off with very strict subset of dotnet and very limited functionality of unity

    Second, what you try to talk about is actually exist, it is Blazor with MonoWasm. But unity does not use it. Still you could try that, just google for Blazor webgl canvas
     
  12. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    7,209
    Is this actually compilation to WASM or using WASM as a virtual machine to run IL code or JIT compilation to WASM?
     
  13. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    320
    Sorry but I don't know about that detailed implementation
     
  14. yossi_horowitz_artie

    yossi_horowitz_artie

    Joined:
    Jan 30, 2019
    Posts:
    75
    As far as I can tell it's C# to CPP (via il2cpp) and then CPP to WASM via Enscripten.
     
  15. runner78

    runner78

    Joined:
    Mar 14, 2015
    Posts:
    98
    MonoWasm is the wasm version of the Mono runtime and can execute normal .NET dll in the browser.
    But so far i know, the future of Blazor is .NET core and compile the entire application to WASM with tree shaking for small filesize.
     
unityunity