Home › Forums › Syphon › Syphon Implementations – User › Anamorphic Stereo , dual Syphon output with kinect head tracking …
Tagged: kinect, stereo, stereoscopy, Syphon, unity3d
- This topic has 3 replies, 3 voices, and was last updated 6 years ago by Brian Chasalow.
-
AuthorPosts
-
February 27, 2015 at 6:46 pm #58931eloimaduellParticipant
hi Syphoner’s !
I’ve been struggling to make an experiment work …
I started with http://en.wikibooks.org/wiki/Cg_Programming/Unity/Projection_for_Virtual_Reality
That gived me the ability to create an offset camera that recreates an anamorphic vision of the scene from the point of view of the user tracked with a kinect.
Then i wished i could render this point of view in stereoscopy, so i used stereosKopix asset for having an output with 2 stereo points of view of my anamorphic vision.
That worked and it’s nice to play in such a cheap 1 screen “CAVE” system …
My problem is when i try to output each eye render through syphon …
In the script that creates the 3D camera’s i have :leftCam = new GameObject (“leftCam”, Camera);
rightCam = new GameObject (“rightCam”, Camera);myL = GameObject.Find(“leftCam”);
myL.AddComponent(“homographyCam”).projectionScreen = myScreen;
myR = GameObject.Find(“rightCam”);
myR.AddComponent(“homographyCam”).projectionScreen = myScreen;myR.AddComponent(“Syphon”);
myL.AddComponent(“Syphon”);
myR.AddComponent(“SyphonServerTexture”);
myL.AddComponent(“SyphonServerTexture”);`When i play the game, the script creates two cameras, and add the correct components. On the simpleClient i see “leftCam-Unity3d” and “rightCam-Unity3D” but both have the same image on it … the right cam is visible on both Syphon’s … ?¿
I don’t know why i can’t see different streams from Unity if i’ve applied to each camera (by script, not dragging it) the SyphonServerTexture …
Anyone can give me a trick ?
Thanks for reading !- This topic was modified 6 years ago by eloimaduell.
March 2, 2015 at 9:09 am #58938vadeKeymasterYou are overwriting the rendering from one eye with the second.
You need two syphon textures one for left and right respectively, or you need a render pass to blit both left and right into a single texture, and then output that one texture to unity.
March 2, 2015 at 3:58 pm #58940eloimaduellParticipantHi Vade !
So when is that i’m overwritting the renders ? or … how could i avoid it ? How can i be sure that each camera has it’s own Syphon server ?
Do i need to change the script name for each cam ?
I’ve been working with unity just for some months and i’m loosing a lot on main concepts … not sure if attaching one same script to different GameObjects creates diferent instances of it or not …
Any hint on how to not overwrite my self are appreciated 😉
March 7, 2015 at 1:12 pm #58942Brian ChasalowParticipantmyR.AddComponent(“Syphon”);
myL.AddComponent(“Syphon”);this is bad, for one. it probably takes care of it for you, but only add 1 syphon manager to the highest depth cam plz.
if it still doesnt work, can you send me your scene?
brian@chasalow.com -
AuthorPosts
- You must be logged in to reply to this topic.