skanky

QCMeshTools.plugin/QCMeshValidate

gtoledo3's picture

Super simple plugin patch, don't let the main name fool you. Returns a 1 if a valid QCMesh is attached to the input port, a 0 other wise.

http://www.georgetoledo.com/2011/03/qcmeshtoolsqcmeshvalidate.html

It was mainly a test of how to use a QCMesh input to "do stuff", and this seemed like a good square one.

GTTextureTransform ("skanky" sdk patch): Release

gtoledo3's picture

http://www.georgetoledo.com/2011/03/gttexturetransform.html

This is skanky Quartz Composer plugin, environment macro, that transforms the GL Texture matrix.

GTTextureTransform from George Toledo on Vimeo.

...so, this means that in this environment you can do things like zoom, offset, or rotate texture through OpenGL function.

For example, one can rotate the texture on a sphere while keeping vertex positions the same, or one can zoom image on a sprite without using core image, etc.

un official properties

dust's picture

so i was asked to make my apple script plugin unsafe. so i decided to delve into the un official sdk.

there are a lot of goodies in there. all kinds of things that i have been thinking of trying to do but do not know how officially.

so my question is directed here as there is no documentation. no worries this is something very simple.. i'm sure.

my plugin has one input a string. it is literally 2 lines of code.

they are.....

NSAppleScript *scriptObject = [[NSAppleScript alloc] initWithSource:(NSString*)inputScript];
   [scriptObject executeAndReturnError:nil];

where inputString is my QCStringPort variable.

i get no compilation errors but QC does spit out this.

-[QCStringPort copyWithZone:]: unrecognized selector sent to instance 0x119f7e0e0

im a bit unclear as to whats going on i'm assuming QCStringPort implements NSCopy. QCPort has a method...

+(id)allocWithZone(NSZone*)fp8 

so usually when i get this type of error i have forgot to to set my properties correctly. in this case i have tried the official way.

@property(assign)NSString* inputFoo;

in addition i have tried...

@property(copy)NSString* inputFoo;
@property(nonatomic, retain)NSString* inputFoo;
etc....

also i have tried to allocate memory directly to the QCStringPort class.

inputScript = [[QCStringPort alloc]init];
[inputSript allocWithZone(NSZone*)QCStringPort];

i am able to print the input to the log which makes no since.

does anybody have any experience with using the un official sdk ?

iDVDQCPatches

gtoledo3's picture

For reference of what I'm talking about, there is a quirky, not really that useful patch inside of iMovie, that works in QC when loaded in the patches folder, called iDVDQCPatches.

Does anyone know if there is a 64 bit version of this in the newer iMovie, or is it still 32-bit, or if it will load in SL if QC's running 64 bit. Even further, if anyone can toss the new version my way it would be awesome (gtoledo3@gmail.com).

Just something I'm curious about, not any kind of urgent matter.

Quartz Composer Snow Leopard - New Patches and Features

gtoledo3's picture

There are some pretty cool things in the new edition of QC Snow Leopard, notwithstanding any glitches. Leopard had those too (well, some never DID get fixed).

Here are some things I've noted:

-The Shadow feature on the lighting patch, is a way of doing some dynamic shadows with your lighting. The default color value seems a little heavy to me for most purposes. Backing the alpha value off to taste is a good way of taming this.

There's also a quality control! A setting of "1" will give a nice smooth edge, and decreasing that value will seem to cause the edge to get jagged, like there's an increasing amount of aliasing going on.

When I decrease the quality on the Intel X3100, I see decent gain in fps. On the NVIDIA 9600, not at all.

The shadow patch doesn't work with iterators, and toggling it back and forth can do something to "lock" the state of the Lighting environment, which can affect flat/smooth shading. While this is one of my TOP Quartz Composer feature requests, it's also to be used cautiously.

-DAE/Collada loading. The thing that's fairly handy about this is the way that all of the associated textures get loaded.

Instead of manipulating parts of the DAE with structure patches, we have "Get Mesh Texture" and "Get Mesh Component" as well as "Set Mesh Texture" and "Set Mesh Component". The texture patches are for manipulating the associated texture/image files... allowing you to "break off" the textures, do what you will, and re"set" the texture, or the component. A "component" is one part of the structure or a complex 3D object; this is familiar to anyone who has used Kineme3D.

The DAE models can be dragged onto the editor, which is slick, and familiar to Kineme3D users.

