Kineme Plugin Branding

toneburst's picture

Have you guys thought about doing something like this for your plugins?

The big logo is even animated (I guess it's actually an embedded QTZ).

a|x http://machinesdontcare.wordpress.com

Comment viewing options

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

cwright's picture
yes

we thought about it for maybe 4 seconds. Then we decided we should get back to making plugins and tools :)

(at one time, we considered rewriting the Patch renderer in the editor, so our patches would look different in the editor... we decided against that too....)

toneburst's picture
Good Thought

..this is the kind of thing I think of to distract myself from the the business of actually learning to program myself... ;)

Bells and whistles aside, though, the button linking to online documentation for the plugin is potentially useful, I think.

alx

Quartz Composer Blog: http://machinesdontcare.wordpress.com

Music Site: http://www.toneburst.net

cwright's picture
good point

Didn't really notice the online doc link. That's actually a really good idea. I'll have to think about that...

But for the over-the-top coverflow animation... shrugs no hurry :)

tobyspark's picture
cheese

i can't deny i love seeing my logo in the settings panel, but heck i when i saw that the first time i thought gratuitous cheese. it distracts, and thats a bad thing.

toneburst's picture
Animation No

..docs link a maybe though, then. It probably is a distraction, but I've been bothering David at Vidvox for a way to add a logo background pic to VDMX qcFX for a while. I know I'm not getting any money out of this at the moment, but if there's the slightest chance I may be able to make a living out of this kind of thing at some point in the future, it seems like a good plan to logo-ify things a little (though maybe a tad more subtly than Boinx there).

May seem mercenary, but there it is...

alx

Quartz Composer Blog: http://machinesdontcare.wordpress.com

Music Site: http://www.toneburst.net

psonice's picture
Branding

My thoughts on this: "Cool!... But a bit pointless... Damnit, give me my hurtz back, I'm trying to performance tune my stuff here!"

I've no problem with some branding though, as long as it's not intrusive or consuming any of that precious power, so an image or something would be fine. A link to the site here would actually be a good idea, and so would another link to the appropriate wiki page, release notes, docs or whatever.

There's another issue here though, and that's identifying plugins. It's too easy to make a composition, forget that you used plugins, and fire it off somewhere expecting it to work. Is there a quick way of checking if you've used any, and which ones?

cwright's picture
CompoTool

Short Answer: there's no easy way of spotting plugin-using compositions just yet (other than QuickLook barfing on them, which is my cheap personal litmus test).

Long Answer: we've been kicking around some ideas for a meta-composition tool to do boring/tedious things with compositions (a bulk flattener, a mass macro replacer, etc), and spotting non-core patches would be a relatively easy addition onto it. Finding out which plugins is a bit trickier, but still likely possible. And, if you'd like, it would also be possible to bundle in used plugins, the composition, and some glue code to make a fat-binary composition player that'd work with plugins etc (as a standalone app).

I agree with the links bit -- I'll work on adding those to the template for our future releases :)

psonice's picture
something is better than nothing

At least knowing that there is a plugin involved is definitely way better than needing to look through a big composition only to find out that there isn't :D

One other thing springs to mind though.. how much of an improvement (if any) would an 'iterator flattener' be? I.e. something like a loop unroller for iterators, that replaces the iterator with x copies of the iterator's internals. It'd only work for iterators with fixed iteration counts of course.

The question is whether having say 10,000 extra patches would be an improvement on having 1,000 iterations... Any volunteers want to try it out by hand to find out? :)

cwright's picture
unroller

I never considered iteration unrolling before, but that's an interesting idea.

I saw one composition from alx where he had replaced a 64-iteration iterator with 64 manual patches, and the performance was significantly better. Not sure how all that scales (iterator seems pretty hit-and-miss for performance), but it's definitely something to consider.

now .... how to lay them out in the editor -- 10000 patches all on top of each other would be infuriating :)

toneburst's picture
Iterator Schmiterator

Yeah, performance was massively better without the Iterator. I'm working on a variation on that one at the moment, as it happens. This one has 128 individual macros. I've worked out a little JS patch that emulates the Iterator Variables patch, and used a single control struct for all the controls that need to be passed in to each macro. Combine this with wireless Spooky receive for the struct, and I don't have to do any wiring at all to each macro. The only annoying thing is that I have to set an individual ID number for each one- which takes a while, with 128 of the buggers....

