Bezier Iterate (Composition by gtoledo3)

Author: gtoledo3
License: MIT
Date: 2012.05.20
Compatibility: 10.6
Categories:
Required plugins:
(none)

This composition uses Kineme2D's Bezier Path With Curve and the Grid With Bezier Path. It iterates the Bezier Path With Curve in a way that allows you to subdivide a grid by multiple beziers, and warp along the path.

(This seems to expose a slight counter-intuitive or wrong aspect of Grid With Bezier Path - as the grid is composed of more beziers, UV's shift some. In practice, this isn't a big deal, because the texture scale can be adjusted with Image Texturing Properties.)

This will need Kineme2D and Data Tools. Syphon Server is incidental, but that will be needed to for the composition to fully restore.

Tested in 10.6.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

jersmi's picture
Re: Bezier Iterate (Composition by gtoledo3)

Black screen, 10.7.4. Looks interesting....

volkerk's picture
Re: Bezier Iterate (Composition by gtoledo3)

Looks interesting, but not working. I get quite a few error messages and warning (10.6.8)

Unregistered patch warning: KinemeGLGridRendererPatch at "Macro Patch/Kineme GL Grid Renderer" [KinemeGLGridRendererPatch_1]

patch was not restored successfully errors:

: There is already a node registered with name "StructureMaker:KinemeStructureMaker"

(null) QCPlugIn: Cannot preflight plug-in at path "/Volumes/Data/Users/z3050550/Library/Graphics/Quartz Composer Plug-Ins/_1024_BOX2D 1.1.plugin" (Error Domain=NSCocoaErrorDomain Code=3585 UserInfo=0x100298980 "The bundle “_1024_BOX2D” couldn’t be loaded because it doesn’t contain a version for the current architecture." (dlopen_preflight(/Volumes/Data/Users/z3050550/Library/Graphics/Quartz Composer Plug-Ins/_1024_BOX2D 1.1.plugin/Contents/MacOS/_1024_BOX2D): no suitable image found. Did find: /Volumes/Data/Users/z3050550/Library/Graphics/Quartz Composer Plug-Ins/_1024_BOX2D 1.1.plugin/Contents/MacOS/_1024_BOX2D: mach-o, but wrong architecture))

(null) QCPlugIn: Bundle at path "/Volumes/Data/Users/z3050550/Library/Graphics/Quartz Composer Plug-Ins/AdjustmentsPlugin.plugin" is not a valid Quartz Composer plug-in

(null) QCPlugIn: Cannot preflight plug-in at path "/Volumes/Data/Users/z3050550/Library/Graphics/Quartz Composer Plug-Ins/ImageWriter.plugin" (Error Domain=NSCocoaErrorDomain Code=3585 UserInfo=0x10029e720 "The bundle “ImageWriter” couldn’t be loaded because it doesn’t contain a version for the current architecture." (dlopen_preflight(/Volumes/Data/Users/z3050550/Library/Graphics/Quartz Composer Plug-Ins/ImageWriter.plugin/Contents/MacOS/ImageWriter): no suitable image found. Did find: /Volumes/Data/Users/z3050550/Library/Graphics/Quartz Composer Plug-Ins/ImageWriter.plugin/Contents/MacOS/ImageWriter: mach-o, but wrong architecture))

(null) QCPlugIn: Cannot preflight plug-in at path "/Volumes/Data/Users/z3050550/Library/Graphics/Quartz Composer Plug-Ins/Noise Industries Patches.plugin" (Error Domain=NSCocoaErrorDomain Code=3587 UserInfo=0x1002a84d0 "The bundle “Noise Industries Patches” couldn’t be loaded because it is damaged or missing necessary resources." (dlopen_preflight(/Volumes/Data/Users/z3050550/Library/Graphics/Quartz Composer Plug-Ins/Noise Industries Patches.plugin/Contents/MacOS/Noise Industries Patches): Library not loaded: /Library/Frameworks/NIKit.framework/Versions/A/NIKit Referenced from: /Volumes/Data/Users/z3050550/Library/Graphics/Quartz Composer Plug-Ins/Noise Industries Patches.plugin/Contents/MacOS/Noise Industries Patches Reason: image not found))

