"flat" shading

gtoledo3's picture

This isn't truly groundbreaking or anything, but I thought it was pretty cool, and picked it up while looking at lighthouse3d.com

You can do this z=0 bit on any GLSL... I added it to toneburst's setup of "glossy wet" because it looks so nice :o)

Pretty rudimentary actually, but it had never occurred to me before!

glsl flat glossy.qtz11.14 KB

cwright's picture
z-fighting redux

a slightly more palatable alternative is to do something near-flattening, like v.z *= 0.01, so that the object's almost flat, but still not flat enough to confuse the depth buffer.

(When I see Z-Fighting, I want to jump off a building and break the fall with my face.)

gtoledo3's picture
Oh yeah, my bad, I did

Oh yeah, my bad, I did notice that when I was messing with this a few days back (and the solution).

BTW, you might want to take some meds for that :o)

Lol, that just makes me want to put your knight vs goblin inside of this for z fighting galore. (ooh, that would be ugly).

I should try this with the image map, because I think there might be some fun to be had. ( I somehow envision using this to imitate pablo picasso cubism stuff... don't know if it will work or not).

cwright's picture

smokris and I were actually thinking about using this shader, combined with an environment mapping one, to do some cool environment sim stuff. Perhaps a "wetness" texture too, to control which parts are wet or something (not sure how that would look...)

for even more exciting z-fighting, turn off back face culling :) then it's insanity :)

gtoledo3's picture
"great minds think alike",

"great minds think alike", lol...

Ah, you are right about the culling, that is disgusting! Coming to a theatre near you: "Shader Wars: Fight of the Z's".

gtoledo3's picture
You know what, on my system

You know what, on my system at least, it wasn't changing the z value that fixes the z fighting, it was turning off depth testing. I can knock z up to .5(to pick a number) and it's still funky, but the second I check off depth testing everything is fine. As a matter of fact this makes me want to revisit various 2D shaders that I wasn't having great results with (but that were exhibiting other types of quirkiness).

glsl flat glossy-nodepthtest.qtz11.14 KB

leegrosbauer's picture

If z fighting is what I'm seeing when I open that composition in Safari, I must say that it's a very splashy glitch. My wife caught a glimps in passing by and let out a big 'wow'. It appears to act quite normally with default settings in QC, however.

franz's picture
clear ?

no, when you open this comp in safari, what you see is not Z fighting. There's no clear patch apparently, so the buffer is not cleared, that's why you still see the previous frame (and all the others) underneath.

leegrosbauer's picture
yes, clear.

Yeah. I figured that out after examining the patch a bit more. I should have known because I've encountered clear-canceling (apparently) during image filter layering and have even focused on the phenomenon as a useful component of some of my filter stacks. The fact that it didn't also happen in quartz composer itself sort of confused me at first, but it shouldn't have. lol. Post first .. then think. ahahaha :-)

Which leads me to offer a patch suggestion. I'm assuming coding would be needed, which I can't do. Perhaps a pair of patches which, used in conjunction but not necessarily adjoining, would cause clear-canceling to occur in an image-filter stack in third party apps? The idea being that differing visualizations could occur depending on where the individual members of the patch pair were placed in the image layer hierarchy. I don't know about anybody else, but I would find it useful.

gtoledo3's picture
Definitely a clear problem,

Definitely a clear problem, as far as safari goes... I should know better. I didn't think about opening it up in safari.

That's a good question about how to emulate that standardly. You can't get the same effect by not putting a clear in a render... that is just a glitch out. It seems like you could probably get this effect with replicate in time, but I'm not sure...

cwright's picture

It's rather lame that QC isn't implemented consistently in each environment -- I bump into this sometimes, and even had to hack in some special magic in QuartzCrystal 1.3 to make it clear between each frame (otherwise, clear-less compositions would mis-render and look wonky).

In the QC Editor, your viewer is cleared every frame, whether you like it or not (In Tiger, there was an option to disable this, but no longer in Leopard+). You can hack around this limitation by using a Render In Image patch -> billboard.

Most other environment don't seem to perform the clear stuff...

leegrosbauer's picture
redundant post removed by author

