83 points by john_doe 5 months ago flag hide 21 comments
john_carmack 5 months ago next
Impressive work! I really like the idea of bringing AR to the browser using web technologies. This definitely opens up a lot of possibilities for developing fast, cross-platform AR experiences. Looking forward to seeing how this project evolves!
jeffhammond 5 months ago next
Totally agree with you, John. I'm curious about the rendering techniques used and if performance optimization techniques were required to display even basic AR objects smoothly. Is there any room for improving framerates?
john_carmack 5 months ago next
Our team is using the WebXR Device API with some shims for non-compatible browsers to ensure partial support at the moment. The framerate is reasonable, but there are some obvious limitations. The GPU, camera, and JavaScript performance are the main bottlenecks we're trying to address. We hope to improve this with new web standards and performance optimizations.
sre_dude 5 months ago next
@john_carmack <-- Have you looked into WebAssembly, WASI, or other ways to perform offloading of the heavy calculations to the browser or machine level? I'm curious as to whether this would help decrease the load on the JavaScript engine. Exciting project though, keep up the excellent work!
john_carmack 5 months ago next
We've dedicated some time looking into Web Assembly and related projects. WebAssembly (WASM) allows us to handle some of the load on the GPU using OpenGL ES and perform calculations on the WASI level. However, since JavaScript is ubiquitous and a mature platform, we consider it the primary language of choice and use Emscripten for WASM transpilation. We're looking into multi-threading and improving JavaScript performance using the V8 engine directly for future developments.
gzoli 5 months ago next
Excited to read about WASM and V8 integration to improve the engine's performance. I'm assuming you're using Emscripten to compile C/C++ code for use within JS. Are you able to share any benchmarks or performance metrics that would indicate the difference made by using this technique? I'm hoping for a huge improvement in AR experiences built this way.
john_carmack 5 months ago next
We've been testing WASM performance on a few common tasks and found that the improvement varies depending on the nature of the computations. Loading times have been dramatically reduced when transferring large data sets to the GPU and managing JavaScript-bound calculations. A few specific examples and benchmark tests are provided within our documentation repo.
netscape9 5 months ago prev next
This makes me think of the early days of the web when we saw lots of experimentation and rapid innovation. WebAPIs and the ongoing web standardization process are paving the way for more and more AR/VR/XR experiences to emerge, especially now with Apple's recent ARKit support. Kudos to the developers behind this project!
robertnoonan 5 months ago next
I'm glad to see the progress being made; however, what browsers do this currently support? Chrome, Safari, and Firefox? Or will users need to install specific plugins/add-ons to get this working? I'm also wondering about the tracking capabilities – how well does it currently perform?
webtechnology_expert 5 months ago next
Currently, only Chrome supports the WebXR Device API, but we expect to see others follow quickly. We added shims using experimental WebXR polyfills to provide partial support on other popular browsers. The tracking is based on visual-inertial odometry, providing decent performance for estimated poses and transformation. However, we're actively working on improving the tracking and plan to incorporate additional sensor data in future iterations.
ari_stributes 5 months ago next
I appreciate the clarification about browser support and tracking performance. One more thing: I noticed you're working with the WebXR Device API, which is based on the XR standard. How is this affecting your development and what are the major challenges, considering it's still mostly in a draft state?
webxr_enthusiast 5 months ago next
Working with the XR draft standard in its early stages is challenging but exciting. It's still an ever-changing landscape, which requires constant adaptation and testing alongside browser developers. However, the benefits are significant, as it makes our application more future-proof and compatible with the increasing number of devices. It does ask a bit more patience for experimentation, feedback implementation, and eventual stabilization.
threedeer 5 months ago next
Indeed, the future-proofing factor is significant. Considering that XR standardization is still underway, how do you foresee dealing with possible incompatibilities or modifications, especially with significant deadlines such as a 1.0 release? I'd love to hear your thoughts on preparing for unexpected changes/updates.
webxr_enthusiast 5 months ago next
Should any drastic updates or modifications arise, our team evaluates the impact on the core framework. We often divide our work between the core system supporting XR technology and the AR components built on top – making it easier to adapt to modifications while maintaining future-proof architecture. We also ensure that we follow browser developer announcements and actively test our framework along the way.
arinerr 5 months ago prev next
This is quite an interesting project, although my concern is related to the network latency. Potentially this could affect the AR experience while streaming 3D assets, wouldn't it? Are there any workarounds to mitigate this issue or any best practices you'd like to share?
webtechnology_expert 5 months ago next
Thanks for pointing that out. For handling network latencies, I'd recommend following best practices for streaming 3D assets with adaptive bitrate streaming, chunking, and potentially using multi-threading techniques on WebWorkers to obtain better performance. This will help keep the user entertained while requiring less waiting time for the assets to load.
dah_brad 5 months ago next
@webtechnology_expert <-- Concerning the streaming of the 3D assets, are you planning to incorporate progressive loading or using Meshes instead of complete models to improve AR scene stability and resist latency issues?
webtechnology_expert 5 months ago next
@dah_brad <-- We've thought about incorporating progressive loading as well as working with Meshes for lighter and more adaptable AR scene management. These are both excellent suggestions for improving stability and further restricting latency issues. We'll consider adding them to the roadmap for future development.
fumanchu 5 months ago prev next
Overall, this seems like a strong proof of concept for the future, offering more ways to create AR/VR experiences for the masses while bringing the technology closer to non-specialist developers. One suggestion: have you considered providing a simple demo we could try out in the browser to get a feel for the capabilities of this framework? That would pique my curiosity even more.
webdev_fanatic 5 months ago next
Have you checked out the new Chrome Labs' experiments showcase? Specifically the 'web-xr' and 'web-immersive-vr' collections? I think they could provide useful guidance and inspiration for your AR project in the browser, especially concerning future iterations and adaptations.
webdev_fanatic 5 months ago next
I agree; the web-xr showcase is a valuable source of inspiration for projects like yours. We'll certainly be following along with Chrome Labs and other web development teams to learn about emerging capabilities and experiment with new possibilities in the browser – especially for AR, VR, and XR projects.