(null) QCPlugIn: Cannot preflight plug-in at path "/Volumes/Data/Users/z3050550/Library/Graphics/Quartz Composer Plug-Ins/v002 RTFD.plugin" (Error Domain=NSCocoaErrorDomain Code=4 UserInfo=0x1002be420 "The bundle “v002 RTFD” couldn’t be loaded because its executable couldn’t be located.")

(null) : Patch with name "K2DGridPatch" is missing

Macro Patch Cannot create node of class "K2DGridPatch" and identifier "(null)"

(null) : Patch with name "K2DBezierPathWithCurvePatch" is missing

Iterator Cannot create node of class "K2DBezierPathWithCurvePatch" and identifier "(null)"

(null) : Patch with name "K2DLineStructurePatch" is missing

Iterator Cannot create node of class "K2DLineStructurePatch" and identifier "(null)"

Iterator Cannot create connection from ["outputYDrag" @ "MouseInteraction_3"] to ["inputFromControlPointY" @ "K2DBezierPathWithCurvePatch_1"]

Iterator Cannot create connection from ["outputBezierPath" @ "K2DBezierPathWithCurvePatch_1"] to ["inputValue" @ "Queue_1"]

Iterator Cannot create connection from ["outputXDrag" @ "MouseInteraction_4"] to ["inputToControlPointX" @ "K2DBezierPathWithCurvePatch_1"]

Iterator Cannot create connection from ["outputXDrag" @ "MouseInteraction_2"] to ["inputToPointX" @ "K2DBezierPathWithCurvePatch_1"]

Iterator Cannot create connection from ["outputXDrag" @ "MouseInteraction_3"] to ["inputFromControlPointX" @ "K2DBezierPathWithCurvePatch_1"]

Iterator Cannot create connection from ["outputBezierPath" @ "K2DBezierPathWithCurvePatch_1"] to ["inputBezierPath" @ "K2DLineStructurePatch_1"]

Iterator Cannot create connection from ["outputYDrag" @ "MouseInteraction_1"] to ["inputFromPointY" @ "K2DBezierPathWithCurvePatch_1"]

Iterator Cannot create connection from ["outputXDrag" @ "MouseInteraction_1"] to ["inputFromPointX" @ "K2DBezierPathWithCurvePatch_1"]

Iterator Cannot create connection from ["outputYDrag" @ "MouseInteraction_4"] to ["inputToControlPointY" @ "K2DBezierPathWithCurvePatch_1"]

Iterator Cannot create connection from ["outputYDrag" @ "MouseInteraction_2"] to ["inputToPointY" @ "K2DBezierPathWithCurvePatch_1"]

Iterator Cannot create connection from ["outputLines" @ "K2DLineStructurePatch_1"] to ["inputLines" @ "KinemeGLLineStructurePatch_1"]

Iterator Cannot publish input port ["inputFlatness" @ "K2DLineStructurePatch_1"]

Macro Patch State restoration failed on node "Iterator_1"

(null) : Patch with name "QCPlugInPatch:SyphonServerQCPlugIn" is missing

Macro Patch Cannot create node of class "QCPlugInPatch" and identifier "SyphonServerQCPlugIn"

Macro Patch Cannot create connection from ["outputGrid" @ "K2DGridPatch_1"] to ["inputStructure" @ "KinemeGLGridRendererPatch_1"]

Macro Patch Cannot create connection from ["outputOutput" @ "SpookyReceivePatch_1"] to ["inputBezierPaths" @ "K2DGridPatch_1"]

Macro Patch Cannot publish input port ["Flatness" @ "Iterator_1"]

Macro Patch Cannot publish input port ["inputWidth" @ "K2DGridPatch_1"]

Macro Patch Cannot publish input port ["inputFlatness" @ "K2DGridPatch_1"]

Macro Patch Cannot publish input port ["_enable" @ "PlugInPatch_SyphonServerQCPlugIn_1"]

Macro Patch Cannot publish input port ["inputServerID" @ "PlugInPatch_SyphonServerQCPlugIn_1"]

(null) State restoration failed on

gtoledo3's picture
Re: Bezier Iterate (Composition by gtoledo3)

As in the description, it uses K2D.

"(null) : Patch with name "K2DGridPatch" is missing "

