Skip to main content
Up and Coming
May 23, 2014

SDK v0.3.2 Preview 2 Discussion

Does the new SDK look like a super low-res blurry mess to anyone else? Is there a setting I'm missing?

I tried both importing the newest SDK into my own project and importing Tuscany into a brand new project and both result in low-resolution and heavy aliasing in the center of the screen.

I've uploaded an image as an example of what I mean: http://i.imgur.com/o169wyB.jpg

Edit: I missed a setting. It looks like turning on 4x Anti-Aliasing is required now.

Here's an image with 4x Anti-Aliasing enabled: http://i.imgur.com/ohBeaG9.jpg

Even with 4xAA on it still seems like it's a lot blurrier than the previous SDKs to me.

Here's some before: http://i.imgur.com/3wDbb8f.png and after: http://i.imgur.com/2DJd5NH.png images of a scene in my own project, from 0.2.5c to 0.3.2 Preview.

I understand that the distortion method and values have changed, but with the newer SDK the perceived resolution is much lower and the thus aliasing is much worse. It might be a reverse placebo, but I don't recall it being this bad with the 0.3.1 Preview. I can definitely attempt those comparisons too.

Anyone else have any thoughts?
    This topic has been closed for replies.

    88 replies

    Inspiring
    May 24, 2014
    "contempt" wrote:
    I noticed that on the Reddit thread linking back to this forum that there was mention of the Camera Texture Scale being max 1.0 with only the ability to scale down from there.


    To clarify, there are two separate properties that affect pixel density. "Scale Render" allows you to dynamically scale down the resolution of the render target to save performance. It will only work when "Use Camera Texture" is enabled. "Camera Texture Scale", on the other hand, determines the size of the camera texture and allows for super-sampling. Currently you cannot change it at runtime.

    Note: The 0.3.2 code for "Scale Render" is broken. You can fix it as follows:

    In OVRCameraController.cs, replace the following code:

    Rect r = new Rect(0.5f - (scaleRenderTarget * 0.5f) + ((cameras.RightEye) ? 0.5f : 0f),
    0.5f - (scaleRenderTarget * 0.5f),
    0.5f * scaleRenderTarget,
    scaleRenderTarget);

    with:

    Rect r = new Rect((cameras.RightEye) ? 0.5f : 0f,
    0f,
    0.5f * scaleRenderTarget,
    scaleRenderTarget);

    And in OVRLensCorrection.cs, replace the following code:

    material_MeshDistort_CA.SetVector("_DMOffset", _DMOffset);

    with:

    Vector2 offset = _DMOffset + (dynamicScale - 1f) * new Vector2(0.25f, 0.5f);
    material_MeshDistort_CA.SetVector("_DMOffset", offset);
    excelynxAuthor
    Up and Coming
    May 24, 2014
    I totally understand that Unity's Deferred Lighting implementation isn't ideal, this isn't the first time there's been issues with it. That said I have a couple of questions:

    Are there recommended settings for using Deferred and getting the best image quality or are you just recommending we don't use it at all? It does seem pretty extreme that we lose the ability to use fairly basic things like point light shadows, and that we take a performance hit om any kind of complex lighting.

    Is there any sort of timeline for getting something set up that plays nicer with the Deferred rendering path? Will the SDK support that before DK2? Or will it just never be supported with Unity 4? It'd be a huge advantage if we knew if we needed to purchase Unity 5 or switch to Unreal Engine 4 now, instead of closer to release.

    Thanks for responding to the feedback!
    VisiR - Virtual Reality Music Visualisation
    Inspiring
    May 24, 2014
    Very helpful post, vrdaveb. I didn't see anything in the new Unity Integration Guide pdf about the Use Camera Texture feature (or the fact that Scale Render requires it to be enabled). Thanks!
    Titans of Space PLUS for Quest is now available on DrashVR.com
    Inspiring
    May 25, 2014
    How is performance effected while using deferred rendering? The last version gave me about a 1/3 drop in fps, which is unacceptable.

    "excelynx" wrote:
    I can't make an accurate comparison from 0.2.5c until I get the image quality roughly equal, but it looks like performance is comparable to the 0.3.1 Preview.


    Can anyone confirm? I really don't have time to be play testing.

    If I drop in a new prefab from the SDK, do I still have to tweak everything to get the image quality at a nice place? And is the performance effected after doing so?

    Can I just get a version of 2.5c with nothing changed except the added positional tracking for when it's needed? 2.5c runs perfectly fine for Technolust visually and performance wise under deferred.
    IRIS VR - TECHNOLUST - KERSER - BODY/MIND/CHANGE - QUANTUM CAPTURE - OCCUPIED VR
    Inspiring
    May 25, 2014
    "Anticleric" wrote:
    If I drop in a new prefab from the SDK, do I still have to tweak everything to get the image quality at a nice place? And is the performance effected after doing so?


    By default, 0.3.2 uses the same rendering approach as 0.2.5c did. That means performance should be the same if you delete your old OVRPlayerController GameObject, import the new assets, and re-instantiate.
    Inspiring
    May 25, 2014
    "excelynx" wrote:
    Are there recommended settings for using Deferred and getting the best image quality or are you just recommending we don't use it at all?


    Deferred rendering should work by default with 0.3.2. However, if you turn on "Use Camera Texture", there appears to be a bug in Unity's handling of the "Viewport Rect" field that makes it stretch the rendered viewport over the entire RenderTexture. We can probably work around this for the next release.

    For now, the best way to use deferred rendering is probably to turn off "Use Camera Texture" and run your app at 1920x1080 to get better resolution on the undistorted image. There are image effect-based antialiasing methods such as FXAA and SMAA that work with deferred rendering. But they can introduce artifacts that are especially noticeable in VR. FXAA is in the Image Effects (Pro Only) package that you can import from Unity's Assets menu. An experimental SMAA implementation is here: https://github.com/Chman/uSMAA
    excelynxAuthor
    Up and Coming
    May 26, 2014
    "vrdaveb" wrote:

    Deferred rendering should work by default with 0.3.2. However, if you turn on "Use Camera Texture", there appears to be a bug in Unity's handling of the "Viewport Rect" field that makes it stretch the rendered viewport over the entire RenderTexture. We can probably work around this for the next release.

    For now, the best way to use deferred rendering is probably to turn off "Use Camera Texture" and run your app at 1920x1080 to get better resolution on the undistorted image.


    Thanks, vrdaveb! I really appreciate the quick response!

    I'll go ahead and try that in my project for now and look forward to the next release. :)
    VisiR - Virtual Reality Music Visualisation
    sh0v0r
    Up and Coming
    May 26, 2014
    I have my Camera Controller attached to the Neck Bone of my character so I have 'Use Player Height' Off and and am only using the 'Eye Centre Position' offset to get head modelling translation. It appears to not have any head modelling at all and is rotating around the centre with no translation.

    Using Sun Shaft Image effects causes my output to appear stretched horizontally.
    Forward Rendering with Use Camera texture.

    excelynxAuthor
    Up and Coming
    May 26, 2014
    "sh0v0r" wrote:

    Using Sun Shaft Image effects causes my output to appear stretched horizontally.
    Forward Rendering with Use Camera texture.


    Interesting, that's also what it looks like if you check Use Camera Texture with Deferred Lighting.
    VisiR - Virtual Reality Music Visualisation
    Inspiring
    May 26, 2014
    "sh0v0r" wrote:
    I have my Camera Controller attached to the Neck Bone of my character so I have 'Use Player Height' Off and and am only using the 'Eye Centre Position' offset to get head modelling translation. It appears to not have any head modelling at all and is rotating around the centre with no translation.


    What is the (lossy) scale of your OVRCameraController? 0.3.2 now scales tracking data by that, so if most of your scene is at a larger scale than the camera rig, you'll need to scale it up to match.

    "sh0v0r" wrote:
    Using Sun Shaft Image effects causes my output to appear stretched horizontally.


    I was seeing this too with forward rendering and certain image effects (or with deferred rendering and no image effect). That definitely isn't the viewport rect we're rendering to with the undistorted cameras, so I suspect it's a bug in Unity's RenderTexture management. For the forward rendering case, it fixed itself when I removed the image effects, restarted Unity, and re-added them.