Sorry about that. I had misplaced it in the discussion.

gtoledo3's picture
Hmm, when I have done render

Hmm, when I have done render in image to billboard without a clear, I typically get this crappy thing where I get parts of my desktop in the image in a checkerboard fashion, not this kind of feedback thing (which actually would be semi cool in certain scenarios!).

I think I agree with Lee on this one as far as potential coolness (I could imagine how this would look with a starry sky... you could possibly get that "warp drive" effect)... I have also been thinking about putting in a feature request for an accumulator that can transfer color that is inside of the accumulator... perhaps there is some overlap here?

gtoledo3's picture
Also... why the heck is it

Also... why the heck is it that I can't use the composition loader (Apple's thing, so I should probably post this on the developer group) to load qtz's off of the web? I tried in vain to load this composition off of kineme, just to see what would happen. I even have an example of their's that doesn't work. Did this get lopped off when they reduced web capability/took away flash support, etc., to patch security?

If they took these functions away (the composition loader working in all cases, as well as the option to have the image "feedback" like this)... are they still buried in there somewhere? Will the safe modes plugin let the composition loader work correctly for url's?

cwright's picture

To get feedback, you need to set some settings on the render in image -- by default, it just provides vram garbage, as you noted.

Here's an example:

Teapots of Insanity.qtz6 KB

leegrosbauer's picture

Well heck! I'll just use that, then. You can ignore my previously posted babbling which appears below. ;-)

gtoledo3's picture
Instant inspiration!

Instant inspiration!

particle wreath upload kineme.qtz8.15 KB

leegrosbauer's picture
heh. That's it, George!

heh. That's it, George! Check the OtherBubbles and √Čtude8 videos that I posted on vimeo a few months back. :-)

gtoledo3's picture
Oh I know, that's why I

Oh I know, that's why I posted it for you. :o)

leegrosbauer's picture
ha! Thanks :-)

ha! Thanks :-)

gtoledo3's picture
Actually, this was the first

Actually, this was the first thing I did with what Chris just posted, which is probably closer to what you were doing Lee... the post above toggles the clear off and on, which erases the feedback every so often, whereas this one doesn't and also doesn't use an image input for the particles...

You know, I hate this, because I know that I have actually been down this road before on the feedback thing, and had this answered or read some old QC Developer post, but just totally forgot... It's all too much for my feeble brain to remember sometimes. :o)

particle wreath.qtz6.95 KB

leegrosbauer's picture
to clarify

