Lary Posted June 1, 2018 Share Posted June 1, 2018 Hi there, Now I have a basic webVR demo from PG, when I enter into VR mode, there always be round frames/corners (below pic in red circle )at each view. Is there a way to remove them, and make the view on both side in full screen? Thanks! Quote Link to comment Share on other sites More sharing options...
Wingnut Posted June 1, 2018 Share Posted June 1, 2018 Hi Lary! @JCPalmer created a "stereoscopic" camera rig named... BABYLON.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL. (I think he created _SIDEBYSIDE_CROSSEYED and _OVERUNDER versions, too) You can see side-by-side... in action... here. http://playground.babylonjs.com/#CV4CX#1 Maybe this will work for you. Otherwise, stay tuned... others will have more info/other ideas. Quote Link to comment Share on other sites More sharing options...
Guest Posted June 1, 2018 Share Posted June 1, 2018 When entering VR and not WebVR headset is available, Babylon.js will revert back to a VRDeviceOrientationFreeCamera You can force the camera to NOT compensate for lens with the fourth parameter: var camera = new BABYLON.VRDeviceOrientationFreeCamera("DevOr_camera", new BABYLON.Vector3(0, 0, 0), scene, false); doc: http://doc.babylonjs.com/api/classes/babylon.vrdeviceorientationfreecamera#constructor Quote Link to comment Share on other sites More sharing options...
Lary Posted June 3, 2018 Author Share Posted June 3, 2018 On 6/1/2018 at 9:43 PM, Wingnut said: Hi Lary! @JCPalmer created a "stereoscopic" camera rig named... BABYLON.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL. (I think he created _SIDEBYSIDE_CROSSEYED and _OVERUNDER versions, too) You can see side-by-side... in action... here. http://playground.babylonjs.com/#CV4CX#1 Maybe this will work for you. Otherwise, stay tuned... others will have more info/other ideas. Hi @Wingnut, thanks for the information,@JCPalmer 's camera works in my scene. Great! However, the scene in both view seems kinda tortured. What I'm using is scene.createDefaultVRExperience({createDeviceOrientationCamera:false}); which will create a webVR camera and non-webVR camera, and also a button enabling webVR access. I want this mode ,and keep both cameras. So by default, it is arcRotateCamera, when webVR triggers, the view has to be side by side with no round borders as above show. I wonder if there's a way? or I just need to correct a parameter? reference link here, in this demo, if I enter webvr mode there, it's side by side with no borders, but if I download the code and play at local, there has round corners, I don't know why.... Quote Link to comment Share on other sites More sharing options...
Wingnut Posted June 3, 2018 Share Posted June 3, 2018 Hi Lary Here ya go... https://www.babylonjs-playground.com/#TAFSN0#27 Should work. Line 31... I dump scene.cameras to console. It shows 5 cameras... 0-4. At console, I clicked on each camera object, which views that object in an object inspector. scene.cameras[1] had a ._rigCameras array with a length of TWO. I assumed that was the stereo cam. So then... we just need to change the rigMode on that camera... just like we did in the previous playgrounds. Line 33 does it. Hope this works. Report back, as wanted. By the way... that was a PERFECT playground example... it made my helping... easy to do. Thx for that... well done. GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.