little bit unclear

Home Forums Syphon Syphon Implementations – User little bit unclear

Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #4468
    vanakaru
    Participant

    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.

    #4469
    bangnoise
    Keymaster

    Hi… 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

    #4470
    vanakaru
    Participant

    Yes, 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.

    #4471
    vade
    Keymaster

    Er, 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.

    #4472
    kddw
    Participant

    Hi 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

    #4473
    vade
    Keymaster

    Hi 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:

    http://code.google.com/p/syphon-implementations/source/browse/trunk/Syphon%20Implementations/SyphonQC/SyphonServerQCPlugIn.m#187

    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!

    #4474
    kddw
    Participant

    In 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.

    #4475
    vade
    Keymaster

    Hi 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?

    #4476
    bangnoise
    Keymaster

    Hi 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?

    #4477
    kddw
    Participant

    A very simple example using buffered image:
    http://leepoint.net/notes-java/examples/animation/50analogclockbuf/analogclockbufexample.html

    If you could figure out how to plug that into JNI and Syphon that would be amazing!

    #4478
    gabeshaughnessy
    Participant

    Here’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…

    #4479
    vanakaru
    Participant

    It seems to reached a dead end. Or the thrill is gone. Or it is too difficult to implement. Sad!

    #4480
    vade
    Keymaster

    Where are you dead-ending? Whats the wall so to speak?

    #4481
    vanakaru
    Participant

    I 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.

    #4482
    bangnoise
    Keymaster

    Syphon support is coming for all of those.

    #4484
    orion
    Participant

    Bang Noise this is good news, i have hope, now to give Alchemy a little push in this direction!

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