[sharing is sharing] jitter recipe for flowfield / mesh generation
my dearest cyclists,
since i got some nice feedback from this forum when sharing my basic homography solution (http://cycling74.com/forums/topic.php?id=18017) i thought i could give it another go and add a software tab on my homepage.
it now contains "h.lines", which is some kind of jitter recipe for flowfield stuff and mesh generation from video input. nothing massively spectacular, but it might be a good starting point for your own experiments.
i am using Wesley Smith´s xray.jit.cellcoords from http://www.mat.ucsb.edu/%7Ewhsmith/xray.html
attached is a screenshot of what h.lines does (or can do),
you can watch it in full blown action here: http://www.youtube.com/watch?v=H7UDuoDuW78
download it here: http://hons.at/software/
hope you like it, and sorry for the grumpy video, but the track is called "grump" after all.
This is super beautiful. Congrats!
If you have Max6, it looks like you’ll be able to make good use of jit.gen with the kind of things you’re doing in this patch. The only thing I say that isn’t possible in jit.gen is mimicking what xray.jit.cellcoords does, which will have to wait until the jitter gen objects can take non-uniform inputs. Looking forward to seeing how this develops!!
yeah, I’ve been playing around with this, it looks amazing. The only downside is that I couldn’t seem to get that draped cord look that your demo pictures had; many of my scenes ended up like one of those inflatable balloon men :-/
I suspect wizardry, or at least a keen sense of your own patch letting you tweak it properly. My own experience in this sort of patch tell me that there are many sweet spots that can be hard to find.
OH, and I meant to say; nicely laid out patch – I love how I can actually read this bugger, and do sensible edits of my own. Cheers for that work.
thanks for your comments !
@wesley: as far as i can remember i have tried to do a lookup via shader once, but at that time the gpu i was working on was very slow with float32 textures, and in the end it turned out that xray.jit.cellcoords worked much smoother. but i will have a look at it again – as soon as i can jump on the max 6 wagon (looking forward to it ..)
(and thanks for the xray objects, btw – love it!)
@wetterberg: the screenshot only shows the presets that i hopefully included in the download (did i?) with the top left being the input (almost black and white) – the draped cord look is more a result of the input than of wizardry (so i am sorry for your inflatable balloon men ;-)
if the input picture is "smooth" (not too grainy, properly lit or somehow softened ..) it should be fairly easy to get this look. in the "FORMULA" subpatch i have only used hue and saturation as a means of influencing the curvature, so if your input has smooth changes in h&s, the result will be draped cords.
Incredible- great work, hons!
It looks great !!! Thank you for sharing !
0_0 waaaaw! thank you!!!
However, after some minutes (h.lines.maxpat) Max crashes…
It seems related to xray object; maybe not completely compatible with max6?
Here attached the crash log, maybe could be useful.
thanks for the pointers, hons. Again, great work – always nice to see a new take on things.
crashes on Max 5 as well. In a rather unpredictable way but reliably after some minutes (or less). Too bad, it´s so nice!
I saw the xray objects turning up 4-ish… something there maybe?
Nope, been running xray.jit.cellcoords for some time now. No crash…. hmmm
thank for the replies and bug reports. this is not easy to track – but matpe´s log shows that it might in fact be related to xray.jit.cellcoords.
i tried to shrink down the whole thing and came up with this little stress tester for jit.xray.cellcoords that crashes max quite easily ( mostly in a matter of seconds, i am on max 5.1.4, osx 10.6.8) ..
i´ll look where i can file a bugreport for the object – wesley, you here ?
If you clamp the second input’s values to be 1-less than the first inputs dimensions, it won’t crash. I’ve fixed this in the source, but if you’re using the old version, that will fix it as well. Here’s an OSX compiled xray.jit.cellvalue that fixes the crash.
Great work, thanks for sharing.
I am wondering how possible it is to assign color values to the generated meshes in order to get different effects for the different color values.
Example – everything that is red make it a line, everything that’s blue make it a line loop etc.
I know this can be done in java via Processing storing pixel value of each frame assign to color, but don’t know if this could be done in this patch through a pre sorting out of the matrix or after it passes through the xray.jit.cellvalue
just and idea.
amazing, thank you so much!
Super cool, and a nice learning patch! thank you so much!
I’m trying to work out how to record the output of this patch, but am having no luck. Although I’ve been using Max for a while my knowledge of Jitter is a little patchy (no pun intended). I’ve got a feeling I need to use Jit.gl.videoplane but can’t work out the correct settings. Any pointers appreciated..
You mean record to a video file? Some options:
1. use screen capture software, no max patching
2. use jit.gl.asyncread to grab the rendering output to a matrix and send that into jit.qt.record or jit.vcr (bit rusty here, recording objects names might be a bit different)
3. if on Mac, use syphon to send to the GL output to a recording application, see http://syphon.v002.info/
Yeah exactly – record to video file, preferably from within Max.
I’ll check out jit.gl.asyncread first when I get a minute. Syphon also looks really interesting though.
Thanks for the advice, I’ll keep you posted.
@dtr Thanks again, the Syphon solution is working pretty well for me, or at least it’s good enough for my needs right now. I’m just starting to get more into the Jitter side of things and syphon looks like it’s going to be handy to know.