psonice's compositions and stuff

psonice's picture

Yes! My own rival thread to compete with gtoledo's! (Well, actually more to avoid trashing his thread with "psonice debug".. :)

I'll stick my demos and experiments in here from now on.

psonice's picture
psonice's compositions and stuff : rainbow smoke

Inspired by george's "painting in 3 dimensions" composition (it started out as a hack of his one, but ended up totally different).

It's effectively sprites being drawn moving around the surface of a sphere, but to make it more interesting it's more like sprites on the surface of a sphere on the surface of a sphere. It just makes the motion much more complex. There are several copies of the sprites moving around too, and they move "in time" so that sometimes they become a single group of sprites, and other times they drift apart. The groups vary their paths more as they separate in time too, to make a fractal-like effect.

Note that it needs 32bit rendering to run, and only recent ATI/Nvidia cards support it. I guess ATI 2xxx or Nvidia 8xxx or higher are needed. You might get it to work on other cards (try setting the render in image to 8 bit mode) but the colours and blending will be totally wrong (instead of smooth rainbows you'll get blotches..)

Also note that it's frame rate dependent. If it runs too slowly, it'll be too dark. It looks good between 30-60 fps, so make your window smaller if it's running slower than that.

http://kineme.net/files/rainbow%20smoke_0.qtz

psonice's picture
psonice's compositions and stuff : northern lights

A "quick fix" of a problem with rainbow smoke ended up being a huge tweak and a new composition. The video doesn't capture it, but the actual composition paints clouds as well as the northern lights effect.

Same things apply for this one: it needs ATI 2xxx or Nvidia 8xxx or higher video card, and it's frame rate dependent so make sure it runs at 30+ fps.

http://kineme.net/files/northern%20lights.qtz

psonice's picture
psonice's compositions and stuff : brain evolving

Totally different technique this time, but based on similar ideas.

Instead of using LFOs to animate sprites, I wrote a really evil, nasty hack javascript function to make a huge structure of animation parameters. Then I just attach the right structure index to the x, y, z inputs of the sprite to animate it. The hard part was getting interesting animation - it ended up being a vague mix of spline and linear animation, with a very rough approximation of flocking to bring the points together now and then.

No .qtz just yet, I'm thinking of making a screensaver pack with these things :)

psonice's picture
Re: psonice's compositions and stuff : 32bit mode on radeon 1600

Just tested on a radeon x1600. It doesn't seem to support 32bit render mode :( Can anyone shed some light on that? I thought it should work?

gtoledo3's picture
Re: psonice's compositions and stuff : 32bit mode on radeon ...

Nope, I can shed no light... but this goes to support one of my pet peeve things about QC...

APPLE! Move as MUCH out of the settings, and ONTO the input parameters as possible! That way- if there was a decent Host Info patch that would read and display graphics card, or if someone was to write one 3rd party, something like this could be set to automatically "be right" for the end user. I think a HOST INFO patch that can call upon more of the info that you get in the "about me" would be great... (edit- or ideally, just remove the graphics card bugs... somehow I think that is LESS possible than my suggestion). I should be writing this as a bug report!

I tend to think that most "settings" should be buried in settings... but that the panel should have an additional check box to make them pop up as inputs so they can be manipulated programatically IF desired. I also know this doesn't quite fit into the current schema of how things work, and that it can be easy to use settings to add ports for things, but not straightforward to "make" a setting become an input. This would be similar to when you are making a CI filter and you choose "show advanced input sampler options", and new inputs are added.

Sorry for the tangent, but when I see anything that I think can be mediated by that feature, it makes me go off! Psonice, you should post links to 1988 and 1989 for the uninitiated, and for posterity's sake...

psonice's picture
Re: psonice's compositions and stuff : 32bit mode on radeon ...

Yeah, I'd like to see things like this on the parameters page too. It would be pretty easy to detect older cards and select 8 bit. Perhaps there's possible issues when switching between modes?

I guess I could just have 2 separate render paths, with a multiplexer to select the right one. I'll look into that some time.

Good idea about 1988 and stuff (and hey, I don't remember doing 1989! ;) - I'll add some more.

gtoledo3's picture
Re: psonice's compositions and stuff : brain evolving

I like this one the best so far, of these that you've been posting :o)

For another idea/param to tweak... the reason I initially put those in a replicate in space, instead of using a particle system or whatever, is because you can change the amount of replications/interpolation type on the fly, and I think it looks cool to change those over time (along with the origin/translation/rotation options) ...when it comes to these feedback ideas. A replicate in space gives that cool snakey curl.

If you make a screensaver pack out of those, you owe me lunch :o)

gtoledo3's picture
Re: psonice's compositions and stuff : 32bit mode on radeon ...

lol... I got that wrong! Did you used to have the "application" posted anywhere?

psonice's picture
psonice's stuff : tutorials

Some tutorials under here. For a bit more see my site:

http://psonice.untergrund.net/tutorials.html

(One day, I'll get around to giving that an actual design!)

1988: http://psonice.untergrund.net/files/tutorials/1988_commented.zip This is probably the best place to start. It's the complete .qtz file + assets for the '1988' part of my 8808 music disk. All the files are in the zip, and the .qtz file is nicely organised and fully commented so you can see how everything works.

Pre-multiplied alpha: http://psonice.untergrund.net/files/tutorials/CI_transparency.qtz

Pre-multiplied alpha is important to understand if you're doing any CI work. Failure to get it right can lead to horribly saturated transparent areas or "black fringes" around objects with transparency.

Font generator: http://psonice.untergrund.net/files/tutorials/fontgen.qtz

This makes a bitmap font set from any system font, so you can apply bevels, colours etc. to your font.

Infinite bobs: http://psonice.untergrund.net/files/tutorials/infinitebobs2.qtz

This has a moving sprite, accumulators, multiplexing, timelines, and a nice structure. If it doesn't run smoothly, make the window smaller and restart it. It's ugly because I didn't bother to make a proper texture ;)

psonice's picture
Re: psonice's stuff : demos

Numbers

Done in QC with a little help from xcode, in a massive rush (actually made in under 24 hours while partying and drinking at Sundown 2008). No commented .qtz file this time as it's a horrible ugly mess inside ;D Music is by m0d, and contains a genuine recording of a "numbers station" that m0d caught (he's a radio ham as well as musician :) (look up numbers stations on wikipedia or somewhere if you've not heard of them - they sound like a wild conspiracy theory but actually exist!)

http://psonice.untergrund.net/files/demos/Numbers%5bfinal3%5d.zip

"Dirty Harriet" / "You Massive Clod"

Not really made by me, but by parapete - it was originally a demo in 1kb for linux. I ported it to osx with QC as it's basically just a shader, and added some interaction. It's pretty slow as it's basically a raytracer, so you'll want a decent GPU or a small window :)

http://psonice.untergrund.net/files/demos/DirtyHarriet.zip

8808

A music disk made for Breakpoint 2008. 4 tunes, made by ne7 (1988, made on a commodore 64!), syphus (1992 - amiga! and 1998) and keito (2008). Each represents a different era of the demoscene, and I tried to get the effects to match. Unfortunately I ran out of time, so you'll see bits where it's obviously lacking.

See the "tutorials" post somewhere above this one for a video of the 1988 part, plus the .qtz file for that part of the demo (fully commented and explained).

http://psonice.untergrund.net/files/demos/8808party.dmg

psonice's picture
Re: psonice's compositions and stuff : 32bit mode on radeon ...

Scroll down to 'demos' post :) It's 8808 - '88 to '08.