alx

Quartz Composer Blog: http://machinesdontcare.wordpress.com

Music Site: http://www.toneburst.net

tobyspark's picture
nice. perhaps we should collaborate on this one...

this sounds like an ideal candidate for some cocoa goodness. if we're talking performance, then having 128 javascript patches can't be so good!

might even be possible to roll it into a spookyesque receiver. i've already used external (ie global) variables in my kinetxt controller, and i'm fairly sure thats how spooky send and receive works... we'll see, and first things first.

toneburst's picture
I don't think the JavaScript

I don't think the JavaScript is slowing things down much, to be honest. Admittedly, there are 128 patches, but each on is verrry simple:

function (__number Current_Index, __number Current_Position, __number Iterations) main (__number Iteration_Count, __number ID, __number Dummy) { var result = new Object(); result.Current_Index = ID; result.Current_Position = ID*(1/Iteration_Count); result.Iterations = Iteration_Count; return result; }

Actually, it's not really needed at all, since I only use the Current_Position output. I could pass in 1/Iteration count in the control struct, then just multiply that by the ID# for each macro. What I'd really like is a way to get the layer no. for each macro, so I don't have to set each individually.

If you're interested, the QTZ I'm talking about is here http://kineme.net/Applications/Compositions/SuperformulaPseudoSpreadsNoL...

I'm hoping that the SuperGLSLGrid is going to be one of the first candidates for VVVV-style spreads functionality, if Christopher ever has time for that one.

That's ultimately the solution to this problem, but creates a new problem, namely, how to create the structure with the spreads values. It could all be done with JS, but I suspect that's where JavaScript slowness would really start to bite. I have a feeling most of the basic VVVV spreads generators wouldn't be too challenging to emulate in a Cocoa QC plugin. I'm thinking initially

Random Spread Circular Spread Spherical Spread Guaussian Spread and a Spread Morph

What do you think?

alx

Quartz Composer Blog: http://machinesdontcare.wordpress.com

Music Site: http://www.toneburst.net

tobyspark's picture
i think...

...you should come round one evening and we can have a crack at all this.

email me and we can try sort a date if you like.

toby

psonice's picture
Strange iterator speedup!

I've just been messing with something that involves a really nasty iterator (no. of iterations varies frame to frame, and is typically 10-15k iterations!). Performance was about what you'd expect - 0.3fps, and horrible slowdown for the whole of QC so editing any parameters while it's running is near impossible. I mean there's literally a 3 second delay between clicking on something and anything happening. Perhaps this is what yanomano meant by spaghetti slowdown?

Anyway, I need image output from this, so I put the whole iterator inside a render in image. Instant speedboost! The composition is reporting 60fps, but the iterator is clearly running much slower, but I'd say probably 1fps. That's a 3x speed up. And the QC interface is now running normally, so I can edit it while it's running.

Anyone have a clue as to why this might be?

edit It gets better :D Before, I had:

1 iterator, doing say ~12,000 iterations. Each iteration drew one cube directly to screen. It ran at 0.33fps.

Now I have:

2 iterators doing ~12,000 iterations each. Each iteration now draws a sphere, so more polygons etc. Each one is inside a render in image patch, one doing 16bit rendering, the other 8bit. It runs at ~1fps - 3x faster and much more work!

tobyspark's picture
WTF

the iterator truly is its own beast. what i'd do for the simple, efficient, transparent behaviour you'd expect.

psonice's picture
You know you like it!

What would QC be without all these crazy little challenges to figure out before your composition works properly? :D ...ok, yeah, a more productive application.

A quick video of the iterator-crushing composition, if anyone is interested:

It's rendering a video point cloud, that's part of radiohead's music video (see http://code.google.com/creative/radiohead/ for more info - they've released the source material under creative commons.) The glitching is their data, nor my rendering (although I wish it was part of my stuff, can't beat a decent glitch or two!)

cwright's picture
I - Hate - You </sarcasm>

Just Yesterday, smokris and I were discussing doing This Exact Same Thing! figures, the demoscene hackers would beat us to the punch... ;)

cwright's picture
opacity

When working on the super-iterator patch, I sort of found out why this is so wonky:

