Converge Posted January 9, 2018 Share Posted January 9, 2018 Hey everyone, We are building an environment that contains many thin lines and grills. While in normal mode everything looks fine (with Babylon's AA enabled), however after entering the VR mode (using the VRhelper) jagged edges become very apparent to the point that it's impossible to distinct some of the details. I have made a few screenshots with test environment to demonstrate the problem. Solutions like FXAA plugged to post processing pipeline make everything blurrier and worse. I'm wondering why is it happening (stereo cameras are super low-res?) and is there a way to deal with it? It would be ok to take some performance hits and render everything internally in much higher resolution for example. What are the good practices for fighting the jagged edges in VR in general? Many thanks in advance! edzis 1 Quote Link to comment Share on other sites More sharing options...
RaananW Posted January 10, 2018 Share Posted January 10, 2018 Hi, Welcome to the forum! I have a question - is it blurred inside the glasses, or outside on the screen? The VR devices have relatively good resolution nowadays. Could always be better, but should look fine. And as you are using the same canvas, AA should be the same as in a regular scene. The issue here, however, is that WebVR forces us to resize the canvas to the resolution of the VR device before streaming the data. Meaning, the canvas's size changes, but not its real screen size. you can pack a 1000x1000 canvas in a 100x100 pixels container - it will look very bad on the screen, but will still look ok in the glasses. Converge 1 Quote Link to comment Share on other sites More sharing options...
max123 Posted January 10, 2018 Share Posted January 10, 2018 Same thing happens with VRDeviceOrientationFreeCamera, when compensateDistortion is set to true: antialiasing is just gone. Converge 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 10, 2018 Share Posted January 10, 2018 compensateDistortion has to rely on postprocesses and unless you are on webgl2 we cannot enable antialiasing on them Converge and max123 1 1 Quote Link to comment Share on other sites More sharing options...
Converge Posted January 11, 2018 Author Share Posted January 11, 2018 22 hours ago, RaananW said: Hi, Welcome to the forum! I have a question - is it blurred inside the glasses, or outside on the screen? The VR devices have relatively good resolution nowadays. Could always be better, but should look fine. And as you are using the same canvas, AA should be the same as in a regular scene. The issue here, however, is that WebVR forces us to resize the canvas to the resolution of the VR device before streaming the data. Meaning, the canvas's size changes, but not its real screen size. you can pack a 1000x1000 canvas in a 100x100 pixels container - it will look very bad on the screen, but will still look ok in the glasses. Hey, thanks for the welcome! Original canvas takes 100% of the page so it's technically a fullscreen. Pixel count shouldn't be a problem here as far as I understand. Lines looked very jagged both on my display and windows mixed reality device (2k monitor, 1440x1440 per eye on mixed reality). 22 hours ago, max123 said: Same thing happens with VRDeviceOrientationFreeCamera, when compensateDistortion is set to true: antialiasing is just gone. Yes, disabling compensateDistortion in the constructor resulted in everything looking nice back again. 18 hours ago, Deltakosh said: compensateDistortion has to rely on postprocesses and unless you are on webgl2 we cannot enable antialiasing on them Could you please elaborate what's the problem here? PostProcess pipeline conflict? And how WebGL2 helps us to solve it? Would love to have a better understanding of this Thanks everyone! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 11, 2018 Share Posted January 11, 2018 webgl1 does not support to enable antialiasing on render textures (used by post processes) On webgl2, you can turn it on easily: https://www.babylonjs-playground.com/#18QHZC#2 (check line #23) Converge 1 Quote Link to comment Share on other sites More sharing options...
HoloLite Posted February 1, 2018 Share Posted February 1, 2018 Hi everyone, so is this problem solved ? How specifically ? I've also noticed the jagged lines when viewing the scene inside the vr headset. I would like to see how this problem can be eliminated. I've tried applying the FxaaPostProcess on the vr camera, but not getting any results. 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.