Impossible Machine (Composition by gtoledo3)

Author: gtoledo3
License: (unknown)
Date: 2010.05.02
Compatibility: 10.4, 10.5, 10.6
Categories:
Required plugins:
(none)

This composition shows how to create a cube system using Iteration, LFO's, Interpolation, and 3 point lighting.

There are many type of movement available by manipulating the input parameters.

usefuldesign.au's picture
Re: Impossible Machine (Composition by gtoledo3)

Nice lighting and concept. Making extensive use of LFOs as LUT these days I see, I'm a Interpolation-man, myself ;)

cybero's picture
Re: Impossible Machine (Composition by gtoledo3)

It's nice to see your use of Primitive patches.

Instantly reminded me of what could be done with iterators in Tiger QC [fond memories indeed] & looking up at the tags, I can see that it is indeed 10.4 compatible.

This construct works nicely with Splines too, so GL Tools can get a look in on this sort of construct , albeit that I find the iteration level has to be lowered to achieve a decent rendering result when employing Splines.

Nice work indeed.

gtoledo3's picture
Re: Impossible Machine (Composition by gtoledo3)

I was looking at some stuff on OpenProcessing.org recently and felt like a ton of the ideas could be implemented in Quartz, but that probably many don't know quite how. There was something that reminded me of an old qtz of mine looks wise, but simpler (space debris.qtz, which used K3D). Last night, when I was playing around with Iteration and LFO's, I realized that I could mock up something really similar to that Processing example, and reminiscent of my "Space Debris" look too (that said, I didn't have the example open, or try to mimic it exactly... it was my loose memory of it).

I first started these experiments with splines (or actually... Sprites to begin with), but I wasn't tremendously happy with the visual results, and especially, the performance of splines. That being said, I did have some neat looks going with the splines.

gtoledo3's picture
Re: Impossible Machine (Composition by gtoledo3)

Well, I usually tend towards interpolation for control of rotations, translations, etc., inside of an iterator as well.

However, this goes back to a way older qtz that I posted, "particle wreath.qtz" that makes a circle by using a lfo in cos mode, and another in sin mode, with the same periods, and the fact that the little particle system moves around in a perfect circle. I thought, "hey, if I use this in an iterator setup, it will be an interesting alternate method of making shapes".

I had also remembered making different letter shapes with LFO combos, and playing with phase, so I spent some time on that as well (none of that posted so far).

I would definitely encourage playing with LFO combos like this, in conjunction with iteration, for making different shapes, because it's a real time saver. Using the sawtooth up/down stuff is great for making "movement" loops of objects too.

cybero's picture
Re: Impossible Machine (Composition by gtoledo3)

Hear what you're saying about the relative performance hit, does make all those stipples available though - fewer iterations preferred though and I get a lot of morphing salad shakers :-)

http://openprocessing.org/ is a boss site - great learning and exhibition portal for the Processing language.

BTW - looks like I'm not the only one with vimeo encoding problems [& I'm not a Plus class user] - wonder what's been happening there.

gtoledo3's picture
Re: Impossible Machine (Composition by gtoledo3)

Yeah, sometime yesterday I started seeing a weird message like "we're moving your file on our servers, and then we'll tell you how long it's going to take". It's been kind of ridiculous, especially considering Premium is supposed to give you instant conversion/uploads. I don't even come close to tapping out the file limit per week, so I wish that I would get fast uploads when I do use it... Oh well.

dust's picture
Re: Impossible Machine (Composition by gtoledo3)

there are some really great examples on open processing. i have been converting some of them to qc myself. in particular i have been wanting to port the jbox2d stuff but that library is very large. i thought about trying to make queue off all the vertex data or extract from dae and somehow attach a hit test to each vertex so some of the effects of jbox could be done in qc.

regardless of jbox i think george is on the right track here as many of the open processing examples and principles apply to qc...whether you are doing some sort of java script or glsl equivalent function or using lfos's and iterators like george is doing the principles are the same just the screen space context is different.

like the processing math function map is like setting an interpolator to external time etc...

in the past to get qc into processing i have built jni native cocoa component which for what ever reason is depreciated now. i guess there is a java cocoa native bridge now which i'm not as familiar with but i'm thinking it might still be possible to get processing into qc or vise versa with either the bridge or by making calls to cocoa component.

gtoledo3's picture
Re: Impossible Machine (Composition by gtoledo3)