QC's graph eval mechanism is pretty efficient, and it's geared to no re-evaluate stuff multiple times, even across frames, if it's not necessary. However, and iterator breaks this paradigm a bit. The QC graph by default doesn't handle it correctly (i.e. calling executeSubPatches: in a macro patch multiple times does not actually execute your subpatches after the first call). So to make it work, the iterator patch has to hack the QC graph between each iteration to make it evaluate again. This seems to be an expensive operation, and possibly based on the number and type of subpatches inside -- this needs more testing to confirm it, but that's my somewhat educated guess.

On that note, spreads will be the simple, efficient, transparent functionality that everyone's been dreaming of. No QC Graph hacking (and thus no speed hit) required ;)

psonice's picture
re. opacity

I thought GL state switching was largely to blame? Or is it both? Any way to speed the iterator up is pretty invaluable at the moment. Speaking of which, my offer to test the spreads plugin is still open :D

cwright's picture
state switch

initially I thought that as well, but it doesn't seem to be the case for this simple reason: a 1000 iteration sphere has the same number of GL state swizzles as 1000 sphere patches -- there's no magical GL code in the iterator, and no code in the patches that makes them do things differently if they're inside an iterator (Iterator Variables excluded).

So GL state swizzling overhead will be constant in those cases (and slightly reduced in spreads!), but graph hackery is radically different (none vs. a thousand traversals or whatever the iterator is doing, exactly).

you can alpha-test when we have something working reliably :) a few larger projects are consuming all our time at the moment, but don't worry, spreads are on the schedule for late this month/all next month :)

psonice's picture
It's an easy life when somebody else does the work!

For once, I've saved you a job ;) You saved me one too, this would have taken a lot longer than 20 minutes without the file tools patch! And just for fun:

tobyspark's picture
thanks, really

a big thank you for writing that. i hate not knowing why something acts wrong, and now even if i can't do anything about it, i feel better about it.

and oh please we need to collaborate on spreads+text. if you can guide me through the unofficial api + your spread mechanism, i can bring my official api text structure patch and animating-sentances-through-iterators comps into the new world of performance along the lines of what you'd expect.

cwright++ =]

toby

SteveElbows's picture
Ooh I was just about to

Ooh I was just about to spend the weekend trying to get Radiohead stuff to work in QC. I was evaluating iterator performance using cubes last night, figured the framerate might be ok with 1250 points rather than 12000. Is there any chance you would share the quartz file? Id be prepared to give you some money if necessary.

cwright's picture
framework

We're planning on making both a Spreads plugin (which will have basic constructors and manipulators), as well as a framework (which the plugin uses, and other can use as well) -- this way, other unofficial-api devs can make use of them. You'll can follow that development if you'd like; having your input would be extremely valuable :)

we're also planning (no code) some text patches for the slightly longer-term future... no concrete plans yet, but perhaps some of your already-extant development work can be put to use in that :)

toneburst's picture
Cool.

Sometime next week perhaps? I have a stinky cold at the moment, so wouldn't want to inflict my snotty, virus-ridden company on your at the moment. Hopefully that will clear up soon though.

alx

Quartz Composer Blog: http://machinesdontcare.wordpress.com

Music Site: http://www.toneburst.net

toneburst's picture
Damn....

I was just wondering if it would be possible to do something with that dataset. Is it XML, then?

Very impressive, Chris.

alx

Quartz Composer Blog: http://machinesdontcare.wordpress.com

Music Site: http://www.toneburst.net

toneburst's picture
Having said that

looks like cwright is on the case with spreads, anyway.

alx

Quartz Composer Blog: http://machinesdontcare.wordpress.com

Music Site: http://www.toneburst.net

psonice's picture
CSV

It's all csv unfortunately. Easy enough to handle though with string components to separate the lines, then the values.

