cancel
Showing results for 
Search instead for 
Did you mean: 

[0.4.3] Adjusting camera properties (clip planes, fov, etc)

drash
Heroic Explorer
Several of my demos will adjust/animated camera clip planes, and in the case of Titans of Space, the FOV for zooming. (I try to be mindful of player comfort by capturing the default eye FOV as the "non-zoom" value, and return to that when the player is done zooming).

In the 0.4.3 Unity Integration, it appears that adjusting these values on the cameras on LeftEyeAnchor and RIghtEyeAnchor are not actually having any effect on what is rendered. I therefore assume these Unity cameras are simply there as placeholders for image effects etc, operating on targetTextures coming back from the Oculus SDK?

I have not had the time to dig any deeper than the Unity integration docs (although I have read through most of the OVR scripts and Capi), and am now out of time for the next couple of days to investigate further, so I ask here: what would the correct (and hopefully future-proof) approach be to adjust these values?

---

A secondary question (related to FOV) would be that I see a few places in the integration where a compiler define is determining whether or not asymmetric projection is used when calculating the FOV used, but it does not appear to be consistent throughout (sometimes it's always taking the max of left/right & up/down tans, sometimes it's wrapped in #if #else etc). I would like to know if it's safe to enable asymmetric projection or if it is still a work in progress? It's my understanding that there is actually a small performance benefit to asymmetric projection as it reduces some of the overlap in rendering the two eyes, and I don't always need to make use of certain Unity features that require symmetric projection.

---

Thanks in advance for any tips on the above! 🙂
6 REPLIES 6

vrdaveb
Oculus Staff
Although the left and right eye camera settings in 0.4.2 and earlier were overwritten by settings from OVRCameraController, 0.4.3 does not do this. We only set the local position, orientation, FOV, and aspect ratio. So we should be respecting your clip planes. Are you sure they aren't changing? For this release, we removed the ability to change the IPD and FOV. You would have to modify the user profile to do this. The reason is user comfort. We recommend scaling the OVRCameraRig as a whole instead of adjusting the IPD or FOV. Uniform scaling will preserve the correct head model and distortion. If you're going for a telescopic zoom effect, you could either translate the rig closer to the content or vary the FOV on a render-to-texture that shows up somewhere in the scene. Will one of those work?

vrdaveb
Oculus Staff
"drash" wrote:
I would like to know if it's safe to enable asymmetric projection or if it is still a work in progress?


You are free to uncomment the line "//#define OVR_USE_PROJ_MATRIX" in OVRCameraRig.cs. It will make the app render with asymmetric frusta, reducing wasted pixels. However, there are a number of code paths in Unity that will not handle this properly. For example, deferred shadows, image effects, and specular reflections may render with artifacts. Unity is working on it, but I wouldn't hold my breath.

drash
Heroic Explorer
Thank you for the reply Dave!

Turns out my original clip plane issue was related to uncommenting the OVR_USE_PROJ_MATRIX define, so I will just leave that alone for now.

And for the FOV, that's fine -- I will take a different approach for zoom. 🙂

drash
Heroic Explorer
"jguedj" wrote:
I have encountered the same locked FOV issue
It is a big deal for us since we deal with realistic interior architecture with 3d-camera generated models, and the feeling of the space is wrong, the space is too small and "compact"
We used to solve this with FOV modification, but now the "[" and "]" keys ingame are not working anymore, nor do the FOV parameter in Unity

We would need urgent help on this, anyone:?:

In your case, it sounds like a matter of dialing in the right IPD and/or resizing your models to reflect accurate scale (1 Unity unit = 1 meter, etc). There's also the issue of the player physically sitting while virtually standing as that creates a bit of a perceptual mismatch even if the IPD is correct. If you're able to help the player interpret his virtual avatar as a floating head or be seated in the virtual space that will help there.

vrdaveb
Oculus Staff
Try adjusting the scale of your OVRCameraRig. That will make sure the FOV, IPD, and head model are all in proportion to what the user has set in their profile.

viewport
Protege
"vrdaveb" wrote:
Try adjusting the scale of your OVRCameraRig. That will make sure the FOV, IPD, and head model are all in proportion to what the user has set in their profile.


I am developing 360 stereoscopic panoramas.
So it is important to get rid of the head model and keep my rotation pivot close to the center of the cameras instead of the base of the neck. I use to scaling down the OVRCameraRig, but now it reduce my IPD in the same proportion.

Is it any way to keep my IPD but scaling down the OVRCameraRig as you said, or just completely remove the head model?
Thank you Oculus Team,