Recording BabylonJS Scene on Hololens 2

Over the past few months I’ve been using BabylonJS to develop AR experiences for the Hololens 2. When wearing the headset, the 3D elements in the scene (virtual hands, AR elements on a table) always appear to align perfectly with physical objects in the space.

However, when recording a video of the scene using the Hololens 2 system video recorder, the AR objects in the BabylonJS scene are offset by about an inch or so in the recording (seen in the pics below). This appears to even happen when recording footage of the demo augmented reality scenes, but does not occur when recording native Hololens apps.

What is the best approach for recording BabylonJS AR experiences on the Hololens 2? Is it possible to record the experience without this unexpected offset?


1 Like

cc @RaananW and @bghgary

1 Like

@RaananW and I talked to some HoloLens folks about this and they pointed us to some newish WebXR APIs that might help. @RaananW will add an issue.

3 Likes

You can track the issue here - [XR] Implement WebXR’s secondary views feature · Issue #13058 · BabylonJS/Babylon.js (github.com)

2 Likes

@sebavan @RaananW @bghgary Thank you very much for looking into this and I’ll be sure to keep my eye on the progress of the 6.0 release! In the meanwhile, do you know of any work arounds for recording?

I developed an AR web app with BabylonJS that I would like to submit to a research conference, but with the offset I am concerned the recording of the experience is not high enough quality for the submission :o

In hlolens, right?

I can experiment a bit with that. TBH I have never tried recording a session from hololens. Maybe I can find something that could be helpful. Otherwise I am so sorry to say I don’t really have a better suggestion…

1 Like

yes that would be amazing, running the AR demos on the hololens 2 from the web browser should reproduce it! I’ll do the same and poke around a bit more!

1 Like