The 3D dae/collada models need to be rendered with a "mesh renderer". So the chain needed is something like mesh->mesh renderer, or mesh->mesh filter ->mesh renderer.

The mesh filters live in the patch list as repository compositions/ "qtz" patches, so each actually has an extensive underbelly that can be investigated, which aren't exposed by looking at the patch right off the bat.

Some of them are colored like providers (assuming that green=black), but some are actually externally driven by default, and hence, are purple (old blue=purple now)! To wit, look at Mesh Jiggle and see the way it interplays with the mouse.

It's worth noting now that when you make a macro, you can control+click, and get an option for "explode macro". THIS is awesome. I would love to see this type of feature become available with these type of virtual qtz patches that are leaned on very heavily in this OS.

-Other mesh stuff: To create meshes you use the... ta da(!)... Mesh Creator! It needs vertices... and you can also pipe it normals, colors, textures, texture coordinates, and colors.

You can feed it with Javascript or OpenCL. THAT is actually pretty cool.. and the mesh utilities actually make use of it as well.

For a good take on powering it with javascript, "Mouse Trails.qtz" is a good one, and it's linked to inside the actual patch list under mesh creator. That one might look familiar to anyone that's paid attention to the travails of tobyspark.

For a less obvious one that uses OpenCL to generate the mesh, go to the Developer folder and look in Library/Quartz Composer/Examples/Patches, and take a gander at "Grid.qtz" and "Quad.qtz". "N-body.qtz" is a more intense, but similar setup in some ways, that shows how to derive a particle system, and how to use a mesh creator/queue with iteration.

-Feedback patch. This is an interesting one. All of the qtz's that have "Inertia" in the title and that are in the same Patches folder, are really good examples of this one in action, as well as the 2D Fluid Simulation, which is in the System/Library/Graphics/Quartz Composer Patches (qtz's that Quartz Composer hinges upon are now loosely strung throughout the OS, so think wisely before editing or accidentally saving over one that QC needs).

Now, don't confuse this with "video feedback"... which is just a classic video/accumulator qtz setup hiding in the patch list, and which doesn't incorporate any new patches (this one actually reminded me of smokris's GL Spline example with a video input plugged in, instead of splines).

-The Interaction patch, and it's weird "outie" port and blue noodle. The Iteration Counter and Iterator Selection qtz's show this one in action.

-This brings up one of the BIG changes in QC. Now we don't have "just" enable ports on Render patches. We have "interaction" ports up above them!

This one strikes me as odd, and the ramifications of it aren't totally obvious yet, as far as how it affects the scene graph.

-Deleting or Cutting a renderer patch doesn't "kill" it in the Viewer. It stays active until you restart the viewer, or do something else. This may be a "feature" to help performance. I find it to be a bug, because it necessitates that one do an extra step to get the Viewer to reflect the ACTUAL state of the editor. This feels like it may be considered a feature (though I think it's a horrible idea).

-Multisampling in the Viewer. This one is cool, and looks like it works on the GPU. Option+Preferences, and there it is in the Editor settings. Check it "ON", do a restart of QC, and there you are... jagged edges somewhat mitigated, if it's on supported on your GPU. It doesn't smooth things out 100% but it's better than nothing, and adds a more professional look to the real-time visual output.

-The opening Template.

This one is actually amazing.... look inside of QC and take a gander at the qtz that powers it. This is a really well done qtz. At the same time, it removes the dynamic template loading, so as much as the engineering of it is beautiful and well done, it reduces function in some ways, while providing some good documentation that wasn't formerly included in the Template choice screen. It's as if this has been made a kind of qtz based brochure of function and documentation.

-... and if you unhide patches, our old friend CISmallGaussianBlur, the dead patch entry is still there! We would have missed you buddy!

-The "mystery" qtz's that wouldn't restore in the old system and that were leveraged in some apps, appear to now be in the System/Library/Compositions in some cases.

-Apple is using the Skanky SDK...maybe :) They are now loading (this pertains to the mystery qtz's working) the Backdrops.plugin and ImageDifferPatch.plugin... from the Quartz Composer Patches folder. So, now we are given GFPlugin(s) from Apple, officially. One thing that's of note is the "GFPluginExclusiveHosts", which is used in the Backdrops.plugin

So, those are some of my thoughts at the moment, and looking towards the silver linings. I've noted a decent amount of other features and/or issues, but this is about all I have in me for this post :)