How to use Jitter for projection mapping?

Sara's icon

Hi,
I am a beginner using Max 6. I need to projection map a video (the speed of which is being manipulated in real-time via incoming sensor data) to be projection mapped onto a curved concave screen (shaped like this https://vimeo.com/141175441 ). So far I've only been able to figure out how to project it like normal (thanks to the Jitter Tutorial #38).

I have been searching forums, but cannot find any clear tutorial, patches or instructions for what I need-- I really need it spelled out. Something that looks promising is the patch in this forum: https://cycling74.com/forums/simple-deformation-for-projection-mapping-onto-curved-surface-jit-gl-nurbs . However I cannot figure out how the shape in the patch is being created at all, or how I can change it's shape! What exactly is "tex"?? I've seen people also suggest things like Mad Mapper and VPT, but they don't explain how these integrate or if they work for jitter videos changing in real time. Since I want a simple curved shape, I'd like to keep it within jitter....

Thank you for your time!

Martin Beck's icon

Hi, I can't provide a spelled out tutorial on this but I modified the example from Rob Ramirez a bit to make it more clear.
The question is if using NURBS
https://en.wikipedia.org/wiki/Non-uniform_rational_B-spline
will give an easy access to what you want to do. But maybe this link http://demonstrations.wolfram.com/CylindricalSurfacesFromNURBSCurves/
and the patcher example give you an idea where this is going to.

Max Patch
Copy patch and select New From Clipboard in Max.

Remark: Maybe try first to only switch on the [qmetro] and switch on "ctlshow" and then try the different [bang buttons] and "rand". After this click on "read countdown.mov" and play the movie.
You may also try to set the grid shape "shape" to "OpenCylinder" and rotate it.

David Butler's icon

My recommendation would be to do this using something like MadMapper. Max is great for custom functionality but projection mapping is fiddly, and usually being completed under tight time pressure. In order to get it looking good, a lot of adjustment is required, which means you need a good UI and a lot of adjustment options. Personally I'd rather put the time I might spend building a projection mapping toolkit in Max on the actual creative part of the patch and use an existing tool (which already does the job far better than I ever could) for the mapping.

To get data to MadMapper you'll want to use either the Syphon (Mac) or Spout (Windows) packages available in the Max package manager. These objects will let you share a Jitter matrix/texture with other software. Once you've set this up in Max you should see the source appear in MadMapper.

Sara's icon

MARTIN BECK - thank you for the more detailed patch, it helps me understand a little better, however I cannot get the countdown video to play on the shape. I cannot figure out why it is not playing... I also am still confused on how to input the coordinates for the specific shape I want... maybe integrating with MadMapper is the way to go...

DAVID BUTLER - Thank you! I think I have figured this solution out! I have a MAC, so I downloaded this: https://github.com/Syphon/Jitter/releases/ and put the "Syphon" folder in my Max "packages" folder under Apps so I can get the syphon objects. I also downloaded the MadMapper trial. Then I built this patch verbatim in this tutorial (https://1024d.wordpress.com/2011/06/10/maxmspjitter-to-madmapper-tutorial/ ) . Then I launched Mad Mapper and I selected "Max" under "Syphon" (in right panel - icon looks like a document with a landscape), and my jitter video appeared on my computer screen in Mad Mapper. Then I plugged the projector into my computer and it was only projecting my desktop background (I have the displays to not be mirrored). In Mad Mapper I went to Output > "Full Screen Mode" and that made the Mad Mapper mapped version of my video appear on the projection screen! ... Now to just apply this to my existing video patch....

Sara's icon

Update: For some reason when I copy the working patch into my existing one, it will not connect to Mad Mapper... any ideas??? It's either not connecting at all, or I'll see a frozen image of my video in Mad Mapper, but it will be moving in Jitter. Maybe there's some conflicting path or something??

Sara's icon

Update 2: It seems to be working now, although I don't know what changed. I may have had multiple patches open with the same patch so it might have been getting confused. I closed everything, and then opened just one patch with my video and the syphon objects, and then opened Mad Mapper and it seems to be connecting ok again.