Home › Forums › Syphon › Syphon Implementations – User › little bit unclear
Tagged: Alchemy, live drawing
- This topic has 15 replies, 6 voices, and was last updated 9 years, 4 months ago by orion.
-
AuthorPosts
-
November 4, 2010 at 10:30 am #4468vanakaruParticipant
Since I heard about Syphon I was exited to start using Alchemy http://al.chemy.org live drawing with other video apps. I have got the Syphon now and I could try this combination with Isadora or CoGe but something is not clear. How do you get Simple Server to run (from your example video I see you start it first – mine does not start at all) and how do you get image or video to server. So can I use any app (Alchemy, Photoshop) that puts out a image/video through GPU or only apps that are *implemented* do it among each other?
For that matter can i use Alchemy drawing to mix with Quartz.
BTW Alchemy is probably made with Java.November 4, 2010 at 2:56 pm #4469bangnoiseKeymasterHi… I’ll try to address all your points…
Simple Server won’t run – what do you mean by “does not start at all”? Nothing happens when you double click it in the Finder? (if that’s the case, are you sure you’re running MacOS X 10.6?)
“how do you get image or video to server.” – Simple Server is just a demo, it only plays the Syphon logo, it’s not very useful, so you can probably ignore it anyway. The server needs to be made inside the application that’s sending the images.
So can I use any app (Alchemy, Photoshop) that puts out a image/video through GPU or only apps that are *implemented* do it among each other?
No, the application needs to support Syphon, either natively (because the developer has integrated Syphon), or through a plugin or similar extension, like Quartz Composer, FreeFrame, etc.
I don’t know much about Alchemy, though it looks like something it would be great to get working with Syphon. I’d suggest asking on the Alchemy forum – if anyone there is interested in working on Syphon support we’d be happy to lend a hand.
Cheers, Tom
November 5, 2010 at 12:07 pm #4470vanakaruParticipantYes, I do run the latest OS X fully updated. Simple Server just flickers once in dock like apps that will not run on my system. But sure it is not important.
Well. I did ask Alchemy forum first. However I was suggested asking this forum. So we’ll see. I am sure it will happen in some point.
November 5, 2010 at 12:10 pm #4471vadeKeymasterEr, what apps cant run on your system? Do you have other apps that have that issue as well?
Tell us the spec of your machine, model number, graphics card, etc. Can you also open /Application/Utilities/Console.app and look for the crash log (if there is one) for Simple Server.app?
It would be under: Files: ~/Library/Logs/CrashReporter, and send it to us?
Thanks.
November 5, 2010 at 1:54 pm #4472kddwParticipantHi all,
I am an Alchemy developer.
To implement Syphon in Alchemy, it looks like JNI is necessary.
I am a little unsure exactly what data gets sent?
Pixel arrays (full bitmap images) or OpenGL commands?Has there been any work on making a JNI interface for Syphon?
I have done JNI before and it isn’t much fun 🙁Karl
November 5, 2010 at 2:58 pm #4473vadeKeymasterHi Karl,
We also have not done much JNI and from what i’ve seen, I’ve not been looking forward to it either, hah! I do want to get a bit more familiar with it, as it seems useful for projects like Alchemy and Processing and the like. Thanks very much for getting in touch.
So, Syphon is implemented in such a way that right now, it assumes the input image is an OpenGL texture (GLuint texID) that will be published to the outside world (this is if you are implementing a server). If you implement a client, it *gives* you a texture. Both Client and Server require a valid working GL context.
You can get a brief overview of our API here:
http://syphon.v002.info/FrameworkDocumentation/That said, the API Syphon uses behind the scenes has some hooks we could potentially expose for using pixel buffer style images that do not require a GL Texture to be present for server publishing, however for speed, I think it makes sense to keep things GL most often, since most environments use that for display, or image processing. This has been something we have considered.
If you are using GL to render a full scene, you can make a new texture and do a glCopyTexImage2D to get the contents of the back or front buffer into a texture, and then push that through a syphon server. This is an option in the QC plugin, if you look at the source, thats how we get the ‘scene’ as rendered by QC. The pertinent code is:
However, If you have a pixel buffer, and no GL anywhere in the app, you could right now on the JNI side of things,
Create a new CGLContext (CGLCreateContext and prerequistes)
Make it active (CGLSetCurrentContext or use CGLMacros)
Make a new texture (glTexGen) and populate it with the content of your cpu side memory (glTexImage2D)
tell the server to use it via the SyphonServer publishFrameTexture: method.Forgive me if you get all this, at least GL wise. Let me know if that was helpful or just confusing as hell!
Alchemy looks really interesting, would be great to get it working, and if possible, with alpha too for nice compositing with other environments and scenes.
Thanks again for your interest!
November 6, 2010 at 2:09 pm #4474kddwParticipantIn Alchemy everything is stored in a BufferedImage
http://download.oracle.com/javase/6/docs/api/java/awt/image/BufferedImage.html
Supposedly that is hardware accelerated in the JVM using OPENGL, but there are no direct calls made.To be honest I haven’t programmed anything in earnest using Obj-C before and was hoping you guys might have a generic JNI example I could work off.
I think the alpha thing is a great idea btw.
November 6, 2010 at 2:21 pm #4475vadeKeymasterHi Karl, we don’t have a JNI example right now, but maybe if you could drum up a very basic java AWT example that draws a buffered image, we could look at it, and think about how Syphon might shim into it? No Promises.
Take a look and maybe chime in to the Syphon Processing Implementation Development thread, where user skawtus is attempting a JNI + Processing implementation?
Perhaps some basic JNI example can first be done, to help bootstrap other environments?
November 7, 2010 at 6:20 pm #4476bangnoiseKeymasterHi Karl, could you drop us an e-mail at contact [at] v002 [dot] info and we’ll try to join up the folk working on Java implementations?
November 9, 2010 at 6:29 am #4477kddwParticipantA very simple example using buffered image:
http://leepoint.net/notes-java/examples/animation/50analogclockbuf/analogclockbufexample.htmlIf you could figure out how to plug that into JNI and Syphon that would be amazing!
November 10, 2010 at 11:29 am #4478gabeshaughnessyParticipantHere’s one more ignorant artist chiming in on the developer’s forum! Alchemy support for Syphon would be great, and I can’t contribute anything on the code end of things, but I certainly can help promote, artfully demonstrate the outcome, and of course, pitch in $$ to keep developer’s fridge’s stocked with cold ones…
December 11, 2010 at 1:21 am #4479vanakaruParticipantIt seems to reached a dead end. Or the thrill is gone. Or it is too difficult to implement. Sad!
December 11, 2010 at 4:06 pm #4480vadeKeymasterWhere are you dead-ending? Whats the wall so to speak?
December 21, 2010 at 1:51 pm #4481vanakaruParticipantI am ending dead with apps I use – Alchemy, Isadora, Modul8. The latter one seems to come along in some point in the future I just heard. I can not do anything to help the matters – on this I am just a user and have to wait.
It just seemed to be so exiting at the start, but has been very quiet recently.December 22, 2010 at 5:54 am #4482bangnoiseKeymasterSyphon support is coming for all of those.
October 25, 2011 at 1:42 pm #4484orionParticipantBang Noise this is good news, i have hope, now to give Alchemy a little push in this direction!
-
AuthorPosts
- You must be logged in to reply to this topic.