From 3377442445a85dd9e30380aa3334ca8f6607fbd9 Mon Sep 17 00:00:00 2001 From: Brian Chasalow Date: Sun, 3 Nov 2013 23:08:50 -0500 Subject: [PATCH] a12 added SyphonClientTextureProjector script, and made it so that SyphonClientTexture adds the mainTexture on all materials on a gameObject, not just the first --- .../Unity3D/Unity3D-3_5/Read Me.rtf | 44 +++++-- .../Assembly-CSharp-Editor-vs.csproj | 1 + .../Assembly-CSharp-Editor.csproj | 1 + .../Assembly-CSharp-Editor.pidb | Bin 14997 -> 15706 bytes .../Assembly-CSharp-firstpass-vs.csproj | 2 + .../Assembly-CSharp-firstpass.csproj | 2 + .../Assembly-CSharp-firstpass.pidb | Bin 37590 -> 40159 bytes ...ssembly-UnityScript-firstpass-vs.unityproj | 1 + .../Assembly-UnityScript-firstpass.pidb | Bin 12538 -> 12677 bytes .../Assembly-UnityScript-firstpass.unityproj | 1 + .../Assets/Editor/SyphonHelper.cs | 6 +- .../SyphonClientTextureProjector.cs | 50 ++++++++ .../SyphonClientTextureProjector.cs.meta | 9 ++ .../SyphonTexture/SyphonClientTexture.cs | 23 ++-- .../SyphonTexture/SyphonServerTexture.cs | 14 ++- .../SyphonUnityExample/Assets/Read Me.rtf | 44 +++++-- .../Resources/SyphonProjectorMaterial.mat | Bin 0 -> 4928 bytes .../SyphonProjectorMaterial.mat.meta | 4 + .../SyphonShaders/SyphonProjector.shader | 111 ++++++++++++++++++ .../SyphonUnityExample-csharp.sln | 2 +- .../SyphonUnityExample/SyphonUnityExample.sln | 2 +- .../SyphonUnityExample.userprefs | 11 +- 22 files changed, 280 insertions(+), 48 deletions(-) create mode 100644 Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Plugins/SyphonTexture-AdvancedUsers/SyphonClientTextureProjector.cs create mode 100644 Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Plugins/SyphonTexture-AdvancedUsers/SyphonClientTextureProjector.cs.meta create mode 100644 Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Resources/SyphonProjectorMaterial.mat create mode 100644 Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Resources/SyphonProjectorMaterial.mat.meta create mode 100644 Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Resources/SyphonShaders/SyphonProjector.shader diff --git a/Syphon Implementations/Unity3D/Unity3D-3_5/Read Me.rtf b/Syphon Implementations/Unity3D/Unity3D-3_5/Read Me.rtf index a92031c..16bfe74 100644 --- a/Syphon Implementations/Unity3D/Unity3D-3_5/Read Me.rtf +++ b/Syphon Implementations/Unity3D/Unity3D-3_5/Read Me.rtf @@ -7,7 +7,7 @@ \f0\fs36 \cf0 Syphon for Unity Pro 4.0 \ \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural -\fs20 \cf0 1.0 Public Beta 2 a11 +\fs20 \cf0 1.0 Public Beta 2 a12 \fs36 \ \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural @@ -30,19 +30,41 @@ Open the .unitypackage to import to an existing project, or simply create a new \ Add a Syphon.cs to your main camera. this will act as your Syphon manager.\ \ -Syphon Server: \ -You have two options.\ + +\b (*For new users*) \ +---------------------- +\b0 \ + +\b Syphon Server: +\b0 \ 1) if you want to simply output the existing Unity scene camera as a syphon server, add a SyphonServerTexture to any camera in your scene. For basic setups, use this.\ \ -2) (*For advanced users*) if you want to output a custom resolution video texture (i.e., 3072x768 for a triplehead, etc) add a SyphonServerTextureCustomResolution to the main camera in your scene. If you want a quick way to use Unity as a control surface, where its GUI is only visible inside the Unity app itself, additionally take a look at the code in ControlSurfaceExample. See the unity scene SyphonServerCustomResolution.unity for a demo.\ -\ -\ -Syphon Client: \ + +\b Syphon Client: +\b0 \ Add a SyphonClientTexture to any object in your scene.\ On the SyphonClientTexture, in the public inspector fields, add the name and appName of the client you just added.\ + +\b ----------------------\ + +\b0 \ \ -Take a look at the code in SyphonClientTexture.cs's ApplyTexture() method to see how to add additional functionality- adding the texture to projectors, bump maps, etc.\ + +\b (*For advanced users*)\ +----------------------\ +Syphon Server: +\b0 \ +if you want to output a custom resolution video texture (i.e., 3072x768 for a triplehead, etc) add a SyphonServerTextureCustomResolution to the main camera in your scene. If you want a quick way to use Unity as a control surface, where its GUI is only visible inside the Unity app itself, additionally take a look at the code in ControlSurfaceExample. See the unity scene SyphonServerCustomResolution.unity for a demo.\ \ + +\b SyphonClient: +\b0 \ +if you want to use a Projector as a Syphon client, add the SyphonClientTextureProjector script to a gameObject that has a Projector on it, and then in its public inspector fields, add the name and appName of the client.\ + +\b ----------------------\ + +\b0 \ +Take a look at the code in SyphonClientTexture.cs's ApplyTexture() method to see how to add additional functionality- adding the texture to projectors, bump maps, etc.\ \ \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ri-2496\pardirnatural\qj \cf0 Syphon for Unity is published under a BSD license. See the included License.txt file.\ @@ -54,8 +76,10 @@ Syphon for Unity3D - Brian Chasalow (Unity 3D integration and scripting), Tom Bu \ \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ri-2496\pardirnatural\qj -\b \cf0 Release Notes: -\b0 \ +\b \cf0 Release Notes:\ +\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ri-2496\pardirnatural\qj + +\b0 \cf0 a12: added SyphonClientTextureProjector script, and made it so that SyphonClientTexture adds the mainTexture on all materials on a gameObject, not just the first\ a11: added a custom resolution syphon example, and fixed a rare threading issue on syphon exit or creation. \ a10: fixed a bug with OnRetireServer crashing with OpenFrameworks servers exiting.\ a9: fixed some Unity 4.2 texture creation and 64 bit issues. uses custom Syphon framework with multithreading changes.\ diff --git a/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assembly-CSharp-Editor-vs.csproj b/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assembly-CSharp-Editor-vs.csproj index 50a171d..0bc103a 100644 --- a/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assembly-CSharp-Editor-vs.csproj +++ b/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assembly-CSharp-Editor-vs.csproj @@ -56,6 +56,7 @@ + diff --git a/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assembly-CSharp-Editor.csproj b/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assembly-CSharp-Editor.csproj index 3ddb993..c652c70 100644 --- a/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assembly-CSharp-Editor.csproj +++ b/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assembly-CSharp-Editor.csproj @@ -56,6 +56,7 @@ + diff --git a/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assembly-CSharp-Editor.pidb b/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assembly-CSharp-Editor.pidb index 5aab0594c19b59002cd719993be01691be085b94..a87b2612617615a8bf72a22c8a9afd6f7b124a43 100644 GIT binary patch delta 2893 zcma);T})GF7{~i6R8IlVfuog=0_FR&Ep1T|Hxv|PZVVji(21ka3Pm`rJs^TgyMcqb ziNGUF$CBxiE#8=Hw{VU?fF-brEAP?1`h?KGK8JFu-EB;;fBLV;xm#8T5&A=S-T>gqRXmp8HU z)h1Q;@#>QwV1qGbhpd*H3Yp7G{TE*_a{~AYg?UsKQ)?q6WXENQzWUphSRDn9G}h zhAImzXDf0Uv2wvGAir_~TsbzmlJqK}SFiVZoTJDNVqz=JE|@Qyf|xB!t|8qm`gowH zI0ogp8M2r3TA}Y+n2Puc;YHR5#B&~49^g}Rd|442otwm^u!BsG)wvzUO(2iiT z1k4tN_QFi{MP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|Q}Fk?RqQDwTRj zmM056dPdeKnNQEi0wwe78CjrY3{k>XJtH%ejC?Ywjto$;Ha#OFl&n38MRE7!gc5cpL1g5Fl953s zO-ODiS+|~%6G}!VnN)X{8D89IG9(L>g}wShvO>v1dPbHg*+o4gYm{t2$D)FKQNke% z44#w0PakjGa@;+6qGV*3NxL9Vlx$4TrkG9YSjr4aj;@)p@$itZWdt7WYcRi$5`B9q rH^I68r@9pk`6uX8lb_@&OZc= + @@ -62,6 +63,7 @@ + diff --git a/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assembly-CSharp-firstpass.csproj b/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assembly-CSharp-firstpass.csproj index 14a1c1e..35716d0 100644 --- a/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assembly-CSharp-firstpass.csproj +++ b/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assembly-CSharp-firstpass.csproj @@ -49,6 +49,7 @@ + @@ -62,6 +63,7 @@ + diff --git a/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assembly-CSharp-firstpass.pidb b/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assembly-CSharp-firstpass.pidb index 217c60beccbb49ddd0cedcac2781af008b2d8128..504c55199a34f162a5ba005456996be4021c333a 100644 GIT binary patch delta 5876 zcmbVQX?T>?6`q@Al5ZfHECk3x2pTq#EPyO-fUJSANDvhXFl0WGKr#uFVM!uPSTu<2 z$E|`aRzYpGYG{?>T5W4<6{%IbXhE%7TQ{`T+7{FIy_x$lAwK@-eV%jXocFx<-2Hrc z^7_3oCy&PLY*hujHaEqrD{qTa&rcq3p3CJ*hB%EtKgc>r45Sirlcd%ylv8svWc$)y zvS#X1l`ki!_E-HSzT`Yl92l+vkiJq}GBax+tOP=)5%5BWh?rdbtgK-`EQr$xGJ8c{ER8E@*#Tp{KfjG$e`){`VOKq6Vj80X#~ihr}M3yo|knky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s.unityproj b/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assembly-UnityScript-firstpass-vs.unityproj index 960b774..65e86a5 100644 --- a/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assembly-UnityScript-firstpass-vs.unityproj +++ b/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assembly-UnityScript-firstpass-vs.unityproj @@ -55,6 +55,7 @@ + diff --git a/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assembly-UnityScript-firstpass.pidb b/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assembly-UnityScript-firstpass.pidb index ed5a7ca4752e2baa9739896939e9a9aa718ac76b..9a4da088943e2ce1d7fa7a6787f2f4344f58d985 100644 GIT binary patch delta 393 zcmeyB*qS_{ow00VhbAXu%H~a+EliAyHk`8(W()w#Xx1vlMU51C&#Hr2&LrYF!BLK zctIwV0Eu>}R01DAOt=)t=z!@Ecg`D`W6-xjyCn$iB o0T&lbJ&@nUIN6X}dU6Jv;$#mUzsW@g&U_6>%GetwA2u)t0OWmHD*ylh delta 340 zcmZoo{*^ePoiT4?hbAXu!sbn!EliBbo6UK)F*C|-e#c)RI{B$;C~E-&14GheMhy)v z6FtKU{m{J3lFG>fno^TJHN^S&fRemG%vOk76|YE2W=VdLUP?|5BR@=i(d2V#x-1|Q zC;wK9n0!EugDHCKQ0~c!rkTjmm$fq$`UR#N=a&m*V?BsZD1;#2M n%a*Zv^FHlZM#h@WGP)+rOe{5%^9(NW)q-?F0ekIaKSOf>pP5jy diff --git a/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assembly-UnityScript-firstpass.unityproj b/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assembly-UnityScript-firstpass.unityproj index 960b774..65e86a5 100644 --- a/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assembly-UnityScript-firstpass.unityproj +++ b/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assembly-UnityScript-firstpass.unityproj @@ -55,6 +55,7 @@ + diff --git a/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Editor/SyphonHelper.cs b/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Editor/SyphonHelper.cs index faf8f88..c618241 100644 --- a/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Editor/SyphonHelper.cs +++ b/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Editor/SyphonHelper.cs @@ -33,9 +33,9 @@ static AutorunSyphon() { //only cache the assembly/update the instance/etc if the syphon instance already exists in the scene //but, using registered syphon clients/server scripts instead of 'finding' them in the scene. this is faster. -// if(UnityEngine.Object.FindObjectOfType(typeof(SyphonServerTexture)) != null || -// UnityEngine.Object.FindObjectOfType(typeof(SyphonClientTexture)) != null){ - if(Syphon.syphonScriptCount > 0){ + if(UnityEngine.Object.FindObjectOfType(typeof(SyphonServerTexture)) != null || + UnityEngine.Object.FindObjectOfType(typeof(SyphonClientTexture)) != null){ +// if(Syphon.syphonScriptCount > 0){ if(!Syphon.assemblyIsUpdated()) Syphon.cacheAssembly(); diff --git a/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Plugins/SyphonTexture-AdvancedUsers/SyphonClientTextureProjector.cs b/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Plugins/SyphonTexture-AdvancedUsers/SyphonClientTextureProjector.cs new file mode 100644 index 0000000..8672fcf --- /dev/null +++ b/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Plugins/SyphonTexture-AdvancedUsers/SyphonClientTextureProjector.cs @@ -0,0 +1,50 @@ +// Copyright (c) 2010-2012 Brian Chasalow, bangnoise (Tom Butterworth) & vade (Anton Marini). +/* + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + + +//This script should be applied to any object in the scene, and lets you attach a syphon client texture to any Unity object. +//You may modify the ApplyTexture() method as necessary, to handle projectors, bump maps, etc. +using UnityEngine; +using System.Collections; + +public class SyphonClientTextureProjector : SyphonClientTexture { + // Use this for initialization + [SerializeField] + private Material projectorMaterial; + + public override void ApplyTexture(){ + if(clientObject != null && clientObject.Initialized){ + Projector proj = GetComponent(); + if(proj != null && projectorMaterial != null){ + proj.material = projectorMaterial; + proj.material.SetTexture ("_ShadowTex", clientObject.AttachedTexture); + clientObject.AttachedTexture.wrapMode = TextureWrapMode.Clamp; + } + + } + } + +} diff --git a/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Plugins/SyphonTexture-AdvancedUsers/SyphonClientTextureProjector.cs.meta b/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Plugins/SyphonTexture-AdvancedUsers/SyphonClientTextureProjector.cs.meta new file mode 100644 index 0000000..da263b6 --- /dev/null +++ b/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Plugins/SyphonTexture-AdvancedUsers/SyphonClientTextureProjector.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6ed776afc471146b7b3198cd0188fb7e +MonoImporter: + serializedVersion: 2 + defaultReferences: + - projectorMaterial: {fileID: 2100000, guid: 52a1cf6eec0cc4f64bd6dfc9a3e8fe14, type: 2} + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Plugins/SyphonTexture/SyphonClientTexture.cs b/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Plugins/SyphonTexture/SyphonClientTexture.cs index f21113c..186b199 100644 --- a/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Plugins/SyphonTexture/SyphonClientTexture.cs +++ b/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Plugins/SyphonTexture/SyphonClientTexture.cs @@ -29,12 +29,13 @@ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY //You may modify the ApplyTexture() method as necessary, to handle projectors, bump maps, etc. using UnityEngine; using System.Collections; +#pragma warning disable 0219 public class SyphonClientTexture : MonoBehaviour { // Use this for initialization public string clientAppName = "Test Server"; public string clientName = ""; - private SyphonClientObject clientObject; + protected SyphonClientObject clientObject; void Start () { //this next line creates a syphon instance if it doesn't already exist Syphon instance = Syphon.Instance; @@ -46,12 +47,13 @@ void OnDestroy(){ } #if UNITY_EDITOR - public SyphonClientTexture(){ - Syphon.syphonScriptCount++; - } - ~SyphonClientTexture(){ - Syphon.syphonScriptCount--; - } +//i don't trust that this doesn't crash unity. need more testing. +// public SyphonClientTexture(){ +// Syphon.syphonScriptCount++; +// } +// ~SyphonClientTexture(){ +// Syphon.syphonScriptCount--; +// } #endif void setupTexture(){ @@ -74,9 +76,12 @@ public void AnnounceServer(string appName, string name){ } //handle applying the client texture to your object whichever way you please. - public void ApplyTexture(){ + public virtual void ApplyTexture(){ if(clientObject != null && clientObject.Initialized){ - renderer.sharedMaterial.mainTexture = clientObject.AttachedTexture; + Material[] matArray = renderer.sharedMaterials; + for(int i = 0; i < matArray.Length; i++){ + matArray[i].mainTexture = clientObject.AttachedTexture; + } renderer.sharedMaterial.mainTexture.wrapMode = TextureWrapMode.Repeat; } } diff --git a/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Plugins/SyphonTexture/SyphonServerTexture.cs b/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Plugins/SyphonTexture/SyphonServerTexture.cs index 07ba865..4de0341 100644 --- a/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Plugins/SyphonTexture/SyphonServerTexture.cs +++ b/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Plugins/SyphonTexture/SyphonServerTexture.cs @@ -36,6 +36,7 @@ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY using System.IO; using System.Runtime.InteropServices; using System.Collections.Generic; +#pragma warning disable 0219 public class SyphonServerTexture : MonoBehaviour { @@ -47,12 +48,13 @@ public class SyphonServerTexture : MonoBehaviour { #if UNITY_EDITOR - public SyphonServerTexture(){ - Syphon.syphonScriptCount++; - } - ~SyphonServerTexture(){ - Syphon.syphonScriptCount--; - } +//i don't trust that this doesn't crash unity. need more testing. +// public SyphonServerTexture(){ +// Syphon.syphonScriptCount++; +// } +// ~SyphonServerTexture(){ +// Syphon.syphonScriptCount--; +// } #endif public virtual void Start() { diff --git a/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Read Me.rtf b/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Read Me.rtf index a92031c..16bfe74 100644 --- a/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Read Me.rtf +++ b/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Read Me.rtf @@ -7,7 +7,7 @@ \f0\fs36 \cf0 Syphon for Unity Pro 4.0 \ \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural -\fs20 \cf0 1.0 Public Beta 2 a11 +\fs20 \cf0 1.0 Public Beta 2 a12 \fs36 \ \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural @@ -30,19 +30,41 @@ Open the .unitypackage to import to an existing project, or simply create a new \ Add a Syphon.cs to your main camera. this will act as your Syphon manager.\ \ -Syphon Server: \ -You have two options.\ + +\b (*For new users*) \ +---------------------- +\b0 \ + +\b Syphon Server: +\b0 \ 1) if you want to simply output the existing Unity scene camera as a syphon server, add a SyphonServerTexture to any camera in your scene. For basic setups, use this.\ \ -2) (*For advanced users*) if you want to output a custom resolution video texture (i.e., 3072x768 for a triplehead, etc) add a SyphonServerTextureCustomResolution to the main camera in your scene. If you want a quick way to use Unity as a control surface, where its GUI is only visible inside the Unity app itself, additionally take a look at the code in ControlSurfaceExample. See the unity scene SyphonServerCustomResolution.unity for a demo.\ -\ -\ -Syphon Client: \ + +\b Syphon Client: +\b0 \ Add a SyphonClientTexture to any object in your scene.\ On the SyphonClientTexture, in the public inspector fields, add the name and appName of the client you just added.\ + +\b ----------------------\ + +\b0 \ \ -Take a look at the code in SyphonClientTexture.cs's ApplyTexture() method to see how to add additional functionality- adding the texture to projectors, bump maps, etc.\ + +\b (*For advanced users*)\ +----------------------\ +Syphon Server: +\b0 \ +if you want to output a custom resolution video texture (i.e., 3072x768 for a triplehead, etc) add a SyphonServerTextureCustomResolution to the main camera in your scene. If you want a quick way to use Unity as a control surface, where its GUI is only visible inside the Unity app itself, additionally take a look at the code in ControlSurfaceExample. See the unity scene SyphonServerCustomResolution.unity for a demo.\ \ + +\b SyphonClient: +\b0 \ +if you want to use a Projector as a Syphon client, add the SyphonClientTextureProjector script to a gameObject that has a Projector on it, and then in its public inspector fields, add the name and appName of the client.\ + +\b ----------------------\ + +\b0 \ +Take a look at the code in SyphonClientTexture.cs's ApplyTexture() method to see how to add additional functionality- adding the texture to projectors, bump maps, etc.\ \ \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ri-2496\pardirnatural\qj \cf0 Syphon for Unity is published under a BSD license. See the included License.txt file.\ @@ -54,8 +76,10 @@ Syphon for Unity3D - Brian Chasalow (Unity 3D integration and scripting), Tom Bu \ \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ri-2496\pardirnatural\qj -\b \cf0 Release Notes: -\b0 \ +\b \cf0 Release Notes:\ +\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ri-2496\pardirnatural\qj + +\b0 \cf0 a12: added SyphonClientTextureProjector script, and made it so that SyphonClientTexture adds the mainTexture on all materials on a gameObject, not just the first\ a11: added a custom resolution syphon example, and fixed a rare threading issue on syphon exit or creation. \ a10: fixed a bug with OnRetireServer crashing with OpenFrameworks servers exiting.\ a9: fixed some Unity 4.2 texture creation and 64 bit issues. uses custom Syphon framework with multithreading changes.\ diff --git a/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Resources/SyphonProjectorMaterial.mat b/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Resources/SyphonProjectorMaterial.mat new file mode 100644 index 0000000000000000000000000000000000000000..8c11760aa1ccfa7ab2371ce529c720539f5986d1 GIT binary patch literal 4928 zcmeHL&2Jk;6rYe5+N6A>2^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BcrB z(QVlAPks~yq>{ibwHD8iS#qT{XQaCh4wP5c*4I}aY_!Gie0DwF0M~u!tIzw6T-zT{ z{&+w3-rv_^4RFzI+WTL8;IkHAx@+mz`-uY^(bX?5oJ!m(f0zj9yCeCPJ6GSmn^?O$ zoUk@;1ohEx)4$y7x_NfBrTP8D*C+o9>U;j&_tU*S=XzGZxw(|MdSiEz+>8GJk5R`P literal 0 HcmV?d00001 diff --git a/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Resources/SyphonProjectorMaterial.mat.meta b/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Resources/SyphonProjectorMaterial.mat.meta new file mode 100644 index 0000000..0ad14b5 --- /dev/null +++ b/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Resources/SyphonProjectorMaterial.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 52a1cf6eec0cc4f64bd6dfc9a3e8fe14 +NativeFormatImporter: + userData: diff --git a/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Resources/SyphonShaders/SyphonProjector.shader b/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Resources/SyphonShaders/SyphonProjector.shader new file mode 100644 index 0000000..46d3170 --- /dev/null +++ b/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Resources/SyphonShaders/SyphonProjector.shader @@ -0,0 +1,111 @@ +Shader "Projector/SyphonProjector MultiplyCG" + +{ + + Properties + + { + + _Color ("Main Colour", Color) = (1,1,1,0) + + _ShadowTex ("Cookie", 2D) = "gray" { TexGen ObjectLinear } + + } + + + + Subshader + + { + + Tags { "RenderType"="Transparent" "Queue"="Transparent+100"} + + Pass + + { + + ZWrite Off + + Offset -1, -1 + + + + Fog { Mode Off } + + + + AlphaTest Less 1 + + ColorMask RGB + + Blend DstColor One + +CGPROGRAM + +#pragma vertex vert + +#pragma fragment frag + +#pragma fragmentoption ARB_fog_exp2 + +#pragma fragmentoption ARB_precision_hint_fastest + +#include "UnityCG.cginc" + + + +struct v2f + +{ + + float4 pos : SV_POSITION; + + float4 uv_Main : TEXCOORD0; + +}; + + + +sampler2D _ShadowTex; + +float4 _Color; + +float4x4 _Projector; + + + +v2f vert(appdata_tan v) + +{ + + v2f o; + + o.pos = mul (UNITY_MATRIX_MVP, v.vertex); + + o.uv_Main = mul (_Projector, v.vertex); + + return o; + +} + + + +half4 frag (v2f i) : COLOR + +{ + + half4 tex = tex2Dproj(_ShadowTex, UNITY_PROJ_COORD(i.uv_Main)) * _Color; + + tex.a = 1-tex.a; + + return tex; + +} + +ENDCG + + } + + } + +} \ No newline at end of file diff --git a/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/SyphonUnityExample-csharp.sln b/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/SyphonUnityExample-csharp.sln index bf6a238..b6cca37 100644 --- a/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/SyphonUnityExample-csharp.sln +++ b/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/SyphonUnityExample-csharp.sln @@ -23,7 +23,7 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(MonoDevelopProperties) = preSolution + GlobalSection(MonoDevelopProperties) = preSolution StartupItem = Assembly-CSharp.csproj Policies = $0 $0.TextStylePolicy = $1 diff --git a/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/SyphonUnityExample.sln b/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/SyphonUnityExample.sln index 808cb5c..0632ea9 100644 --- a/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/SyphonUnityExample.sln +++ b/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/SyphonUnityExample.sln @@ -29,7 +29,7 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(MonoDevelopProperties) = preSolution + GlobalSection(MonoDevelopProperties) = preSolution StartupItem = Assembly-CSharp.csproj Policies = $0 $0.TextStylePolicy = $1 diff --git a/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/SyphonUnityExample.userprefs b/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/SyphonUnityExample.userprefs index ec0266d..2085216 100644 --- a/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/SyphonUnityExample.userprefs +++ b/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/SyphonUnityExample.userprefs @@ -1,14 +1,9 @@  - + - - - - - - - + +