psonice's picture
Re: psonice's compositions and stuff : brain evolving

For that one, I'm using javascript, iterators and sprites to make my own particle system, and there's a setting in the javascript that handles variable amounts of particles. Not tried changing it while it's running though - the catch would be that particles would suddenly appear and disappear, rather than fading out when they get too close or too far from the camera. Assuming it doesn't just cause some kind of bug :)

One thing I did do though was to have a limited hierarchy for the particles - there are 10 groups of 10 particles running. The groups move around, and the particles move around within the group. I scale the amount that the particles move by within the groups, so that now and then they all come together and merge - you can see in the video that they sometimes form a "node", or sometimes what looks like a single particle will branch into two lines.

Interesting idea though using the replicate in space - I'm sure I could use that to make curly ribbons instead of thin lines or tubes. Maybe I'll have a go at that.

And yeah, you're on for dinner if I get round to making a screensaver pack (don't get excited though, I did another one called "white noise" with the intention of selling it ages back and haven't found the time to sort my site out and arrange a payment system ;)

jersmi's picture
Re: psonice's compositions and stuff : 32bit mode on radeon ...

yeah, i can manually turn up the alpha on the lowest level patch sprite and get some action, but it looks nothing like the beautiful clouds... the gaussian gradient will not blend as add, so i see layers of black squares with a blurry circle, and the iterated sprites seem to remain "discreet", ie, they don't look like they are making "trails".

bummer.

psonice's picture
Re: psonice's compositions and stuff : brain evolving worms

