Grid Warp - looking for a better solution

.lov.'s picture

Hi Guys,

i need a bit help. I'm working on a grid-warp patch, using latest GL Tools and Spooky patches - and the Interaction. Basically, the composition working, but if i changing the current "work point" too fast that will screw up all the things - check the attached file, please.

ps.: It's not too bad in Quartz Composer, but if i want to using this comp outside of QC, the issue will be bigger - tested with a single QCView, QuartzBuilder, CoGe, so looks like its not my fault (maybe i found a bug?).

I had the same issue with Quad Warp (http://coge.lovqc.hu/coge/forum/viewtopic.php?f=17&t=175), but with that composition i found a working solution which works outside of QC.

PreviewAttachmentSize
Grid Warp.qtz73.76 KB

smokris's picture
Re: Grid Warp - looking for a better solution

I think this is because of the frame delay induced by using and then reading the Spooky value --- the value is written one frame, and read the following frame, so the selected index will be one frame behind the status of the left mouse button.

I've attached a modified version, omitting the Spooky patches, and instead outputting the selection from inside the Iterator using a single-item Queue patch. This seems to behave a bit more reliably.

PreviewAttachmentSize
Grid_Warp-nospooky.qtz75.68 KB

.lov.'s picture
Re: Grid Warp - looking for a better solution

Thanks a lot, it's really a better solution then mine ;)

.lov.'s picture
Re: Grid Warp - looking for a better solution

Anyway, what is the /Console patch in the composition? I never seen this patch before.

jersmi's picture
Re: Grid Warp - looking for a better solution

Very informative.

In an attempt to make the mouse more responsive, I removed it from the Iterator. Now the qtz won't open, crashes QC. Attached qtz and crash report, not sure why...

PreviewAttachmentSize
grid_warp__crash.rtf85.92 KB
Grid_Warp-nospooky_crasher.qtz76.66 KB

.lov.'s picture
Re: Grid Warp - looking for a better solution

No crash for me, works great. 10.6.3, MacMini with Nvidia 9400M.

cybero's picture
Re: Grid Warp - looking for a better solution

actually works for me - 10.6.3 iMac 9400

jersmi's picture
Re: Grid Warp - looking for a better solution

you mean the qtz i posted works fine?

.lov.'s picture
Re: Grid Warp - looking for a better solution

exactly.

jersmi's picture
Re: Grid Warp - looking for a better solution

.lov. wrote:
Anyway, what is the /Console patch in the composition? I never seen this patch before.
Re: crashes: I created a macro of this patch as a note to self to see if I could somehow view its contents -- QC did not like this! Removed it from patches folder and QC is fine again.

smokris's picture
Re: Grid Warp - looking for a better solution

It looks like you inadvertently created a self-referencing virtual macro. QC fails to detect this recursion and spirals out of control.

@cwright, should we file radars on this, or is it already sufficiently documented?

smokris's picture
Re: Grid Warp - looking for a better solution

Oops. /Console is part of a debug-log system I'm working on; I forgot to remove one instance of it. It depends on a forthcoming plugin, so it's not too useful just yet.

cwright's picture
Re: Grid Warp - looking for a better solution

(is there a way to get emails of @cwright's ? that'd be rad :)

Anyway: self-referencing VMs (and VM cycles) are well-known. I'd say more, but my personal opinion wouldn't speak favorably of the situation :/

But if you've got some elegant ideas on how to address it without breaking backward compatibility, I'm all ears :)

jersmi's picture
Re: Grid Warp - looking for a better solution

Thanks for the response on the endless loop that killed QC -- my curious ways got the better of me that time... no harm done, and learned a little along the way. :)

Markell's picture
Re: Grid Warp - looking for a better solution

Great work! ...but what am I doing wrong? I can't save the deformed grid after warping. I'm sure there is a way to save it for later. Can anyone explain me how? thx.

cybero's picture
Re: Grid Warp - looking for a better solution

Which one of the posted versions on this thread are you using Markell ?

In any case, you won't be able to save the deformed grid unless you also concurrently feed the mouse positions into a Value Historian , record these and then play them back, which I believe would give you pretty much exactly what you are seeking in functionality.

You could save all of your different warps to file and load them from file then , couldn't you :-) ?

Markell's picture
Re: Grid Warp - looking for a better solution

Thx cybero, but i can't really do it. I'm using the "nospooky" grid warp file. I've put the VH btw Mouse and Grid Generator patch (it might be wrong though - see pict) but I'm actually having problem on recording/playingback with the VH. I don't understand how to do it. I though it would have been easier to move the mesh, save and recall it later, but i might not be good enough. I would greatly appreciate any step by step help. Thank you!

PreviewAttachmentSize
Screen shot 2010-11-18 at 20.35.46.png
Screen shot 2010-11-18 at 20.35.46.png128.26 KB

639me's picture
Re: Grid Warp - looking for a better solution

i got no problems using this either, - mbp 2.6, 10.6.5, - BUT i have problems hitting the correct warp points. if there are more than 10 x 10 points, clicking one one intersection of lines selects the one avove and to the right of that one. any ideas on that?

jersmi's picture
Re: Grid Warp - looking for a better solution

i love this comp but the non-spooky version with the value historian crashes consistently for me. the value historian's ins/out all turn to "reset" (booleans?) then it crashes when i hook any outs to input splitters going to the grid patch.

besides that, Markell, I relate to the non-intuitve nature of the value historian. perhaps it is programmer friendly. you could do a search for another thread in which George Toledo gives some helpful details.

at any rate, try setting up the VH by exposing the timebase to external, then using an interpolation patch to drive it. in another comp i successfully used a stop watch, toggle (and logic "not" from toggle to stop watch stop and reset) to start/stop with the keyboard, but in this comp the whole setup crashes before i can do anything, so i don't quite know yet what's going to work. i like the idea of pulsing the record and having a bunch of one sample warp settings, but i haven't got there yet. also with the value historian i think george recommended turning off the viewer then turning it on then recording with the historian. good luck.

attached are a text file of the crash and the comp i'm playing with that is not working with the value historian.

PreviewAttachmentSize
Grid_Warp-nospooky_VHcrash.qtz95.8 KB
gridwarp_crash.rtf3.12 KB

jersmi's picture
Re: Grid Warp - looking for a better solution

I called it a crash but it is actually an "Array beyond bounds" exception. Pic attached. What does this mean? Anything to do with the value historian turning ins/outs to "resets"?

PreviewAttachmentSize
Screen shot 2010-11-26 at 2.00.49 PM.png
Screen shot 2010-11-26 at 2.00.49 PM.png69.3 KB