Was anybody not planning to have a go at this btw? :D I only heard of it because IQ fed his point cloud code on it over at pouet.net (youtube video, his realtime version (for windows - I've not looked at this yet), and his site with various very interesting graphics stuff) and I wondered how my current work would handle it (which is why I got it running so fast, everything was already in place bar the csv loader). So actually IQ beat us all ;)

psonice's picture
Framerate

Unfortunately I'm guessing that you missed the part where I said it runs at 1fps :) The iterator is always going to choke when you feed it 12,000 points, and cutting the data set down to 1,200 without too much loss of quality is going to be pretty hard.

On the other hand, the method I use to render there is actually mesh based rather than point based, and I think it's possible to get this to run at a decent speed by pre-rendering the point cloud. It'd have quite a few limitations, but it also opens up a lot of possibilities (like merging the face with the cubes in my second video). I need to do some more work on that before I'll know for sure if it works, but if you're interested in going that way drop me a line (I just replied to your email to the QC Dev mailing list ;)

The other option of course is to wait for the kineme guys to release their spreads patch, which will hopefully make doing point clouds like this pretty easy and fast :)

SteveElbows's picture
Cheers, yes I did see the

Cheers, yes I did see the stuff about woeful framerate, I was hoping to experiment with your composition in different ways anyway, to see what could be done about that. Plus I was quite keen to try it with fewer points and see just how bad it looked, as loss of quality can sometimes be worked into a style in a beneficial way (or maybe just wishful thinking on my part). There's a javascript + canvas render of a fraction of the points at this site, and whilst it is aweful in some ways, there is still something interesting about it. I wanted to see what kind of mess Id get if I made the points much larger too.

http://blog.nihilogic.dk/2008/07/house-of-canvas-radiohead-meets.html

Anyways no worries either way, but if you could share it in some way then Id be over the moon. But no pressure, honest :)

Spread patch sounds wonderful, shame plugins are evilllll, they make your system prone to bouts of clinical depression, much better to wrap qc in tinfoil and dispose of it safely ;) (note to others - this is just me being stupid about a weird post on the apple qc list, from someone who has weird ideas about qc plugins - they are the devils work!)

psonice's picture
Stripped down radiohead composition

Ok, I stripped the composition down (basically all my fancy rendering stuff is gone :) so it should be useable pretty much straight off, apart from one plugin.

You'll need the kineme file tools patch (which is still in beta, so make sure you have QC well wrapped in tin foil and keep a safe distance from your computer just in case!) You'll also need the radiohead dataset, which is available at the link I posted above somewhere. Stick all of the .csv files in a folder called 'csv' in the root of your hard disk, or put them somewhere else and change the path (you'll find it somewhere near the left of the composition).

I added a couple of settings too: Stepping sets the number of steps to take as it iterates through the point cloud - 1 means do every point, 2 every other point, 10 every 10th etc. Point size adjusts the size of the points.

It's not particularly snappy still though - with the stepping set to 30 it's a watchable 15fps here, but it's an unwatchable blurry mess :) A stepping of 5 or less gives better quality.

Have fun with it!

PreviewAttachmentSize
radiohead simple.qtz13.79 KB

toneburst's picture
I noticed that post too

sounded like someone with a axe to grind to me...

alx

Quartz Composer Blog: http://machinesdontcare.wordpress.com

Music Site: http://www.toneburst.net

toneburst's picture
2.85 fps

On my 3.2GHz 8-Core MacPro, with Stepping of 3.

alx

Quartz Composer Blog: http://machinesdontcare.wordpress.com

Music Site: http://www.toneburst.net

psonice's picture
More radiohead

This time, fed through the radiohead to prodigy filter ;)

toneburst's picture
That's

.. quite disturbing.

alx

Quartz Composer Blog: http://machinesdontcare.wordpress.com

Music Site: http://www.toneburst.net

SteveElbows's picture
Thanks so much :)

Thanks so much :) Interesting stuff. I got the framerate slightly higher by using cubes instead of sprites, but yeah, it seems hard to get a good balance between framerate and it looking anything like a human face. I'll have another play with it at the weekend.

psonice's picture
2.3fps!

2.3fps here at a stepping of 3, that's on a 2.4ghz imac with radeon 2400. Not bad considering :)

A did a bit more messing over lunch, and figured a few things out: - Like steveelbows said, using cubes instead of a textured sprite makes it a bit faster (3.something fps). - Disconnecting the texture to make it an untextured sprite is even faster (over 4fps). - Pre-processing the raw data so the various math patches in the iterator can be deleted makes it even faster still (and much easier to work with when the cloud is centred around 0, and within the range -1 to +1). I got over 6fps that way.

It's pretty easy to process the data in excel, by figuring out the ranges (MIN() and MAX() are your friends) and scaling. Be wary of excel's dodgy csv output though - it replaces the normal new line character with something else, which breaks the first string components patch (you end up with a structure with one massive entry). I opened the csv file in text editor and just replaced all new lines (had to copy + paste one to get it to work there too) with ! characters.

I've no idea how you'd automate that over the whole file set though! I just did it for one frame and played with it that way.