I tried out the replicate in space idea, but it didn't work out too good. A little messing though, and I ended up with some rather tasty looking worms, using the same structure as brain evolving, but using the Z data for shading plus some blurred feedback. Looks quite nice, but glitches with over-saturated colours now and then.

PreviewAttachmentSize
metalworms.jpg
metalworms.jpg83.05 KB

gtoledo3's picture
Re: psonice's compositions and stuff : brain evolving

"Not tried changing it while it's running though - the catch would be that particles would suddenly appear and disappear, rather than fading out when they get too close or too far from the camera. "

Exactly! I do that all the time, and I like the sporadic "blob" effect of it.

I like how you have the intersect effect going on. I "dig" what you are saying about iterators/javascript setups to make pseudo particle systems, it's a cool technique and I've gutted the lorenz attractor example to aid in that on occasion.

gtoledo3's picture
Re: psonice's compositions and stuff : brain evolving worms

Hahah, that is hilarious, it looks similar to that pseudo art exhibit thing I posted on my thread before I set it up completely.... when I was going "ugh". Not to say that this is a bad effect either... it looks like gummy worms in metallic mud, if that is what you are going for :o) If they have a Terminator movie in a candy shop, they need to call you, my man! {good natured ribbing}

gtoledo3's picture
Re: psonice's stuff : demos

The 8808 is what I was remembering and incorrectly calling 1989!

gtoledo3's picture
Re: psonice's compositions and stuff : brain evolving

I have to add though... that one footnote on at least some of my feedback things is the method of color change- that thing with the hsl to color, and plugging in the randoms is something that Chris setup for an example, and it is really a cool way of getting a nice flashy thing going, easily.

Before that, I would tend to use the same type of hsl to color, but get color change by using interpolation/lfo, with or without patch time. It can also be interesting to assign some slow periods of value change, but leave a random plugged into others- which is kind of a mixed approach to getting some "random" color.

franz's picture
Re: psonice's compositions and stuff

hey, why not a "PSONICE vs GTOLEDO" thread ? (sounds good to me ;)

anyway, very nice of you for sharing !

franz's picture
Re: psonice's stuff : tutorials

the font gen seems very useful. btw, have you checked Toby's Font gen ? He made a custom plug (with source available if i remember well) that just does this... without the queue, so you don't have any problems using fast systems and completion signals.

cwright's picture
Re: psonice's compositions and stuff

We could even make a front-page poll, if y'all'd like :)

Pay-Per-View, Sunday, Sunday, Sunday!!

gtoledo3's picture
Re: psonice's compositions and stuff

... a little battle rap...?

http://www.mahalo.com/How_to_Freestyle_Rap wrote:
Freestyle Rap Battles Rap battles are an excellent way to practice and hone your freestyling ability. A freestyle rap battle is a competition between rappers. The winner is the one with the best delivery, lyrics (boasts, insults and witticisms) and overall performance. Usually the crowd determines their favorite, so you have to fight to win them over.

1.Watch other rappers freestyle, either in person or online sites like YouTube.

2.Write a couple filler lines. These are your in-case-of-emergency lines and should only be used when you can't think of anything else.

3.Be humorous. Use your wit to make the crowd laugh. One liners or unexpected comparisons are perfect vehicles for humor.

4.Rap about what's around you. This may include specific objects, actions, people, clothing and situations. Rapping about your immediate environment proves that you are spinning original verses and not pre-written raps.

5.Reference current events to create original allusions and word play. Play off another rapper. Expand on something your opponent says, turn it around or refute it.

You can also stick to similar or related topics.

Insults are meant to be taken with good humor, so don't get your feelings hurt. Rap battles are great freestyle learning opportunities. In fact, don't be afraid to use freestyle battling tips whenever you are freestyling."

I'm sorta game. Would the ground rules be, no rules?

And what if psonice's compositions only play on 1/8th of the computers, and mine bring 7/8 to a stuttering halt ;o) ?

psonice's picture
psonice's stuff : Image to GenericRGB plugin

I finally got round to releasing that plugin properly! Big thanks to Nick Musurca for cleaning up my messy code and fixing a nasty bug in it!

This one converts any RGB based image to GenericRGB colorspace. Why? If you want to use a sampler in a GLSL vertex shader, QC will crash if you use anything else, and QC almost never uses GenericRGB.

With this, you can do all kinds of cool stuff like displacement mapping. There's an example .qtz in the zip showing how to use basic displacement with either a plain image or a video input.

Make note of exactly how the plugin is used - it's essential to do it exactly like here, or it will crash badly. Also note that only "power of 2" textures are supported by the vertex shader, so stick to sizes like 256x256.

With some hackery, all kinds of cool stuff is possible with this plugin. E.g.:

PreviewAttachmentSize
Image_to_GenericRGB.zip16.09 KB

psonice's picture
Re: psonice's compositions and stuff

What have I got myself into here? :D

I think it's cool to bounce ideas around like this though, it's amazing how much cool stuff gets produced. I'm going to take some time out now though, got 3 iphone projects piled up waiting, and I'm off on holiday for 4 days now (woohoo! \o/ )

I've released that plugin necessary for displacement mapping and stuff to level the playing field a bit, so I'm sure there'll be some awesome stuff when I get back ;)

And I still maintain that most of my stuff plays on anything with an actual video card! Well, except where I've used 32bit and blend modes, that doesn't seem to be supported on some hardware for some reason.. and maybe a few other bits. I'll definitely beat you on the stuttering halt front though with my slitscan comp. I reckon if I ran that in HD, it would head for the golden "1hpf" barrier! ;)

psonice's picture
Re: psonice's stuff : Image to GenericRGB plugin

Totally forgot to mention: this is an "official api" plugin, so it goes in the "Quartz Composer Plug-Ins" folder, not the "Quartz Composer Patches" folder like the kineme ones.

To install, drag it to "Library/Graphics/Quartz Composer Plug-Ins" (either /Library or the Library in your Home folder will work, it's probably best to use your home folder one if you only use one account on the mac.

The plugin shows up as "Image to GenericRGB" in QC, it should be under the "Plug-in" category.

leegrosbauer's picture
Thank you

It's just great!

I initially had an issue with changing cameras in the video input patch which caused the source index to act up. But after repeated attempts .. it now seems to work properly. I'm gonna call it good.

With video input, it runs fastest at full zoom, I see. That's both interesting and useful.

Really stunning plugin. Thanks!

gtoledo3's picture
Re: psonice's stuff : Image to GenericRGB plugin

Cool, can't wait to check this one out!

gtoledo3's picture
Re: psonice's compositions and stuff

Yeah yeah yeah... why just last night I was working on a qtz that takes over a half an hour just to LOAD. Ha!

Yeah, iphoooone. Suuuuuuuuure. In all seriousness though, it would suck to do something like that, and then have something pop up on a given day that would screw it up. It's better to share contributions without "timeline"... and we would be giving away tons of cool ideas probably, willy nilly :o) (not that it would be a bad thing for the posters here)

psonice's picture
psonice's compositions and stuff : subatomic

Rainbow smoke evolved, and went subatomic. Music is 'Do you remember' by keito - www.keito.co.uk

gtoledo3's picture
Re: psonice's compositions and stuff : subatomic

The spirals and twists on this one take some really cool looks.

cybero's picture
Re: psonice's compositions and stuff

Psonice & GToledo & Toneburst & Smokris - all of the above might well find parts of their work in the following files. The first relates most accurately to the work done on threads from Smokris , Toneburst & Gtoledo,GLSL, 3D and CoreImage related stuff but then I found to my delight that the plugin psonice had so kindly provided created some very interesting results when presented with two Render in Image sources derived from the GLSL , Core Image & 3D work, but placed within the GLSL shader psonice used.

Sometimes it is nice to be surprised.

[unlike this morning when my first edition Claud Butler / Falcon MTB was stolen]

Like I said, sometimes , it's really nice to be surprised.

The file A3D.qtz provides a very, very slow, 1 - 3 fps 3D Rendering. It does give a very suprising result distinct from the original 3D.qtz, that was made without using psonice's plugin, also fairly slow, at about 10 - 12 fps.

Of course fps ratings might be more related to my now living antique of an NVIDIA 5200 card.

PreviewAttachmentSize
3D.qtz72.03 KB
A3D.qtz107.28 KB

psonice's picture
Re: psonice's compositions and stuff

Arse, no kineme3d plugin here, not had use for it so far :/ Could you do a capture and put it on vimeo or somewhere? I'd love to see it.

gtoledo3's picture
Re: psonice's compositions and stuff

There also aren't whatever 3D models it uses! Other than that, the gray background looks nice on that one :o)

cybero's picture
Re: psonice's compositions and stuff

Oops :-) - OK here goes, the zipped archives containing the all important md2 files.

Apologies for my mix up over the need to bundle the 3d resources, but the same holds true as stated before, with the 3d plug ins used & psonice's Image plug used, the same core quartz composition produces two entirely different results.

The videos of the before and after are here

Before

&

After

leegrosbauer's picture
Re: psonice's compositions and stuff

A3D w/plugin and rendered in an image as a video source is way impressive to watch! Got the music cranked! Real nice!

gtoledo3's picture
Re: psonice's compositions and stuff

