Skip to main content
Up and Coming
August 24, 2013

Can't change OVRCameraController backgr. color or clipping?

OVRCameraController (and the 2 child cameras) defaults to a blue background color, which I need to change to black.

Following the PDF docs, I change the color in the OVRCameraController. (This is Unity 4.2 and OVR SDK 0.2.4.)

But when I hit Play, it reverts to blue. (If I also change the colors for the 2 individual cameras, one of them reverts to blue but not the other.)

When I hit Stop, the blue remains, even though Unity playback shouldn't normally permanently affect Inspector values.

EDIT: Same for near clip and far clip; the editor shows my values, even after a quit and reload--until I hit Play. Then they revert to defaults, and stay there even after I Stop.

I'm going to modify the OVR code to try to override this, but it's a hacky approach. What's the right way to do change settings for OVRCameraController and its child cameras?

EDIT 2: I have added [SerializeField] in a few places to help (I'm a JavaScript guy, not C#, but I found that tip here for clipping planes). And it works--the settings stick. But...

- Is there a way to just use those settings as explained in the PDF, without modding the OVR scripts? I worry that my changes will be lost with new SDKs if that's the way to do it. (I'm at least leaving my name in comments to find those lines again.)

- My chosen clipping planes work when I Play in the editor--but are ignored in an actual build. Probably a bug--looks pretty bad (you can see your own body sliced off at the chest, hollow legs and all, when you look down). Then, after the build (even if I quit and reload) the clip values stop working in editor play too; but when I click on the OVRCameraController to check the values, my own values are still shown (not reverted). And then when I Play again, the editor clipping is fine once again. It's as though Build temporarily reverts to default clipping values, and a simple click t select OVRCameraController is enough to resolve the problem--but only in the editor, not in the executable.

Any workarounds to make a Build use my clipping values? (I haven't tried hard-coding them into the C#... hacky and not future-proof, but I'll try it if I can find where to do it.)

Thanks for any ideas!
    This topic has been closed for replies.

    21 replies

    Up and Coming
    August 28, 2013
    "cybereality" wrote:
    Usually I delete the Oculus stuff first, before importing the new integration.

    It may allow you to overwrite the files, I haven't tried that yet.


    Deleting would lose all integration with the project, though, wouldn't it?--even parenting and XYZ position of where you start out, and any scripts that connect to the OVR cameras or controller would break the connection.

    This makes it sound promising that a re-imported package will replace its own files--even if you've moved some assets around.
    — Morgan — Mac OS X ❆ Unity
    Inspiring
    August 28, 2013
    That's a good point. Maybe overwriting will work.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    Up and Coming
    August 28, 2013
    I've always just imported new packages over the top of the previous one, it certainly does just overwrite the previous files. Any objects using the old scripts will be then using the new ones.
    Scott Vandonkelaar Zero Latency - Inversion VR
    Up and Coming
    August 28, 2013
    Awesome!

    I will of course keep full backups just in case...
    — Morgan — Mac OS X ❆ Unity
    Up and Coming
    September 7, 2013
    "cybereality" wrote:
    We've already fixed this internally, and it will go out on the next release.


    Does this go for the blue background problem as well? I was starting to think it was me. ;)
    Thanks in advance.
    -: MorbidDonkey :- =================================== LOGISTICS - Oculus Prototype 1
    Inspiring
    September 10, 2013
    Yes, it should include the background color too.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    November 20, 2013
    I'm experiencing a similar problem with the 0.2.5 version.


    I'm trying to use Silverline in a project and space in another (a package for volumetric clouds and other for space scene creation), and one of the requirements of the packages is setting the far clip plane to 100.000.

    I do it, I set the far clip plane to 100.000 and hit play... Only the right OVR camera is ok, the left camera simply bugs.

    As reported by some of you, once I click the OVRcameraController on hierarchy, the problem goes away, but we can't select it on a build, can we? :lol:

    I haven't tried the [SerializeField] correction because it was meant for version 0.2.4 (around line 116, bur in the 0.2.5 version the code has only 96 lines, so...)

    You guys said that it would be fixed on version 0.2.5, is there a fix?
    Inspiring
    November 20, 2013
    Boo, perhaps as a workaround you can set the clip planes on the OVRCameraController and on both of the cameras directly at design time. I've been doing that since the Unity integration was first released so that I can see the changes reflected immediately at design time, and as a result never ran into any of these issues with 0.2.4 or what you're seeing in 0.2.5.
    Titans of Space PLUS for Quest is now available on DrashVR.com
    Inspiring
    November 20, 2013
    You should be adjusting the OVRCameraController, not the Cameras themselves.

    I believe the "SerializeField" thing was fixed, but maybe still worth a shot.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    November 20, 2013
    cybereality, that's exactly what I've been doing... Changing only the OVRCameraController.

    So, you're right drash! I changed directly on the cameras individually and I'm glad to say it's fixed! Thank you!