It looks like it isn't installed.

If demo has run out, it will probably show a blank output, if it's not present at all there will be warnings like this.

You may also have Structure Tools and Data Tools double installed (structure tools is now part of Data Tools), but I'm unsure b/c the whole error message isn't here.

gtoledo3's picture
Re: Bezier Iterate (Composition by gtoledo3)

If you have k2D installed, and you see a blank output on the grid, try toggling the Image Texturing Properties patch Target value.

jersmi's picture
Re: Bezier Iterate (Composition by gtoledo3)

Still black after messing with texturing properties. All the Interaction patches inside the Iterator are sending inf values to Sprite X/Y Positions. Clue?

PreviewAttachmentSize
Screen Shot 2012-05-21 at 5.17.50 PM.png
Screen Shot 2012-05-21 at 5.17.50 PM.png8.2 KB

itsthejayj's picture
Re: Bezier Iterate (Composition by gtoledo3)

Ditto on the iteration patch bug! :(

Enjoyed that video tho george looks like an excellent composition. + The last frame of the video is a classic still ;)

gtoledo3's picture
Re: Bezier Iterate (Composition by gtoledo3)

Hmm, not much of a clue.

My Lion QC use pretty much consists of testing compiled apps to make sure they run how I expect, and some casual shader work. The stock editor has some issues (that I hoped were going to be fixed before now), as does some AppKit and OS X stuff in general (it's just a hog compared to older OS versions), and I'm not a big fan of Xcode 4... that leaves me pretty much only working in 10.7 when I have to and for test runs. That's why I only checked off 10.6 on the upload form :-)

My comment about the Image Texturing Properties was b/c a friend told me he had downloaded it, and that he had to flip that setting. Come to think of it, he's probably using 10.6 though.

I'll check it out in Lion next time I'm using it.

I'd guess that it's either that Interaction has broken in some update, that the Spooky out of an Iterator isn't working, or that something is broken or changed with the QC evaluation chain that makes something think some patch doesn't need to run. This could pretty easily be re-jiggered to not need the Spooky if it winds up being that. Doesn't quite sound right though.

gtoledo3's picture
Re: Bezier Iterate (Composition by gtoledo3)

I took a look at this...

I accidentally booted onto a Mountain Lion preview partition, and was spending a couple of minutes wondering why the hell Data Tools wasn't loading, and then remember that the build settings mark it with a maximum setting of 10.7. After some twiddling, since I was already there, I got it working. So... whatever that counts for, works in ML (10.8) Preview with some tweaking of Data Tools.

Then I booted into Lion.

After watching the fun window animation glitches as all the windows from my last session tried to restore itself, and then waiting 30 seconds while Safari beach balled while trying to download this qtz, and reminding me about how this OS is so bloated it can't run on some machines that are 3 years old...

I opened up qtz and saw the same "inf" output you all are complaining about.

I made a simple comp with interaction and a sprite. Worked fine.

I made another composition with a sprite, iterator vars, iterator, and an interpolate, spreading the iterated sprite out in X for 10 iterations. The result yielded one iteration and hosed out for the others, with the Interaction giving incorrect output values - each iteration gave a 1 values. So, different than the "inf" yielding test case, but similar in giving the same value for each iteration. It actually doesn't seem to be evaluating per iteration, either b/c of a problem with it or the iterator.

The right values are coming from the iterator variables, and into the Interaction patches Offset input, it's just not doing the right thing internally/yielding correct output inside of an Iterator. I'm not sure if it's worse or not, but the Sprites are actually trying to do something with the inf output in the case of the bezier comp.

Making a given patch work inside of an iterator isn't too hard, but the Interaction patch itself is complex and maybe even a little hacky. If it's the iterator... that kinda went subtly whacky after 10.5 too with it's vaunted "c-backed" design, and I'm not sure how solid it really is. It did work, so it's probably fixable, but I wouldn't be counting on a quick fix from Apple unless it's by a stroke of luck.

gtoledo3's picture
Re: Bezier Iterate (Composition by gtoledo3)

Tried it with the QCEditCompositions editor... screwed up there too in Lion. Probably a framework/patch bug.

jrs's picture
Re: Bezier Iterate (Composition by gtoledo3)

I got rid of all of the errors bar

KinemeGLGridRendererPatch at "Macro Patch/Kineme GL Grid Renderer" [KinemeGLGridRendererPatch_1]

I'm pretty sure I have the most recent version of the kinemegl tools - if I click on "GLTools.plugin" in finder it tells me the version is 1.6

but the error hints that this is a macro patch - I had a search of kineme for it but can't find it - any idea where I can get a copy?


Ok scratch that I didn't read the error properly - I seem to have the macro its just an unregistered warning, but I also get a blank screen apart from the "Arrow keys for bezier count" message - I'm also on lion

Cheers James

gtoledo3's picture
Re: Bezier Iterate (Composition by gtoledo3)

I can't see the whole error there, but that patch is in 1.6, which I used. It may be possible that somewhere it's saying that some connection to that patch broke, not that the patch didn't restore. Not sure. The fact it lists "macro patch" makes me think a cable is coming from a macro (like the iterator), and breaking for some reason at the grid renderer. This is a little different from errors other people have listed, and I can't reproduce it.

Sorry for all of the woes.

To the best of my ability to judge, it looks like Interaction patch broke in the very most recent Lion update, and that is what causes the non-functionality for most users in 10.7.

I've tested it on 10.6 - works. A co-worker and friend tested it on 10.6, he had to fiddle with the texture destination setting, then worked fine.

10.7.... doesn't seem to work for anyone because of the "inf" values from the Interaction patch. Other Interaction patch based qtz's seem to be failing in different scenarios besides this qtz.

I thought I'd tested it in 10.7.2 or 10.7.3, and it was working. I've had it around since k2D release, and hadn't checked it since. For those who have k2D installed and want something similar, it may be interesting to look at the waving flag composition, because it is somewhat similar as far as beziers dictating the grid and allowing warp.... it's just not "dynamic" or interaction based (to be able to grab stuff and warp with mouse or trackpad). Don't let the whackiness of the interaction patch shy you away from k2D. I pushed pretty hard for this bezier path-> grid function, as well as SVG, and 2D morphing. It has great hit testing, and the text to structure functions are awesome... it's just a great patch, every bit as deserving as K3D has been of it's accolades.

colinyell's picture
Re: Bezier Iterate (Composition by gtoledo3)

Its a great comp, exactly what I have been looking for for a while for projecting onto curved screens. I came across it last night on my laptop, running 10.6 and then tried it on my work computer, 10.7.4 today and of course I'm getting all of the errors above.

Where would I find the flag waving comp that you mention? I'm really up for getting a Lion suitable solution.

Is it possible in your opinion to do away with the iterator completely and have six rows of sprites in a macro that can control the grid for editing and then switch of the macro when plying a video through the patch?

gtoledo3's picture
Re: Bezier Iterate (Composition by gtoledo3)

http://kineme.net/product/Kineme2D

...and click the "compositions" link. It's called "Kineme-2D grid.qtz"/

Quote:
Is it possible in your opinion to do away with the iterator completely and have six rows of sprites in a macro that can control the grid for editing and then switch of the macro when plying a video through the patch?

That's what the composition I'm referring to basically does. It uses multiple Vector with Curve patches, that are "joined" with some javascript, and then go to the grid for rendering. Hope it works out for you! :-)

The thing that was kind of cool about the iteration is that it allowed someone to not have to do add the Vector with Curve patches manually to get more subdivisions, and the Interaction let someone tug around on it. Those were just convenience things, but it's still too bad they're broken in 10.7.

colinyell's picture
Re: Bezier Iterate (Composition by gtoledo3)

Thanks for that george, just what I was looking for.

Just a thought is it possible to add vertical lines to warp the grid the same amount as is done horizontally?

gtoledo3's picture
Re: Bezier Iterate (Composition by gtoledo3)

Off the top of my head, I can't think of a way... the "grid with vector" patch expects the grid to be built up horizontally.

The grid renderer patch could be given a structure from javascript (without the grid with vector patches). Maybe you could use one of the kineme gl tools grid generating patches. One of those patches allows you to move a given index around, then switch to the next, etc... it won't warp the grid in a curve for you, but you can still get pretty intricate warps.