Skip to main content
New Participant
May 1, 2014

Rendering to only one camera

Hi,

I would like to use webcam textures, assigning them to plane objects by:



void Start()
{
string camName = WebCamTexture.devices[camnumber].name;
CameraTexture = new WebCamTexture(camName);
CameraTexture.Play ();
renderer.material.mainTexture = CameraTexture;

}



Now, I would like to obtain a stereo view by showing two of these objects separately (from separate webcams). How could I assign them to be shown -- one to left and one to right camera only?

Dragging these objects below CameraRight and CameraLeft doesn't seem to be enought. (Anyway, I don't even know if there would be some better way of doing this altogether!)
    This topic has been closed for replies.

    2 replies

    Inspiring
    May 1, 2014
    By making them children of individual cameras, all that is doing is making them appear in 3D space relative to that camera, and doesn't change rendering. It might even be annoying for the user to have something "stuck to their face" as a result (unless that's what you're going for).

    Anyway, to achieve the effect you're looking for you'll need to set up two new layers, one for "Left Eye", and one for "Right Eye", and then just mark what you want to show up only in one eye appropriately. Then on CameraLeft, make it render everything except Right Eye, and on CameraRight, make it render everything except LeftEye.

    Hope that helps.
    Titans of Space PLUS for Quest is now available on DrashVR.com
    ahahtoAuthor
    New Participant
    May 2, 2014
    Oh, that was quite simple!
    The point is exactly to "stuck" the picture into user's face, for providing a hud element.