| Author |
Message |
| < Quartz Composer ~ OpenCL examples |
|
Posted:
Mon Sep 07, 2009 11:32 am
|
|
|
Joined: 26 Jan 2008
Posts: 4
|
|
Greetings,
Anybody tried the snow leopard quartz composer openCL stuff in VDMX yet? I had a bit of a play over the weekend and got the 2D Fluid Simulator working quite well. I'll post an example vdmx plugin later, though it will only work if you have an openCL-compatible GPU, as CPU fallback for OpenCL in Quartz Composer is presently broken. |
|
|
|
|
|
 |
|
Posted:
Tue Sep 08, 2009 4:25 pm
|
|
|
Joined: 26 Jan 2008
Posts: 4
|
|
| Sorry I didnt get a chance to post this yet, will try to do so in the next few hours. |
|
|
|
|
|
 |
|
Posted:
Tue Sep 08, 2009 5:29 pm
|
|
|
Joined: 26 Jan 2008
Posts: 4
|
|
OK I will be posting it in a few minutes.
First thing to note is that this will only work if your machine has openCL compatible graphics card and you are on snow leopard. I also get the idea from a few posts on the internet, that there could be issues using this with the couple of ATI cards that are supposed to do OpenCL in snow leopard. There could also be memory leaks, so consider this stuff experimental.
As for the composition itself, it is not very complicated and may be a bad example of how to use the 2D Fluid Simulation virtual macro that Apple supplied with QC in snow leopard, but its a start and it sometimes gives interesting results.
I based the patch on the one that visualchemy did for vade excellent Optical Flow plugin. As with the vdmx composition for Vades optical flow, there are options for whether it uses the layer image to generate the velocity, or you can select another image source. Some of the controls for it could probably be improved, you may have to mess with the sample and reset buttons before it starts doing anything, and maybe the slider for speed should start off on a lower value. Ive also kobbled the resolution that the 2D Fluid simulator works at to maintain a reasonable framerate on laptop-class graphics (8600M GT in my case). If you want to try higher resoultions, change the res of the render in image patches.
As I mention, there may be better ways to use this in VDMX than my test patch provides, and ther is also an Optical Flow patch included in snow leopard that I should process the velocity input image with, but I didnt get round to experimenting with that yet and I fear it may hamper framerate further.
Now that Ive done a reasonable job of putting people off trying this patch, oops, I shall get on with uploading it. |
|
|
|
|
|
 |
|
Posted:
Tue Sep 08, 2009 5:58 pm
|
|
|
Joined: 26 Jan 2008
Posts: 4
|
|
OK its at:
http://www.mutantquartz.com/FluidCL.zip
Im sure it could be improved in various ways as mentioned earlier, and I also noticed that to change res you change the 2 image resize patches, not render in image ones that I mentioned earlier. I was thinking of a different test I did which was to make an itunes visualizer using the same principal. I can post that too if anyone is interested.
Tips for use: One way to use it is to switch sampling off, turn down the speed and the quickly toggle the reset button.
If your source consists of mostly black but something very small moving around, try leaving sampling on. If your source image is only visible once in a while, and at other times the input image is blank, you may also get some good results by leaving sampling on. Depending on image inputs and settings, effects may range from nasty mess, to nice slow moving smoke, to very fast moving fluid. |
|
|
|
|
|
 |
|