GPU

Worley Cellular Voronoi Noise (Composition by gtoledo3)

Author: gtoledo3
License: MIT
Date: 2013.04.06
Compatibility: 10.5, 10.6, 10.7, 10.8
Categories:
Required plugins:
(none)

This shader is something I've wanted to do for a long time; a gpu-accelerated voronoi type image filter.

This uses the concept I was thinking of here (http://kineme.net/forum/Programming/StencilbufferinQC#comment-25903) . As I was making it, I realized it would be interesting to also have a mode where the randomness of the grid was controlled by luminosity, so there are a couple of modes for that.

Parameters: -distFormula: This changes the distance formula used for the voronoi computation from linear to "manhattan".

-lightMode: This changes the shader from a flat look, to a simple gradient "lighting" look, to a more complex "lighting" look with adjustable normals, and finally a normal output of the complex look.

-displaceMode: This controls whether the grid noise is triggered by brightness, darkness, or it's a constant value.

-displaceAmt: This controls how much each cell is displaced. With the luminosity displace modes, it's a multiplier, with the constant mode, it's constant.

-density: This controls the density of the voronoi grid.

-uvOffset and Zoom: I've added this because of the nature of the worley algorithm, cells at the top and side can sometimes be right where the texture repeats. A little zoom in and recenter solves this.

-normAdj/normAdjA/B/C - This is only active with the last two lighting modes. This changes the shape of the voronoi facets.

Enjoy. Please give credit if you use it, and also note that it's MIT licensed. The sample composition uses GL Tools, because it renders to a Quad, but if you don't have it installed, just use a Billboard/Sprite/whatever.

CINormalMap_gt (Composition by gtoledo3)

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

This is a core image filter that takes a greyscale heightfield (bump map) image, and outputs a normal map, in the style of nVidia Normal Map Filter plugin for photoshop, or NMG.

This allows one to create greyscale imagery in Quartz Composer, run image through this filter, and generate normals that can be rendered in the GLSL shader. This example uses Christopher Wright's Normal Map 1.qtz as a rendering destination, to show how it works.

Normal mapping is used to fake the appearance of a higher poly mesh than is actually being used when using GL Lighting.

http://en.wikipedia.org/wiki/Normal_mapping

QC killing my GPU?

Veiss's picture

I've been using QC for about 7 months, and have had to restart my computer at least 25 times from QC crashing it, or rather me triggering crashes by putting in some value in a parameter that sends it over the top... However lately its seemingly worse. Sometimes it's triggered by simple things that wouldn't normally cause it to crash. Most recently while working with the OpenCL text extrusion composition. After a few crashes it wont even let me plug an image into the vertex displacement macro without crashing it. Upon restart and trying again I had some GUI glitching that didn't go away after closing quartz. By Crash I mean the computer. Have other users experienced much of this sort of thing?

Running a mid 09 macbook pro with the 9600M GT and 3.06GHz Processor. Some of this stuff really shouldn't be causing it to crash the computer. Especially when it didn't before..

Thoughts? Thanks