jit.scissors but with GPU

Sep 28, 2009 at 11:07am

jit.scissors but with GPU

I spent hours trying to make a scissors like function using “td.resample.jxs” but I don’t understand how it works.
In fact i’d like to divide the image in 25 vertical bands and be able to process them independently. It works great with jit.scissors but it’s too slow.
Thank you very much for your help.

#45637
Sep 28, 2009 at 5:35pm

all of your parameters for that script are contained within the script, open it with text wrangler and you will see. In this particular script, you have parameters such as scrdim, dstdim, interp etc. So you load the script into a jit.gl.slab using read as your message. Your other messages would be [param scrdim $1] etc with the appropriate number boxes controlling the parameters of the message. Plug your jit.qt.movie or grab into the slab and out to a window and see the parameters of the script at work. Andrew’s tutorials on the main page are a godsend, study them.

#164612
Sep 28, 2009 at 5:47pm

I know how to use jit.gl.slab, the problem is that I don’t understand how to manage the scrdim and dstdim parameters. I don’t really understand them.

I spent hours trying combinations, without any success.
My probelm is coming from the algorithm, not from max.

#164613
Sep 28, 2009 at 7:10pm

http://www.cycling74.com/docs/max5/tutorials/jit-tut/jitterchapter43.html

this is your key to success. scr and dstdim are vec4, therefore the normal param *name* $1 with a number box wont be sufficient to modulate the parameter. After all the code you can see the patch example at the bottom on how that particular vec4 shader is working.

I hope i’m not being too simplistic.

EDIT: Pak param could be your friend, since the default for scrdim and dstdim are 0. 0. 1. 1. and attach number boxes to modulate those parameters

#164614
Sep 29, 2009 at 1:05am

Here is what I got so far. It’s exactly what I want except the black lines between each cuts.
If anyone have an idea.
Maybe the way i’m making it is too complicated too.
Thanks for your time and attention.

– Pasted Max Patch, click to expand. –
#164615
Sep 29, 2009 at 8:32pm

Hello,
The problem you are running into is directly related to the fact that the shader is written to use normalized coordinates. In this instance I would recommend altering the shader to use absolute texcoords instead.

AB

#164616
Sep 30, 2009 at 7:23am

#164617

You must be logged in to reply to this topic.