Syphon GUITexture in Unity3D

Home Forums Syphon Syphon Implementations – User Syphon GUITexture in Unity3D

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #25664
    robotfunk
    Participant

    I’m trying to use Syphon in a GUITexture attached to a camera in Unity3D. I can get a Syphon texture onto gameobjects fine with SyphonClientTexture, but I can’t get it to work as a GUITexture on a camera. Is what I’m trying to do possible at all?

    I could parent a plane to the camera but this is for a virtual camera system where a camera man can see real actors keyed into a realtime 3D scene. When zooming in/out the plane would get out of focus.

    #25680
    Brian Chasalow
    Participant

    It totally works. I just tried it, it’s super easy.

    1) GameObject/Create Other/GUITexture
    2) add a syphon client texture script to that object (or create a new script that derives from SyphonClientTexture)
    3) modify SyphonClientTexture’s ApplyTexture() method (or override it) so that instead of
    renderer.sharedMaterial.mainTexture = clientObject.AttachedTexture;
    renderer.sharedMaterial.mainTexture.wrapMode = TextureWrapMode.Repeat;

    you do:

    guiTexture.texture = clientObject.AttachedTexture;

    boom, syphon client texture on a gui.

    #37757
    robotfunk
    Participant

    thanks, nothing I tried worked until I removed all traces of Syphon and reimported the package. Works fine now.

    first results:

    #37884
    Brian Chasalow
    Participant

    cool. Yeah, the new package with the Advanced SyphonClientTexture examples (like the projector example script) should show you how to do something like this.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.