openCL

Darktable OpenCL Project - Volume One (Composition by cybero)

Author: cybero
License: (Other — see description)
Date: 2013.08.21
Compatibility: 10.6, 10.7, 10.8
Categories:
Required plugins:
(none)

OpenCL Image Filters ported over from the Darktable source code kernels and header files into Quartz Composer.

Composition published under Free Document Licence http://cybero.co.uk/fdl.pdf.

Code redistributed under the GPL issued by its original author, Johannes Hanika in 2010.

Original Code Repository and Application site - http://darktable.org/

Filters are :-

colorcorrection
levels
colorzones
monochrome_filter
monochrome
lowlight
overexposed
exposure
highlights_1f
highlights_4f
flip
clip_rotate_lanczos3
clip_rotate_lanczos2
clip_rotate_bicubic
clip_rotate_bilinear
eaw_synthesize

libCL Image Filters (Composition by cybero)

Author: cybero
License: Creative Commons Attribution-NonCommercial-ShareAlike
Date: 2013.08.19
Compatibility: 10.6, 10.7, 10.8
Categories:
Required plugins:
(none)

Image Filters ported from libCL Project to Quartz Composer

Filters are

Bloom
BiLateral Sampler
Biltateral Grid
Ambient Occlusion
Tone Mapping
RGB to XYZ
XYZ to RGB
RGB to HSV
HSV to RGB
Quantize LAB
Normalize
Xor

Augmented Reality in OpenCL (Composition by M.Oostrik)

Author: M.Oostrik
License: Creative Commons Attribution
Date: 2011.07.21
Compatibility: 10.6
Categories:
Required plugins:
(none)

or

OpenCL Combined: Optical Flow, Fluid Simulation & Particle System

I wanted to have a similar flow functionality as Memo's ofxMSAFluid: http://memo.tv/ofxmsafluid.

Looking around a found almost all the functionality on or via kineme.net:

So it made sense to return the result.

Here it is! With a little run through in the attached video.

Note: I created this video using a geforce 480 (with 480 cores). The optical flow and fluid simulation have a resolution of 512x512 and there are 1.280.000 particles. (some visible, some not)

I'd appreciate feedback on optimal settings for your systems. (the attached patch has a resolution of 128 with 128.000 particles)

cheers!

new fluid sim adventures

gtoledo3's picture

I've been experimenting the concept of using motion vector fields to create dynamic lighting on the fly, in a an efficient way that makes use of parallel processing and image products that are typically generated when doing fluid sim.

With a fluid sim, or other things that you can analyze motion vectors from, it's conceivable to create an image output that shows the motion vectors, and using OpenCL, it's reasonable to get it going at a fairly high resolution in QC and still be speedy. By using a byproduct of the motion vectors at various points in the chain along with modification to those outputs, one can create different styles of, perhaps "over-hyped" but dramatic, normal maps that influences lighting.

By using the divergence, I'm finding that one tends to get a lighting look that reflects the surface of water, while also revealing stuff underneath. That's what gives the look of the darker, wetter looking parts of this clip.

By using the straight up motion vectors, the lighting tends to feel more integrated into the sim, without a surface tension thing going on. With muted light settings, it can look a bit cloudy, though can also look really wet when the ambient, specular, and main lighting settings are tweaked just so.

What I'm finding most novel out of it is the lighting method of normals being generated from motion, and that it works, looks cool, and doesn't add much more processing toll. The result feels like a hi-fi look for QC.

I'm outputting the liquid sim to cwright's normal map demo qtz 1 glsl shader, which is built to receive texture and normal map, to create the lit look. I'm also using Stoney Ballard's image to force as an easy way to get the motion going for the fluid sim... it's also pretty cool using the schema apple did for their wind tunnel to generate force.

I'm going to post this soon after I edit it some more, and add notes.

OpenCL Boids (Composition by M.Oostrik)

Author: M.Oostrik
License: (unknown)
Date: 2010.12.18
Compatibility: 10.6
Categories:
Required plugins:
(none)

---UPDATE 2.2---

  • fixed crash on changing boid or tail count
  • updated boid system so it makes more sense (at least to me ;)
  • cleaned up code and patch knots
  • dramatic increase of initiation time
  • (re)introduced some parameters

---UPDATE 2.1---

  • textured tails

Contributions by George Toledo.

  • correct function for line to triangle strip conversion
  • memory fence implementation (barrier(CLK_LOCAL_MEM_FENCE)

The purpose of this project was to get a better insight in OpenCL, it worked! For now i will work on other stuff, but in the future there will be new versions.

---ORIGINAL POST (2.0) ---

Dust and I were working on boids some months ago for a generative artwork. I got distracted by other projects, but recently i had some time to spare, so i decided to rewrite the code for the purpose of sharing. Here it is...

Sources:

  • The current Boid system is based on this C++ code by Christopher Kline.
  • My research started with this page from Conrad Parker. -Inspired by this demo. The inputs are very understandable and easy to handle.

Contributions by George Toledo.

  • GLpointstructure is replaced by a mesh renderer
  • Boids in trackball for superior visuals