"there are some really great examples on open processing. i have been converting some of them to qc myself. in particular i have been wanting to port the jbox2d stuff but that library is very large."

I started in Processing way before QC but... I don't like it as much. However, I've recently been drawn back into it, because of a few things that are so much simpler to do, and also because I've been interested in using the v002 screengrab to route my Processing sketches to QC, and then put QC post processing effects on things.

The jbox2d stuff is really fun, and it's not too hard to do sort of "pseudo" looking 3D stuff by making your 2d objects look like boxes, or whatever. If we could have a way of looping back a structure into Particle Tools, so that part of a scene (say, if I draw a shape of particles), could be used as a collider... instead of setting colliders, a structure of input points needs to be used as collision info. I really think it would be cool to have jbox2D, but then I think, 3D physics is more appropriate for QC.

"regardless of jbox i think george is on the right track here as many of the open processing examples and principles apply to qc...whether you are doing some sort of java script or glsl equivalent function or using lfos's and iterators like george is doing the principles are the same just the screen space context is different."

I think that by looking at what's going on in other graphics "toolkits" so to speak, we can get alternate takes. Some things are easier to achieve in other app building environments, but that doesn't mean they can't be done in QC. One of my last fun tests was a gravity warp thing that's on the Open Processing page. Sometimes things reveal limitations of QC, and other times it reveals limits of Processing (which are huge, imo). I also have been pretty interested in VVVV, Nodebox, Ogre, Unity, Blender (which has some interesting nodal interfaces available), MaxMSP/Jitter... and a hodge podge of other stuff lately. I still feel like QC is the most amazing tech of all, being that it is a high level programming language, with Cocoa at the heart, and is almost infinitely expandable, in a logical way (for the most part).

I would be really interested in being able to run Processing in QC as a Provider, with scripting available in the Settings, and with an output image that reflects whatever you set in your Processing code. Some of the visual output of Processing stuff just has a nice "look". The one thing that I'm a little miffed by, is how one would be able to make it work, because of the way a sketch may depend on various libraries that are in the Processing app, and that one may want to use custom libraries as well. I'm not sure what would make sense on that one...

photonal's picture
Re: Impossible Machine (Composition by gtoledo3)

I haven't had a chance yet to check out your latest creations (little bit drink) :)

but thanks for sharing your stuff!!

will do soon! (donwloading them now!) a.

dust's picture
Re: Impossible Machine (Composition by gtoledo3)

i would have to look up the java binding again but cocoa and java deal with reference to there data types so converting things of equivalent datatypes is possible. george if you have a leopard machine running still... download the apple developer example of qc cocoa component and it will show you how to run a qc in java (processing) and how to send messages between the two via published ports etc...

i spent a whole day trying to figure out how to do this in snow leopard and to no avail but if you have a leopard system running its pretty simple. you build the component then run the java app and instead of extending swing extend core.jar or PApplet.

another example of this on open processing is the sudden motion sensor where as its native language is cocoa but with jni component the two talk together.

i have myself been messing with max 4 live and dips4 qc max msp integration kit.

getting dips4 to work is pain. if you haven't all ready got it running which is pain. you can use this file i'm uploading. just install dips 4 max and overwrite your dips externals with this folder. and you should have qc in max.

once qc is in max then you can use processing libraries and do java stuff with it as well. that might be a better solution to building a cocoa component. cogee webkit also works with processing.

PreviewAttachmentSize
dips4-externals.zip2.86 MB

gtoledo3's picture
Re: Impossible Machine (Composition by gtoledo3)

Don't get too excited, for real! They are mostly conceptual, and what I view as more fundamental oriented, rather than something that "looks" really cool. With some tweaking, they can shed light on how to make some pretty interesting object patterns.

However, the "Impossible Machine" thing is an intermediate idea that shows how to use the basic concepts to make something a little cooler looking.

My desire is to do a break down on the qtz's to explain the decision making process, as well as more variations.

Here's an interesting, more advanced twist on similar concepts.

PreviewAttachmentSize
Motion Links GLSL.qtz23.79 KB

cybero's picture
Re: Impossible Machine (Composition by gtoledo3)

LOL - when is a sphere not a sphere?

When it's iteratively combined :-)

leegrosbauer's picture
Re: Impossible Machine (Composition by gtoledo3)