I just looked at the clips... they look pretty cool!

psonice's picture
3d world

Quick fun hack.

Removed the kineme texture stuff from the old version, and used GDT to make a nice height map instead. I've used a smaller texture so that affine transform doesn't fall over backwards, and written a CI filter to colour the height map so it looks like an oldschool terrain generator :)

Last change: this is now deforming a sphere, so there's a whole world to explore ;)

PreviewAttachmentSize
landscape2.qtz801.25 KB

psonice's picture
Re: 3d world

Modified version, with some filters applied to the texture.

toneburst's picture
Re: 3d world

Very nice.

a|x

cybero's picture
Re: 3d world

Impressive.

I'm really only beginning to do little more than merely texture or transform utilising Core Image Filters, so this sort of example really helps to illustrate some of the more extensive possibilities with Core Image.

Strikes me that of all the [documented & undocumented] areas of potential discovery within Quartz Composer, Core Image has got to be the greatest area for discovery of them all.

I really like the idea of stretching this out into a 16:9 rectangle projection, with hills, shadows, maybe flowing rivers, like a coffee table top, if you know what I mean.

toneburst's picture
Re: 3d world (CIFilters)

Core Image Filters are great! I use them all the time, to the extent that I'll often start trying to write a Kernel routine to do something before even checking to see if there's already an existing QC patch to do the same thing. I've been caught out by this a couple of times (though I can't recall specifics at the moment).

You'll find that a lot of GLSL/HLSL pixel/fragment shaders can very easily be rewritten as Core Image Kernel routines, so there's plenty of sourcecode out there that can be creatively plundered.

The combination of the CIFilter patch and JavaScript Filter Function panel has massive potential, too. You can do some really impressive multipass filters just with the one patch.

a|x

toneburst's picture
Re: psonice's compositions and stuff

I've periodically come back to this problem of lighting a sphere distorted by a heightmap. The problem is generating normals, which are needed for proper lighting calculation. After trying several different methods for doing this, I had another go last week. This is what I came up with. It's still not there, but it's closer than I got last time.

This is a radially-distorted sphere, with the heightmap being generated by a modified version of smokris' Improved Perlin CIFilter, and lit with a basic Phong/Blinn lighting model implemented in the Fragment shader. The normals are created by averaging the sphere primitive's existing normals with the value from a normalmap, generated by a Sobel type filter, using a CIFilter conversion of code found here: http://www.catalinzima.com/?p=106

If anyone fancies trying to implement some other lighting models, I'd love to see the results (though I suspect the normals aren't of sufficient quality to work well).

Requires Kineme OpenCV plugin (though may not on some machines), apparently.

a|x

PreviewAttachmentSize
tb VDM Sphere 01 280509.qtz37.75 KB

psonice's picture
Re: 3d world (CIFilters)

Agree, CI filters are really great for a lot of things. The best thing I think is that CI and GLSL are so close.. if you learn CI first GLSL isn't much of a step away. Only downside is CI performance on nvidia cards it seems.

psonice's picture
Re: 3d world / planar

Couldn't resist a quick play with it :)

Flat version, resizes to fit the screen properly, with hills + shadows (ish). No rivers (actually I wrote a shader to add rivers previously, it's pretty cool (you specify a water source, and the water flows by the most direct route downhill and then forms a lake if it has nowhere to go) but pretty buggy. Maybe I'll fix that some time and add it.) The sun rotates in the sky too, but that can be turned off :)

One thing it needs: some link between the hill 'height' and zoom. When you zoom, the texture stretches so the height map gets smoothed out and the hills smooth out too. I guess 32bit mode + 32bit height map would help greatly too.

The composition is a horrible mess btw :)

PreviewAttachmentSize
landscape planar.qtz810.7 KB

psonice's picture
Re: psonice's compositions and stuff

Cool :)

I'd add this to the composition, but can't be arsed right now. Too much to do, too much time wasted already. I'll definitely keep hold of the shader that does the normal map though, it could be very handy for some other stuff i'm working on.

yanomano's picture
Re: psonice's compositions and stuff

A.M.A.Z.I.N.G mister Wood ;)

toneburst's picture
Re: psonice's compositions and stuff

I wouldn't bother- it doesn't really work. It's not so bad for relatively smooth deformations, but once the mesh gets 'spikier' the normalmap quickly diverges from the geometry. I think it's to do with the way the texture coordinates become stretched, which makes the normals less accurate.

a|x

toneburst's picture
Normal-Mapping Example Clip

Here's a clip of it in action:

You can see how inaccurate the normals are. It gets worse the 'spikier' the mesh is.

a|x