Giter Club home page Giter Club logo

Comments (16)

sjando avatar sjando commented on May 22, 2024 2

I've been playing with this a bit and managed to get Three.js up and running (https://github.com/sjando/HoloJS/tree/three.js). There's a couple of notable limitations, namely only one shader can be in use at a time and frustum culling must be turned off. But in general things work as expected so far as I've tried. Noticed a couple of the required changes have been implemented here in the last day or so, maybe I'll tidy things up and submit a PR with the others.

from holojs.

lwansbrough avatar lwansbrough commented on May 22, 2024

@dbs2000 My library actually doesn't support Three.js.

Here are a few of the issues I've experienced so far in trying to get this library to support it:

  • Three.js defines a transpose method in one of its shaders which is already defined in OpenGL ES I guess? Removing the offending function seems to solve that problem temporarily, but there needs to be a better solution obviously. We can't be monkey-patching Three.js.
ERROR: 0:98: 'const' : overloaded functions must have the same parameter qualifiers 
ERROR: 0:98: 'transpose' : built-in functions cannot be redefined 
  • #18
  • #17
  • App.cpp in the sample app sets the OpenGL ES version to 3.0, however only WebGL 2.0 is a derivation of OpenGL ES 3.0, not WebGL 1.0

from holojs.

dbs2000 avatar dbs2000 commented on May 22, 2024

@lwansbrough Thanks for your reply. So what do you think should be my next step? Rewrite my existing implementations, that are in three.js, in WebGL as required by holo.js, or wait for three js support to come?

from holojs.

lwansbrough avatar lwansbrough commented on May 22, 2024

@dbs2000 Unless your apps are very basic, I would strongly recommend against coding directly in WebGL. I'd say wait for Three.js support, or help make it a reality. :)

from holojs.

dbs2000 avatar dbs2000 commented on May 22, 2024

@lwansbrough Thanks...

from holojs.

j6k4m8 avatar j6k4m8 commented on May 22, 2024

Obviously there's a ton of support for an idea like this. Is there a recommended or requested place for devs like myself to get involved and help get this in motion?

from holojs.

lwansbrough avatar lwansbrough commented on May 22, 2024

@j6k4m8 I'd say if you're interested, load an app with Three.js and start tracking down the errors one by one. I'm sure the authors would be happy to accept small PRs the address minor incompatibilities. Check out the issues I've created to get a head start.

from holojs.

Almost-Done avatar Almost-Done commented on May 22, 2024

Thank you for the interest! While ThreeJS support is not planned yet, BabylonJS support is in progress. The work required to enable ThreeJS would be very similar and hopefully some of the problems will have been ironed out. I'll take a look at the issues already opened.

from holojs.

centigradeclemensP avatar centigradeclemensP commented on May 22, 2024

Wow, thanks, that is good news. ThreeJS performs extremely well with Angular 2 and Electron which makes it a lightweight yet powerful tool for deploying 3D to Classic Desktop, Web, Mobile and even VR. It would be perfect to be able to use it for the HoloLens as well. But having BabylonJS support will be excellent too, so I am really looking forward to it. Thanks for working on this.

from holojs.

Almost-Done avatar Almost-Done commented on May 22, 2024

@sjando Thank you so much for getting Three.js to work! Please submit a PR; this will make a lot of people happy.

The single shader issue is known and we're working on getting it fixed. We discovered it while getting Babylon.js to work. Since we don't have an official issue filed, would you mind opening one?

The culling issue was encountered in Babylon.js as well. We fixed it by having Babylon's holographic camera provide its view frustum to Babylon engine for proper culling. Babylon had a mechanism for doing this; I'm not sure how this could be done in Three.js.

from holojs.

centigradeclemensP avatar centigradeclemensP commented on May 22, 2024

@sjando Thanks a lot, this came faster than I dared to hope! I am happy. I will try to port a project I am working on and report if I find any additional issues.

from holojs.

sjando avatar sjando commented on May 22, 2024

@Almost-Done I'm not sure how the culling issue should be solved. Three.js computes the view frustum for culling based on the projection matrix supplied by the camera. Problem is, this same projection matrix will then also be used in the shader pipeline, so it has to be given as identity in order to work with ANGLE's automatic projection.

It might be possible to make a plugin for Three's renderer that allows frustum culling to work as expected but then prevents/undoes the projection transform ready for ANGLE, but I haven't looked into this yet. In any case, solving the multi-shader issue may well require some changes to the way automatic stereo/projection works, so it might be better to get that working first.

from holojs.

andybeaulieu avatar andybeaulieu commented on May 22, 2024

Is BabylonJS support still a work-in-progress then? @Almost-Done mentioned fixing some issues with it above, but I'm not able to get a simple sample working.

from holojs.

arondesign avatar arondesign commented on May 22, 2024

+1, @Almost-Done is there a Babylon.js example somewhere?

from holojs.

Almost-Done avatar Almost-Done commented on May 22, 2024

Sorry, babylon.js support is not ready and there is no sample yet. Before releasing it, we want to solve the multiple shader issue. There is a ThreeJS sample now that works with known issues.

from holojs.

Almost-Done avatar Almost-Done commented on May 22, 2024

Many thanks to @sjando for making the required fixes to HoloJS to get ThreeJS running and creating a ThreeJS sample app. I will close this issue and open smaller items for the remaining known issues.

from holojs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.