gtoledo3 wrote:
... I would be really interested in being able to run Processing in QC as a Provider, with scripting available in the Settings, and with an output image that reflects whatever you set in your Processing code ...

It's not Processing, but since there seems to be parallels ... vade has been posting some nifty openFrameworks/QC integration in the last few days. It deserves it's own topic, but I don't see it being presented in here yet.

http://vade.info/QcOfCollada1.mov http://vade.info/QcOfCollada2.mov http://i.imgur.com/yF6cc.png

It's beyond my skills to use it, but here's vade's latest oF/QC plugin update: http://code.google.com/p/ofxqcplugin/

gtoledo3's picture
Re: Impossible Machine (Composition by gtoledo3)

I've looked at that this past weekend, and it's intriguing.

Processing is more immediately intuitive for me (it reminds me of programming in LOGO for some reason).

I've been familiar with OpenFrameworks from the start, but the idea of coding something from scratch in C++, and using this plugin as a kind of template/bridge doesn't work for me too well, and I haven't seen much that I think the frameworks offer that wouldn't be as easy to do in QC to begin with, via a custom plug.

That's interesting to see the collada stuff being manipulated with OFX apps hosted in QC, but I would way rather see a native QC solution, with all of the amenities. It's really nice to see anything that adds to the QC repertoire though.

I'm thinking something more along the lines of an actual window/settings panel to write code in, than compiling little plugins for each Processing sketch.

photonal's picture
Re: Impossible Machine (Composition by gtoledo3)

Really like this! It reminds me of when Sark's transporter in Tron starts to de-res.

psonice's picture
Re: Impossible Machine (Composition by gtoledo3)

I like it too. Although it reminds me more of mfx's brilliant 'a deepness in the sky' demo, which uses the same kind of technique but takes it to a whole other level of flashy synched goodness:

Download link for the original realtime version for windows: http://www.scene.org/file.php?file=/parties/2002/sota02/demo/mfx_dis.zip... (realtime version recommended, it's quite old so pretty easy on hardware requirements, and it really benefits from 60fps :)

gtoledo3's picture
Re: Impossible Machine (Composition by gtoledo3)

Psonice, you're busting my balls here! It's a beginner's example! :-)

Pretty cool video, thanks for posting. I don't think the structure of shapes would be a deal breaker, but QC sure doesn't do light effects like that very naturally. The only way I could conceive to do that QC is to do some compositing of layers, so that I could get that blown out light effect on some stuff, and keep other things crisp and correct looking.

You always find the coolest demoscene stuff.... but WINDOWS! Arrrgh. Kills a little piece of me! :-)

I have some pretty tweaked in scenes using some objects like this that morph from one thing to another, and some clever use of textures/backgrounds to keep fps reasonable.... and iterating timeline values instead of lfo's or interpolates can get into some pretty out there looks, sort of Gantz Graft looking stuff. Hopefully I'll have enough time to progress on that a bit, because it's a total pet project.

psonice's picture
Re: Impossible Machine (Composition by gtoledo3)

Nah, I liked your example. Just wanted to show where you can go with a 'beginner' example, with a little more work :) This is one of the great things about QC I think - you can start with a simple idea for something new, and keep tweaking and adding to it until you get something really cool at the end.

The structure isn't actually all that complex I think, it should be possible using only a couple of iterators and some interpolation (and a huge amount of head scratching! :) It's more or less your example, but with a few more parameters for rotation perhaps and some heavy synching.

The 'light' effects should be 100% possible in QC though, this is actually pretty old and was one of the first demos to use pixel shaders. It's probably not much more than a glorified blur + glow effect :) For the 'lightning' type effect, it's probably just a second pass with fewer objects/different parameters with a strong glow applied.

The big difficulty really is the iterator speed, I suspect the only way to get this running in QC at decent speed is either a custom plugin to generate the objects or a cunning/horrible iterator with perhaps <100 iterations, and perhaps >50 cube patches so it's kind of an unrolled loop. Worst case you'd have to totally unroll the loop, and have as many macros as objects on screen (I had to do this before, in a comp that needed 1280 iterations.. think the final comp had something like 3000 patches :D)

bleep's picture
Re: Impossible Machine (Composition by gtoledo3)

really nice composition - looping, expand etc great for live performance ..

I once remember a .qtz in beta ... with similar look to this (different color) .. about 1yrs ago .. maybe this was you, ill have to find it. this one seems much more complete . 10/10