Forum Replies Created
-
AuthorPosts
-
pymenvertParticipant
Hey,
I’m using the last version of Unity 3 and Mac OSX 10.6.6.
I’ve try in two Macbook pro 17′ last 2010 and in Imac 27′ mi 2010…arf, i don’t know why it doesn’t work…
pymenvertParticipantHello,
now, projector is working correctly.
It just have a default ratio.
I have tried different configuration for explain the problem.
You can see here :
http://www.fichier-pdf.fr/2011/02/02/issue-syphon-projector/and if you want, you can download a small scene here :
http://www.megaupload.com/?d=T1AHCV3YThank you for your help
pymenvertParticipantok thanks guys.
Web player doesn’t work.
Anyway.So do you know how can I do to get a standalone OSX build ?
I’ve try lot of configuration but no way.Is it the same problem with the standalone OSX build ?
My project.app doesn’t launch.
No error message, no computer reaction.I can create a Widgets but not a standalone app.
Someone is arriving to build and launch the project ?
pymenvertParticipantpymenvertParticipantthanks for your response,
Now, I have the last version of implementation and Syphon Framework.
Syphon is working correctly with Unity.But web player continue to getting strange crash when I build and run…
Actually, I have to use the QC’s output.
Is it normal ?Is it possible to use the output of Unity ? (standalone or web player)
pymenvertParticipantThanks Brian for this way…
I’ve modified the SyphonClientBridge like that :
using UnityEngine; using System.Collections; using System.Runtime.InteropServices; public class SyphonClientBridge : MonoBehaviour { public int desiredWidth = 1024; public int desiredHeight = 768; private Texture2D _texture; // Frees the Syphon Server and clears our Unity Plugin's GL resources [DllImport ("SyphonUnityPlugin")] private static extern void syphonClientDestroyResources(); // Syphon Client Update Texture takes in a texture from Unity, and populates it with the contents of a // Syphon Server. This also lazily inits the server for you, ensuring the proper OpenGL context is set. [DllImport ("SyphonUnityPlugin")] private static extern void syphonClientUpdateTexture(int nativeTexture, int width, int height); // Use this for initialization void Awake () { _texture = new Texture2D(desiredWidth, desiredHeight, TextureFormat.ARGB32, false); //_texture = new Cubemap (128, TextureFormat.ARGB32, false); _texture.Apply(false); Projector proj = gameObject.GetComponent<Projector>(); proj.material.mainTexture = _texture; //proj.material.mainTexture.cookie = _texture; /* if(renderer) { renderer.material.mainTexture = _texture; //proj.material.mainTexture = _texture; }*/ } static protected Material lineMaterial; static protected void CreateLineMaterial() { if( !lineMaterial ) { lineMaterial = new Material( "Shader "Lines/Colored Blended" {" + "SubShader { Pass { " + " Blend SrcAlpha OneMinusSrcAlpha " + " ZWrite Off " + "} } }" ); lineMaterial.hideFlags = HideFlags.HideAndDontSave; lineMaterial.shader.hideFlags = HideFlags.HideAndDontSave; } } // YOU MUST USE ON RENDER OBJECT FOR UNITY CLIENT. void OnRenderObject () { // Unity 3.0 has GetNativeTextureID, which returns the texture ID. // 2.x requires us to call GetInstanceID instead. // #if UNITY_3 CreateLineMaterial(); lineMaterial.SetPass(0); syphonClientUpdateTexture(_texture.GetNativeTextureID(), _texture.width, _texture.height); // #elif UNITY_2 // syphonClientUpdateTexture(_texture.GetInstanceID()); // #endif } void OnPostRender() { CreateLineMaterial(); lineMaterial.SetPass( 0 ); } public void cleanup(){ syphonClientDestroyResources(); } void OnDisable () { GL.InvalidateState(); Destroy(_texture); cleanup(); } }
Now, it works with a projector’s GameObject but I don’t know if it’s a clean code.
But, an instance of syphon client is mapped on each face of Cube.
like this screen shot :
http://www.heberger-image.fr/images/67697_Syphon_cube.png.htmlI won’t that.
I would like to have one instance of Syphon Client mapped on all the structure (2 Cubes for example).I don’t know if the problem come from projector’s shaders or SyphonClientBridge.
I’m trying to include mainTexture in the projector>light shaders but no way.
Perhaps create a syphon>projector shaders…
But I don’t understand how works the syphon shaders.Can you help me please..
Thanks in advance
pympymenvertParticipantHello all.
Thank you for this amazing software.
I’m getting strange crash when I build and run in web player.
1)I downloaded “ExempleScene” project.
2)Add “makeSyphonServerWork.cs” on the plugins folders.
3)Edited “SyphonServerBridge” like briangibson’s explain.
4)Edited “SyphonClientBridge” like r.38 (10/01/2011 syphon implementations)
4)go to file/build settings/player settings, and check ‘run in background’
5)go to edit/render settings, and drag a global skybox there to where it says ‘skybox’ from your project window.I put “SyphonClientBridge” in the Plane and “SyphonServerBridge” in Main Camera.
But when I build and run, it doesn’t work.
Web player run and crash.I have try lot of configuration but no way…
I don’t know where is my error.If anyone ca be help me or explain me how can I do for working Syphon Server with Unity, it would be fantastic…
Thank you in advance
-
AuthorPosts