-
BackgroundI was able to get jeelizFaceFilter working with Babylon.js on my local environment on my laptop (7-year old MacBook Air) running on Google Chrome browser (Version 88+). My webcam is accessed and my face was detected. The problemWhen I go through the Babylon.js WebXR and AR documentation, they use My questionHow come jeelizeFaceFilter was able to access my camera and also detect my face and apply an object over it without using "immersive-ar" like in the Babylon.js documentation? Do I need "immersive-ar" if I want to implement sunglasses over my eyes? Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Babylon.js immersive-ar session is relying on WebXR. Jeeliz FaceFilter relies on MediaStream API, a part of WebRTC (formerly getUserMedia API). It is the easiest way to get the camera video feed, and it works everywhere. You don't need immersive-ar to use Jeeliz FaceFilter. The best way is to use 2 canvases aligned using CSS, 1 behind to initialize Jeeliz FaceFilter and display the video stream, 1 atop to display the babylon.js scene with a transparent background. |
Beta Was this translation helpful? Give feedback.
Babylon.js immersive-ar session is relying on WebXR.
AFAIK WebXR is only implemented on Android mobile devices (not on IOS and not on desktop).
WebXR direct access to camera aligned video stream for computer vision is not guaranteed yet by the standard.
Jeeliz FaceFilter relies on MediaStream API, a part of WebRTC (formerly getUserMedia API). It is the easiest way to get the camera video feed, and it works everywhere.
You don't need immersive-ar to use Jeeliz FaceFilter. The best way is to use 2 canvases aligned using CSS, 1 behind to initialize Jeeliz FaceFilter and display the video stream, 1 atop to display the babylon.js scene with a transparent background.