Comments (16)
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.
@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.
@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.
@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.
@lwansbrough Thanks...
from holojs.
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.
@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.
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.
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.
@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.
@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.
@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.
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.
+1, @Almost-Done is there a Babylon.js example somewhere?
from holojs.
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.
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)
- Spatial Understanding HOT 4
- OpenGL and EGL includes are not found when trying to build the solution. HOT 3
- Release mode HOT 2
- Access violation when accessing HoloLens camera HOT 3
- Windows Universal Runtime version 10.0.16299.0 HOT 1
- Spatial anchor read access violation HOT 2
- XmlHttpRequest exception when remote HTTP server is not online HOT 1
- Repetitive Object load causing memory leak HOT 1
- HTTP Requests within HoloJS?!?! HOT 3
- Different Origin when Space was lost for a moment
- Windows 10 build 17720 breaks HoloJs Spatial Input HOT 2
- FPS drops when calling dispose() in requestAnimationFrame()
- Is there a possibility to use Three GLTFLoader? HOT 2
- It There a way to check voice without specifying commands? HOT 4
- How to use video texture in HoloJS ?
- Access to RGB camera using Spin app HOT 5
- Immersive Mode
- Sample projects unresponsive to gestures. HOT 2
- HoloJS with HoloLens 2 HOT 7
- This repo is missing important files HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from holojs.