I need to blob track a point of light in a video and use it to draw freehand in the GEM window, possibly mixed with previously-recorded video clips. I'd also like to connect the adjacent points with lines so that the drawing is continuous.
I'm still pretty new to GEM, but I'm working on getting my head around all the render order and buffering ideas, I'm just not sure what the best approach is. I've tried using gemframebuffer going to a pix_snap, but it takes up 100% CPU, so I figure there's got to be a better way. Is there some sort of way I can just keep appending vertices to a list and use something like [curve]?
Thanks, spencer
I think what you need to do is create some kind of b/w mask. basically you start with a black texture and add white to wherever the point of light goes. you can either take the video material and filter it, so that only the light is visible and then create a feedbackloop that always adds to the last image, but you could also use blob and draw a curve, like you suggested. creating a long render chain of openglcommands on the fly could work, but becomes slower with every frame, so this will only work for a certain amount of time. but you can still use gemframebuffer and a feedback loop to draw white rectangles/circles/curves into a black texture and use it a the mask. at some point you probably want to reset your window? I will try to come up with a test-patch for that problem. would perfectly fit into a gem tutorial anyway. marius.
Spencer Russell wrote:
I need to blob track a point of light in a video and use it to draw freehand in the GEM window, possibly mixed with previously-recorded video clips. I'd also like to connect the adjacent points with lines so that the drawing is continuous.
I'm still pretty new to GEM, but I'm working on getting my head around all the render order and buffering ideas, I'm just not sure what the best approach is. I've tried using gemframebuffer going to a pix_snap, but it takes up 100% CPU, so I figure there's got to be a better way. Is there some sort of way I can just keep appending vertices to a list and use something like [curve]?
Thanks, spencer
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Single buffer rendering can be used for 'painting' using a geos as various brush types.
On Mon, Jul 21, 2008 at 3:34 PM, Spencer Russell < spencer.f.russell@gmail.com> wrote:
I need to blob track a point of light in a video and use it to draw freehand in the GEM window, possibly mixed with previously-recorded video clips. I'd also like to connect the adjacent points with lines so that the drawing is continuous.
I'm still pretty new to GEM, but I'm working on getting my head around all the render order and buffering ideas, I'm just not sure what the best approach is. I've tried using gemframebuffer going to a pix_snap, but it takes up 100% CPU, so I figure there's got to be a better way. Is there some sort of way I can just keep appending vertices to a list and use something like [curve]?
Thanks, spencer
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On Mon, Jul 21, 2008 at 5:28 PM, chris clepper cgclepper@gmail.com wrote:
Single buffer rendering can be used for 'painting' using a geos as various brush types.
The difficulty though, is that I want to draw some parts in a freehand single-buffer style, but I want it to be mixed and layered with video that's drawn normally.
thanks, spencer
As suggested by Chris, single buffer rendering is the good choice.
Then send a bang from [metro 1] (for exemple) to [gemhead] to force
the rendering (to your [gemhead] with the movie and to your [gemhead]
for the 'painting').
++
Jack
Le 21 juil. 08 à 23:51, Spencer Russell a écrit :
On Mon, Jul 21, 2008 at 5:28 PM, chris clepper
cgclepper@gmail.com wrote:Single buffer rendering can be used for 'painting' using a geos as
various brush types.The difficulty though, is that I want to draw some parts in a freehand single-buffer style, but I want it to be mixed and layered with video that's drawn normally.
thanks, spencer
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list
Single buffered drawing won't work with what he is describing, unless he repaints all of the brush strokes. When a new video frame is drawn, it will overwrite everything. This can be worked around by playing with the Z values though...set the video to draw behind the brush strokes and then make sure that you do Z writes for the brushes. However, you won't be able to do alpha with this...
The best way to do this would be to either cache the brushes or renderer the brushes to another render target with alpha. Then draw the video frame and draw the brush over top. You could also hand render the brushes to a texture with alpha and then just draw the quad. I don't know what the current set of GEM objects is though, so these 2 ideas might require creating some new objects.
Mark
Jack jack@rybn.org Sent by: pd-list-bounces@iem.at 07/21/2008 05:04 PM
To "Spencer Russell" spencer.f.russell@gmail.com cc pd-list@iem.at Subject Re: [PD] freehand drawing on video in GEM
As suggested by Chris, single buffer rendering is the good choice. Then send a bang from [metro 1] (for exemple) to [gemhead] to force the rendering (to your [gemhead] with the movie and to your [gemhead] for the 'painting'). ++
Jack
Le 21 juil. 08 à 23:51, Spencer Russell a écrit :
On Mon, Jul 21, 2008 at 5:28 PM, chris clepper cgclepper@gmail.com wrote:
Single buffer rendering can be used for 'painting' using a geos as various brush types.
The difficulty though, is that I want to draw some parts in a freehand single-buffer style, but I want it to be mixed and layered with video that's drawn normally.
thanks, spencer
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Le 22 juil. 08 à 02:10, Mark_Danks@PlayStation.Sony.Com a écrit :
Single buffered drawing won't work with what he is describing,
unless he repaints all of the brush strokes. When a new video
frame is drawn, it will overwrite everything. This can be worked
around by playing with the Z values though...set the video to draw
behind the brush strokes and then make sure that you do Z writes
for the brushes. However, you won't be able to do alpha with this...
Yes Mark, this the first patch join to this mail (paintandvideo.pd).
The best way to do this would be to either cache the brushes or
renderer the brushes to another render target with alpha. Then
draw the video frame and draw the brush over top. You could also
hand render the brushes to a texture with alpha and then just draw
the quad. I don't know what the current set of GEM objects is
though, so these 2 ideas might require creating some new objects.
A dynamic system (heavy) in the second patch (paintandvideobuf0.pd)
with 2 abstraction mycircle and my curve. I will try with texture
next time.
++
Jack 
Mark
Jack jack@rybn.org Sent by: pd-list-bounces@iem.at 07/21/2008 05:04 PM
To "Spencer Russell" spencer.f.russell@gmail.com cc pd-list@iem.at Subject Re: [PD] freehand drawing on video in GEM
As suggested by Chris, single buffer rendering is the good choice. Then send a bang from [metro 1] (for exemple) to [gemhead] to force the rendering (to your [gemhead] with the movie and to your [gemhead] for the 'painting'). ++
Jack
Le 21 juil. 08 à 23:51, Spencer Russell a écrit :
On Mon, Jul 21, 2008 at 5:28 PM, chris clepper cgclepper@gmail.com wrote:
Single buffer rendering can be used for 'painting' using a geos as various brush types.
The difficulty though, is that I want to draw some parts in a
freehand
single-buffer style, but I want it to be mixed and layered with
video
that's drawn normally.
thanks, spencer
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list
On Tue, Jul 22, 2008 at 9:42 AM, Jack jack@rybn.org wrote:
Le 22 juil. 08 à 02:10, Mark_Danks@PlayStation.Sony.Com a écrit :
Single buffered drawing won't work with what he is describing, unless he repaints all of the brush strokes. When a new video frame is drawn, it will overwrite everything. This can be worked around by playing with the Z values though...set the video to draw behind the brush strokes and then make sure that you do Z writes for the brushes. However, you won't be able to do alpha with this...
Yes Mark, this the first patch join to this mail (paintandvideo.pd).
paintandvideo.pd is exactly what I needed. Thanks Jack! I guess I was still fuzzy on how the buffering works, because I didn't realize that you could render something behind something else in single-buffer mode.
-spencer