That's similar. The only comment I can think to add is that I was attempting to suggest a setup in which an image filter effect/composition in one layer affects the clear function in a different image filter effect/composition in another layer while still allowing for at least partial image presentation from both. That's what was happening in the image stacks shown in the videos that I refered to. It may well be possible with the Render in Image>Billboard scenario that Christopher presented (I don't know yet) but if it's not possible I would stand in support of my original suggestion. That's where the versatility can manifest itself.

I do realize that we mostly deal with single compositions in our discussions here, but in broader usage there's a lot of layering that happens. Hence the suggestion.

(It may also just be that I've misunderstood what was actually occuring in my layers. Could be that they were simply over-riding each other to varying degrees as movement or changing opacity levels occurred.)

gtoledo3's picture
I'm going to reply to it

I'm going to reply to it anyway to mark it for posterity :o)

This feedback is amusing the heck out of me.

I need to do a md2 of a karate guy with just the arms moving... to get that classic "arms blurring feedback while rest of body stays still" look from the old kung-fu/karate movies. That has been in my head to do that one day with quartz crystal motion blur, but I see that it could be done differently with this.

This file is Chris's kineme3D battle scene basically, with the feedback and a little 3D transformation y axis spin to kind of make the feedback more dramatic... I am easily amused I guess...

I'm not including the models or pics... just plop it in a folder with the kineme3D stuff and the relative paths should work.

battle feedback.qtz12.36 KB

psonice's picture
feedback fun

Feedback can be tons of fun. As well as doing it the way you are, try using a normal render in image with particles or whatever in it, then feed back the output of the render in image to a billboard inside the render in image (so whatever you're rendering becomes the background for the next frame, like now).

Then mess about with the feedback image.. scale it up a little to get a zoomblur type feedback, add some rotation, whatever. Blur it, sharpen it, add a little noise...

For a good idea of what you can do with feedback + imagination, check the effects at the start of this demo (grab the video if you don't have a windows box with a decent video card): http://www.pouet.net/prod.php?which=34517

leegrosbauer's picture

Looking around for the scratch to pony up for the 3D plug. I'll respond soon.

Regarding feedback: the Spooky patches are great for assisting with that, especially notable when used between different compositions in the same application.

leegrosbauer's picture
Spooky feedback between compositions

Separate image filter compostions layered in the following order, earliest to latest: Gradient, Spooky Receive, Particle System, 2nd Particle System, CIProSharpen, Spooky Send, Pinch. I tried to keep it subdued. I can't post a unique file because it's a stack of them. I dunno what the black borders are about .. they don't appear for me at Vimeo.

gtoledo3's picture
You are right about the

You are right about the effect of feedback being very cool... I love the accumulator. As a matter of fact, I believe that some of my first posts here were probably some compositions with the accumulator and kineme textures. I was first interested in QC by the accumulator stylized video filters, and CI filters, and the concept of designing purely video filtering chains ( somehow I totally drifted away from the initial idea!).

That's a really interesting idea about the feeding back to the billboard... I'm going to have to try it as soon as I finish a quartz crystal rendering I am doing (not that I couldn't now, but this one is HD 4x anti-aliasing on a fairly intensive qtz, so QC probably won't run too well).

I love the stuff that Adrien Mondot does with the feedback typography. If I get that going, I am so going to wantonly use that... with credit for inspiration of course ;o) It always seemed to me like Memo's "roots" probably uses some variation on this technique... I dunno.

gtoledo3's picture
Now that is way

Now that is way interesting... you are saying that you can use the spooky patch to work between qtz's that are running at the same time? I had no idea! I have to say, I don't tend to use that patch because I don't mind noodle-age, and I thought that was all it was about.

leegrosbauer's picture

gtoledo3 wrote:
Now that is way interesting... you are saying that you can use the spooky patch to work between qtz's that are running at the same time?

Yes. Between seperate qtz's running at the same time in the same application. It's mentioned somewhere in conjunction with the plugin, I think. Great for value synchronization as well as image feedback, needless to say.

gtoledo3's picture
This has gotten very far off

This has gotten very far off of the original flat shading thing... but I wanted to post this, since it came out of the discussion and I left in Chris's random color and lfo setup... I liked the way changing up the lfo added to the pattern on this. The particle system is somewhat like the concept of that audio visualizer I posted a bit ago... I just like that gradient I guess!

... There is a v002 zoom blur in the qtz., because I think it can look cool attached to the image mask on the billboard, and there is also a setup inside of the render that can be used to clear the feedback periodically if desired. This video render has neither of those. They aren't attached, I just left them in there for reference of some interesting alternatives.

One thing that I liked about this was the way toggling the blend modes works with feedback, and it gets bright, then it looks like it gets filled in. It kind of reminds me of when you paint and mix colors, and they swirl initially. If only the amoeba looking things could retain this look and move without feeding back further.

I'm not putting a friggin' note inside of this qtz... if you find it use it in this form substantially, I can give you an indian burn, or whatever I deem to be of appropriate compensation upon my whim... I have no idea how cruel Chris may be for useage of his snazzy random colors and lfo's.

...actually, here is another, just to post the feedback examples I just uploaded to vimeo that use Chris's setup, before I started experimenting with lopping it off :o)

I dunno why, but I always tend to use interpolation for movement, but one thing I notice is that has limited me, because I could be getting some more "action" out of using lfo and toggling some modes. I don't use that here, but I was messing with it and like the way that the different waveforms effect movement.

petri.qtz9.84 KB
particle wreath upload kineme2.qtz8.46 KB

toneburst's picture

I think Roots is more likely to be some kind of L-System type thing. It's similar to feedback in that it's an iterative process, but there's a bit more to it. I've seen a lot of Processing sketches based on L-Systems of various sorts.



toneburst's picture

I think it was more like what George did in that last clip. So scrub my last comment. L-Systems are cool though...


gtoledo3's picture
lol... yeah, you could

lol... yeah, you could probably go into that one comp, take away the color, reign in some parameters, perhaps set it so that add and blend flip back and forth fast for that blink look.

Come to think of it you could this up to only feedback or present image when there is touch, and also control the positioning with a trackpad or whatever... that might be cool. I have no clue if that's what Roots is, but it would probably look really similar.

cwright's picture

Lee, I have to say, I checked some of these feedback compositions a bit ago on vimeo, and failed to realize that they were yours until I saw this one. They're stellar, I really like the way you've applied the effects. Very beautiful.

leegrosbauer's picture

Thanks so much, Chris.

Kudos to you for creating such nice environment here at Kineme. Your software is interesting and the community here is friendly and helpful. It's a pleasure to be participating.

psonice's picture
feedback galore!

Couldn't resist, had a big play with feedback effects. Probably not advisable to watch this one if you're epileptic =)

There's quite a few different effects, and it cycles through.. use the parameters to control the effect change speed and the zoom speed. And of course, modify it in anyway you want, and post up the results ;)

edit - plays perfectly in the browser! Suggestion for improvement - replace that particle system with something decent!

feedback.qtz17.67 KB

leegrosbauer's picture

Great feedback composition! Thanks!

Your usage of the CI Sharpen patches is worth noting, I think. In my own explorations, stumbling upon that CIProSharpen seemed to really add a lot to the study.

Very nice. Thanks again!

leegrosbauer's picture

one month .. one variation. heh.

gtoledo3's picture
That looks awesome, and so

That looks awesome, and so "liquidy". It reminds me of the 60's psychedelic light shows where they would use colored oils in little dishes, with projectors, and the stuff would splash around, but never "mix", so that the colors would remain separate... this is like a way cool updated thought on that. It looks so organic it's spooky.

leegrosbauer's picture
the 60's

indeed ... and I could have ended up with more peculiar muses than the Avalon Ballroom, I suspect. ;-)

Re the organics .. nothing too complicated going on there. That's just Apple's Pinch filter. Memo Akten's Msa_FrostedGlass is even better for achieving that particular look, imho.

gtoledo3's picture
Huh, interesting, I'll have

Huh, interesting, I'll have to check that out. I bet I have it on the HD somewhere already.... I have a habit of going on rabid qc downloading flings, and then never even looking at half the stuff.

leegrosbauer's picture
the other Pinch

You know, it occurred to me that there are two Apple Pinch filters. I use this one: HD>System>Library>Compositions>Pinch.qtz

Memo's filter is better, but it will also apply the distortion to the image edges when used stand-alone in a layer. However, the final rendering could always be zoomed up a hair so the edges aren't visible, I guess.

gtoledo3's picture
Thanks for the reminder

Thanks for the reminder about those... as amazing as it may sound, I had totally forgotten about those comps! I mean, I looked at them plenty when I was first learning about QC, but I just forget about them as "apple examples" of their thoughts about how to do things. There are some interesting thoughts in there.

leegrosbauer's picture
system integration

As they relate to the operating system ... those are mostly all working compositions, I think. It's fairly clear that the bulk of the Photo Booth effects appear to be originating from that particular repository, anyway.

jersmi's picture
thank yous all around, again

these feedback qtz's are really nice. another example of how much i love the kineme site-- so lively and active! i am learning a ton.

feedback is in the air, i guess-- i'm enjoying building some feedback related patches for a video piece to accompany a dance performance in San Francisco March 5/6/7. this post is perfect timing-- the spooky patch tip is right on target. and i just watched a vimeo tutorial on feedback using the mentioned render in image/billboard technique (was that toneburst? seemed to lead to his site...)

and i promise i'm not a stealer! :) besides, it's content that guides my choices, more than process. not to mention i can't look the appreciative masses in the eye if i didn't make the stuff, even it is a newb repeat of some of the awesome work already out there... i'll post if i come up with anything useful in the feedback dept, although i'm still a little shy when it comes to this bunch. :)