Hi, i am doing a medical treament project, if a patient have some eye problem, and i want to stimulate his eye and make them become better, now i have two camera in my project(Vive VR), i want to let his bad eye receive some medical graphic information first, and the good eye receive information quite a few later, like 8 ms, so that this can be a way to strengthen training his bad eye and make it become better. i think this problem for several days and try to ask some friend nearby but i dont have a good solution yet, So any help that can point the way out would be appreciated !!!
Answer by Baroque
Apr 17 at 06:33 PM
The Vive hardware itself refreshes its eyes at 90Hz, so at best you can only delay in increments of 11.1ms (a single frame). As far as I know they are only visible to the GPU as a single screen, so if you needed that level of accuracy in the timing then you'd have to modify the actual hardware--well outside the realm of Unity!
If 11ms is accurate enough, you can simply delay rendering your object(s) by one frame. The easiest way to do this is:
Create two cameras, one for each eye, and set their layer masks to render the appropriate objects. In the VR settings for that camera, make sure they are only rendering to that particular eye.
Turn one camera on, wait a frame, then turn the next camera on. You could use a coroutine or just some code in the regular Update().
These cameras can render in addition to the Main camera if you have an environment or some background imagery you want to always render for both eyes.
Oh, i see, If 11ms is accurate enough, just trun on and off these two cameras alternately in a coroutine, right? I will try it right now, thank's a lot !!!
Good luck! I would start with a test scene first and make sure you can render each eye differently--it can be a little confusing to set up.
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
157 People are following this question.
Script able to target two cameras?
Multi-Display rendering offset when displays have different resolutions
Switch between 5 cameras in the game by clicking.
Render area separation?
Camer do not render correctly!