Ar.js: Background is dark when VR mode is enabled

Created on 9 Jul 2017  路  6Comments  路  Source: jeromeetienne/AR.js

Hello,

The 3D objects is shown in VR mode but the live video feed from the mobile camera doesn't appear in VR mode. The live video footage is replaced with empty black space.
Any idea to make it work.

Thank you.

Most helpful comment

yep, one need to put the video in webgl. instead of a dom element.

i dont have time to work on it. this is not a tiny task.

you got part of it there. https://github.com/jeromeetienne/AR.js/blob/master/three.js/examples/webvr-for-ar.html

i hope this help

All 6 comments

yep, one need to put the video in webgl. instead of a dom element.

i dont have time to work on it. this is not a tiny task.

you got part of it there. https://github.com/jeromeetienne/AR.js/blob/master/three.js/examples/webvr-for-ar.html

i hope this help

I will check it out.

Thank you.

Hey @vijayrajasekaran , Did you make any advancements on this issue? I'm interested in joining in.

@shakedlokits I did try, but I was unable to make any advancements. :(

This PR has been closed due to inactivity for over one year. Please open a new, updated issue if the problem or the question is still relevant.

Hello, in case someone still needs to solve it, this is my approach:
It's a bit forced.
it works in landscape (on mobile) but not on portrait, it should be improved for it.
setTimeout(() => { var vidCam = document.body.lastElementChild; vidCam.setAttribute('id','arVideo') var camera = document.querySelector('[camera]') webCamSource = document.createElement('a-entity') webCamSource.setAttribute('geometry','primitive: plane;') webCamSource.setAttribute('material','shader: flat; src: #arVideo') webCamSource.setAttribute('position','0 0 -50') webCamSource.setAttribute('scale','54 36 1') camera.insertBefore(webCamSource, camera.firstChild); document.querySelector('.a-enter-vr-button').addEventListener('clik',()=>{ camera.object3D.position.set(0,0,0) }) }, 2000);

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mercem picture mercem  路  7Comments

lslzl3000 picture lslzl3000  路  7Comments

Samsy picture Samsy  路  5Comments

kurai021 picture kurai021  路  6Comments

pvnr0082t picture pvnr0082t  路  4Comments