Hey all,
I'm rendering data into a framebuffer, but want to be able to pix_add that texture with a live video input.
How can I get a gemframebuffer image from texture space into pix_ space???
Thanks, B. Bogart
Hello Ben,
Is it what you are looking for ? ++
Jack
Le vendredi 27 novembre 2009 à 02:51 +0000, ben@ekran.org a écrit :
Hey all,
I'm rendering data into a framebuffer, but want to be able to pix_add that texture with a live video input.
How can I get a gemframebuffer image from texture space into pix_ space???
Thanks, B. Bogart _______________________________________________ GEM-dev mailing list GEM-dev@iem.at http://lists.puredata.info/listinfo/gem-dev
Or maybe this ;) ++
Jack
Le vendredi 27 novembre 2009 à 11:31 +0100, Jack a écrit :
Hello Ben,
Is it what you are looking for ? ++
Jack
Le vendredi 27 novembre 2009 à 02:51 +0000, ben@ekran.org a écrit :
Hey all,
I'm rendering data into a framebuffer, but want to be able to pix_add that texture with a live video input.
How can I get a gemframebuffer image from texture space into pix_ space???
Thanks, B. Bogart _______________________________________________ GEM-dev mailing list GEM-dev@iem.at http://lists.puredata.info/listinfo/gem-dev
GEM-dev mailing list GEM-dev@iem.at http://lists.puredata.info/listinfo/gem-dev
Hey Jack,
I realized I forgot to mention the image can't be in the gemwin. That is I render a bunch of stuff into a framebuffer, and add it to the video, all without ever sending it to the gemwin.
AFAIK pix_snap will only snap the gemwin, not the gemframebuffer itself? Or is this wrong?
That is I need to get the texture off the gfx card, back into pix_ domain, *without* using the gemwin to do it.
Thanks for trying! .b.
Jack wrote:
Or maybe this ;) ++
Jack
Le vendredi 27 novembre 2009 à 11:31 +0100, Jack a écrit :
Hello Ben,
Is it what you are looking for ? ++
Jack
Le vendredi 27 novembre 2009 à 02:51 +0000, ben@ekran.org a écrit :
Hey all,
I'm rendering data into a framebuffer, but want to be able to pix_add that texture with a live video input.
How can I get a gemframebuffer image from texture space into pix_ space???
Thanks, B. Bogart _______________________________________________ GEM-dev mailing list GEM-dev@iem.at http://lists.puredata.info/listinfo/gem-dev
GEM-dev mailing list GEM-dev@iem.at http://lists.puredata.info/listinfo/gem-dev
Le vendredi 27 novembre 2009 à 11:24 -0800, B. Bogart a écrit :
Hey Jack,
I realized I forgot to mention the image can't be in the gemwin. That is I render a bunch of stuff into a framebuffer, and add it to the video, all without ever sending it to the gemwin.
This patch should be ok.
AFAIK pix_snap will only snap the gemwin, not the gemframebuffer itself? Or is this wrong?
Wrong, [pix_snap] snap 'things' rendered before it receive a bang. So you can see all your scene in the gemwin and snap only one part. This is the same with [gemframebuffer]. You can snap only one part of the [gemframebuffer], that depend of the order of the rendering. Then you don't snap 'things' in the gemwin.
That is I need to get the texture off the gfx card, back into pix_ domain, *without* using the gemwin to do it.
You can share the pix_ with [pix_share_write] and [pix_share_read]. As Chris says, it should be faster with GLSL and the work on textures, because [pix_snap] is slow. Hope it's enough clear and i didn't make a mistake ! ;) ++
Jack
Thanks for trying! .b.
Jack wrote:
Or maybe this ;) ++
Jack
Le vendredi 27 novembre 2009 à 11:31 +0100, Jack a écrit :
Hello Ben,
Is it what you are looking for ? ++
Jack
Le vendredi 27 novembre 2009 à 02:51 +0000, ben@ekran.org a écrit :
Hey all,
I'm rendering data into a framebuffer, but want to be able to pix_add that texture with a live video input.
How can I get a gemframebuffer image from texture space into pix_ space???
Thanks, B. Bogart _______________________________________________ GEM-dev mailing list GEM-dev@iem.at http://lists.puredata.info/listinfo/gem-dev
GEM-dev mailing list GEM-dev@iem.at http://lists.puredata.info/listinfo/gem-dev
Hi Jack,
The image I'm wanting to get from the framebuffer into pix_ domain is not, and should never be, rendered to the gemwin.
Unless I can render stuff to the gemwin that we can't see in the gemwin, I don't see how pix_snap can help.
I suppose a workaround could be using a gemwin sized black rect to break the scene into two chunks, with two sets of render priorities, but that seems like a terrible kluge.
I think a pix_snap for framebuffers is a useful idea. pix_tex2pix?
.b.
Jack wrote:
AFAIK pix_snap will only snap the gemwin, not the gemframebuffer itself? Or is this wrong?
Wrong, [pix_snap] snap 'things' rendered before it receive a bang. So you can see all your scene in the gemwin and snap only one part. This is the same with [gemframebuffer]. You can snap only one part of the [gemframebuffer], that depend of the order of the rendering. Then you don't snap 'things' in the gemwin.
B. Bogart a écrit :
Hi Jack,
The image I'm wanting to get from the framebuffer into pix_ domain is not, and should never be, rendered to the gemwin.
Unless I can render stuff to the gemwin that we can't see in the gemwin, I don't see how pix_snap can help.
you can render stuff to the gemwin that we can't see.
you just need to draw everything / snap / clear depth and color buffer / draw somthing else.
cyrille
I suppose a workaround could be using a gemwin sized black rect to break the scene into two chunks, with two sets of render priorities, but that seems like a terrible kluge.
I think a pix_snap for framebuffers is a useful idea. pix_tex2pix?
.b.
Jack wrote:
AFAIK pix_snap will only snap the gemwin, not the gemframebuffer itself? Or is this wrong?
Wrong, [pix_snap] snap 'things' rendered before it receive a bang. So you can see all your scene in the gemwin and snap only one part. This is the same with [gemframebuffer]. You can snap only one part of the [gemframebuffer], that depend of the order of the rendering. Then you don't snap 'things' in the gemwin.
GEM-dev mailing list GEM-dev@iem.at http://lists.puredata.info/listinfo/gem-dev
B. Bogart escribió:
The image I'm wanting to get from the framebuffer into pix_ domain is not, and should never be, rendered to the gemwin.
I think a pix_snap for framebuffers is a useful idea. pix_tex2pix?
Forgive my ignorance, but won't just a [gemframebuffer] and a [pix_snap] do the trick??
I actually needed to do the same thing as you (apparently) and I got it by using [gemframebuffer] and a [pìx_snap] "under" it: it snaps what is under the gemframebuffer, which is never rendered to the gemwin (unless you intentionally put it onto a rectangle)...
But maybe my "setup" was different from yours and I miss something.....
Ben
This would be a good use for a shader. Much faster to do that way and a good way to get into GLSL too.
On Thu, Nov 26, 2009 at 9:51 PM, ben@ekran.org ben@ekran.org wrote:
Hey all,
I'm rendering data into a framebuffer, but want to be able to pix_add that texture with a live video input.
How can I get a gemframebuffer image from texture space into pix_ space???
Thanks, B. Bogart
GEM-dev mailing list GEM-dev@iem.at http://lists.puredata.info/listinfo/gem-dev
Hi Chris,
I figured that may be the only way, to put the video on the gfx card and do all the analysis as a shader.
This is the best way to go in the long term, but I don't have time to implement the video analysis as a shader (ie pix_multiblob).
Unless someone already has implemented pix_add and pix_multiblob in a shader?
Thanks, b.
chris clepper wrote:
Ben
This would be a good use for a shader. Much faster to do that way and a good way to get into GLSL too.
On Thu, Nov 26, 2009 at 9:51 PM, ben@ekran.org mailto:ben@ekran.org <ben@ekran.org mailto:ben@ekran.org> wrote:
Hey all, I'm rendering data into a framebuffer, but want to be able to pix_add that texture with a live video input. How can I get a gemframebuffer image from texture space into pix_ space??? Thanks, B. Bogart _______________________________________________ GEM-dev mailing list GEM-dev@iem.at <mailto:GEM-dev@iem.at> http://lists.puredata.info/listinfo/gem-dev