Droste - Sample Code

cybero's picture

A new Core Image routine and spiffy example from the Developer Sample Code section - new accession to the stacks :-).

Requires 10.6.x, which I guess underlines how much 10.6 suits tasks unachievable under 10.5.x and earlier, even with Core Image.

gtoledo3's picture
Re: Droste - Sample Code

Not really ;-) It's just mis-labelled. It works fine in 10.5.

So, no task that was unachievable in 10.5 :-)

cybero's picture
Re: Droste - Sample Code

I was wondering about that, thought it might have been dependent upon OpenCL & / or 64-bit improvements to the way CoreImage works in 10.6.x, obviously not.

{you can't believe everything you read nowadays, can you ...? - EXP - Jimi Hendrix Experience}

One thing is for sure Droste does really great recursive things - Escher House [Outside the Box]

PreviewAttachmentSize
droste_screen_grab_one.png
droste_screen_grab_one.png311.47 KB

gtoledo3's picture
Re: Droste - Sample Code

I was particularly happy to see this, and I'd asked about doing Droste filtering with CI and QC a number of times. If anyone at Apple did this because of my constant needling, I'm very grateful. The Droste filter is one of my favorites from Photoshop and Mathmap, and I failed to figure out how to port it to CI from looking at those apps.

The code is really well commented too, which is a major plus. I was all over this the day after it was posted, and sent a thank you ;-)

Funny Hendrix reference by the way!

toneburst's picture
Re: Droste - Sample Code

I was going to do this one, too!! I did start it, in fact, but gave up after a while because the mathmap>CIFilter translation looked too complicated for my poor pea-sized brain.

a|x

Scratchpole's picture
Re: Droste - Sample Code

http://methodart.blogspot.com/ Scroll down: June 08, 2009

toneburst's picture
Re: Droste - Sample Code

There doesn't seem to be any shader code though. It's a CPU effect.

a|x

cybero's picture
Re: Droste - Sample Code - Testing

I wondered will Droste work AOK in a Trackball, and would that work AOK in a Render in Image.

Then, would that construct work AOK in iTunes?

Still waiting on getting Droste to work in a Trackball.

cybero's picture
Re: Droste - Sample Code

I wonder how useful it would be to port this to OpenCL kernel code

http://www.subblue.com/projects/droste

Just a thought.

I'm just beginning to look at porting it over to QC now.

gtoledo3's picture
Re: Droste - Sample Code

Yep, I saw that blog as well, and couldn't figure out a way to do that in QC via that code... like you say tb, it's not a shader.

That freeframe bouncing ball with physics effect is pretty hot. It's similar to that clip from vimeo I posted the other day.

I really like some of Kevin Atkinson's ideas, especially the concept of using image filters in such an interactive way. Core Image is WEAK in that department, and it's something that QC is probably the most adept at handling, of Apple technologies.

cwright's picture
Re: Droste - Sample Code

Note that CoreImage uses CL or GLSL under the hood, so it's using CL anyway.

cybero's picture
Re: Droste - Sample Code

That's kind of what I was thinking would be the case, in fact.

Thanks for the confirmation.

toneburst's picture
Re: Droste - Sample Code

Subblue's Droste effects is a PixelBender plugin, so it's basically a shader, but written in a proprietary language, that gets converted into GLSL for execution. I did manage to extract some GLSL shader code from this effect using one of Apple's OpenGL debugging utilities, if I remember correctly. I think the problem was I couldn't work out what all the uniforms were meant to be, or their useful ranges.

a|x

toneburst's picture
Re: Droste - Sample Code - Testing

How do you envisage it 'working' in a trackball? I mean, it's a completely 2D effect, as I understand it. Having said that, I guess if you did it in a GLSL shader, you could use values from gl_ModelViewMatrix to change some of the parameters from the trackball.

a|x

toneburst's picture
Re: Droste - Sample Code

Interesting. You say CL or GLSL- what determines which is used? Or is there no distinction between them, as far as the GPU itself is concerned?

a|x

cwright's picture
Re: Droste - Sample Code

on 10.5, it's GLSL if possible, with software fallback. On 10.6 and later, I think it tries GLSL if it's capable (simple kernels without a lot of branching, inputs, etc), and falls back to CL when on the CPU (so no GPU CL as far as I know) -- that all said, I'm not a CI buff by any means, so I could be mistaken.

cybero's picture
Re: Droste - Sample Code - Testing

First option - cheat - kind of, like Trackball the RII component within the RII, see attached file.

Second option - still working on that , but trackballing both component parts is too slow and the RII is not as fast I'd like, but there you go.

File 1 iterates a Particle System inside a 3d transform inside a trackball, file 2 simple Rii's a Billboard through a 3d transformation inside a Trackball.

Trackballing the final render patches - mmm ....

Had thought about using spheres.

Now see Droste Alone - uses spheres, but they provoke GF Log errors, though they render none the less; what else to use?

GL Circle to Droste - on vimeo.

PreviewAttachmentSize
DrosteRII[Trackball-RII]1.qtz104.95 KB
DrosteRII[Trackball-RII]2.qtz76.22 KB
DrosteAlone.qtz59.38 KB

cybero's picture
Re: Droste - Sample Code

Quote:

The code is really well commented too

Indeed it is, very informative in fact.

bleep's picture
Re: Droste - Sample Code - Testing

twisted _ e x c ll e n t

cybero's picture
Re: Droste - Sample Code - Testing

Cheers, just uploaded a new Droste permutation, utilising the excellent neon gradient_noise kernel posted at t-linked.com.

Should be online soon, just uploaded, coincidentally, at the time of posting this response.

http://vimeo.com/13013276

PreviewAttachmentSize
drosteneon.png
drosteneon.png555.59 KB

cybero's picture
Re: Droste - Sample Code - Testing

The updated Droste patch is pretty smooth and the original source code is available to experiment with.

I think Droste patch works well as an overlay maker.

PreviewAttachmentSize
DrosteGrayMVEtra.png
DrosteGrayMVEtra.png1.51 MB