Forum Discussion
Fiore
13 years agoHonored Guest
Different geometry rendered to each eye
Is it possible to have 2 pieces of geometry in Unity, and have each one only viewable from a single eye?
I do not have a rift to test, but am looking at ways to use one billboard for each eye, each with offset pre-rendered image that would represent a single 3D object when viewed through the rift.
I do not have a rift to test, but am looking at ways to use one billboard for each eye, each with offset pre-rendered image that would represent a single 3D object when viewed through the rift.
31 Replies
Replies have been turned off for this discussion
- cyberealityGrand ChampionPlease use Unity 5.1.2p2 or higher and add a second Camera to the centerEyeAnchor GameObject. Then set the stereo eyes on the 2 cameras to Left and Right and set their culling flags so the textures only appear to one camera at a time. It's all in the editor GUI, no scripts. Hope that helps.
- TomGExplorerHad to position the extra cam next to the centerEyeAnchor, when attached as a child, the rotation went pretty wrong. it's working fine now, Nice!
Thanks!
So if i understand correctly i'm throwing away some performance in doing it that way. Is the stuff below possible and would it have an beneficial effect on performance?- Have a central camera set to Target Eye: Both, have it render everything except for left and right culling masks.
- Have a left camera for left, set culling mask to ONLY render left
- Have a right camera for right, set culling mask to ONLY render right
play with the depth of the cameras so the central one would render everything needed and then layer the left and right on top of that.
I've tried the above, but can either only get everything to render (except the stereo layers) or only the left right cameras, according to the depth i put the cameras in. is there any trick to "merge" the 2 layers? or am i going totally off board with this and would it not really help performance anyway?
Again thanks for the support! - ahtramHonored Guest
"cybereality" wrote:
Please use Unity 5.1.2p2 or higher and add a second Camera to the centerEyeAnchor GameObject. Then set the stereo eyes on the 2 cameras to Left and Right and set their culling flags so the textures only appear to one camera at a time. It's all in the editor GUI, no scripts. Hope that helps.
Hi, I'm using 5.1.2 with the Oculus Utilities for Unity 5 V0.1.0-beta
But I found there's no way to use separate cameras for different eyes.
In Unity's document: http://docs.unity3d.com/Manual/VROverview.html
They state:Automatic stereo display
It is not required to have two Cameras for stereoscopic displays. Any camera that has no render texture is automatically rendered in stereo to your device. View and projection matrices are adjusted to account for field of view and head tracking.
Optimizations automatically occur to make it less expensive to draw frames twice (once for each eye).
Is that means I have to use the mobile SDK 0.6 for the rendering two different textures each eye trick? - TomGExploreras stated in the posts above you can add a second camera and set it's rendering to only left eye, and the original one you can set to render only the right for example, it is perfectly possible with 5.1.2p3 as i'm doing right now.
- ahtramHonored Guest
"TomG" wrote:
as stated in the posts above you can add a second camera and set it's rendering to only left eye, and the original one you can set to render only the right for example, it is perfectly possible with 5.1.2p3 as i'm doing right now.
How do you make a camera only render one eye?
What version of SDK you're using? - adamroszykHonored GuestBump,
How do you make a camera only render one eye?
Is it possible with Unity 5.1.3f1 and Oculus Utilities for Unity 5 V0.1.0-beta ? - cyberealityGrand ChampionYes, you can do it in Unity 5 with the Oculus Utilities. Here are the steps:
- Import Oculus Utilities into your project (I'd start with a new project just for testing).
- Comment out the foreach block (around line 179 - 189) in OVRCameraRig.cs.
- Inside the Heirarchy, duplicate CenterEyeAnchor and name it CenterEyeAnchorLeft. Leave the original one alone.
- Go in the CameraEyeAnchorLeft and set "Target Eye" to "left". Make the original "right"
- Create two new layers "Camera Left" and "Camera Right".
- Go in the culling mask for the camera component on CenterEyeAnchorLeft and deselect the "Camera Right" layer. Do the same for the original CenterEye (but with "Camera Left").
- Make sure any stereo geometry is set to the proper layer. Meaning objects only visible in the left eye should have the layer of "Left Camera" or similar for the right.
This will allow things like stereo textures, or displaying completely different objects in each eye.
Hope that helps. - suppenhuhnExplorer
- Go in the CameraEyeAnchorLeft and set "Target Eye" to "left". Make the original "right"
Hi,
i'm trying follow your steps - but i can't find any setting or component in the CenterEyeAnchor or anywhere else which says "Target Eye" - what am i doing wrong ? Or do i get it wrong ?
I'm using DK 1, Unity 5.2 and Utilities for U5 v0.1.0-beta - and start with the cubes scene. On none of these game objects i can find that "Target Eye" setting:
- LeftEyeAnchor
- CenterEyeAnchor
- RightEyeAnchor - vrdavebOculus StaffTo do this you need to be using 5.1.3p2.
- suppenhuhnExplorerOk, thanks! Now there is a Target Eye setting available :-)
But it seems to be removed again with the 5.2 release ... is this method a dead horse i'm betting ?
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 12 months ago
- 6 months ago
- 3 years ago