Jeroen Bakker writes:
This year at the Blender conference, we demoed a new concept. Blender OpenCL Compositor. OpenCL (Open Computing Language) is a technical standard to use multiple type of processor units (like the ones that can be found on graphical cards) to perform computational tasks.
The test system is an I7 920 quad core (+- 280 EUR) with a GT 220 (+- 70 EUR !!!!). A mid-range processor with a mid-range graphical card. The test contains several heavy nodes like the bokeh blur and the Lens distortion. A bokeh blur of 50 by 50 pixels on the CPU took 204 seconds. Using the GPU the task only took 22 seconds! watch the video to see it for yourselves or test drive it on your system. This all sounds good, but there are some limitations.
Not all systems are capable running OpenCL, hence you need a fall-back to normal CPU. A normal implementation would be to implement two separated node systems. One for OpenCL, and the other as a fall-back to the CPU. As developers don’t want to maintain 2 compositor systems, we have designed a way to easily maintain both compositor implementations.
The current compositor system uses a lot of computer memory and is designed with a ‘shared memory model’ (a development model where all processor units can access all needed memory). OpenCL does not support this model. Other limitations are the limited amount of memory that can be used by OpenCL. This memory is limited to 25% of the total memory of the graphical card. This 25% is also used by the overhead of OpenCL.
We want to make this stable and integrate it in a future Blender version. Some aspects of this system are:
- More direct feedback to the artist. The final picture will be calculated and show to the user at the same time (final image will be build in front of the user).
- Usage of multiple graphics cards at the same time. If it is not quick enough, just a new graphics card.
- Introduction of a camera socket types and the “input camera file” node.
We are looking for artists and financial support to help us with the system.
This experimental version is released to get feedback from the community and as a benchmark between different OpenCL implementations. Please have fun with it. Be warned that this release is only for demo purposes. Nodes that are using OpenCL are:
- Defocus node (only color images are supported. Black white images do not work)
- Blur node (only when the bokeh check-box is checked)
- Color Balance
- Lens distortion
- And some smaller nodes: Brightness, Rotate, Tonemap
This version is only available for Linux 64 bit. To start the OpenCL compositor you have to start blender with the parameter “–enable-opencl”. There are some test blend-files and the patch is included.
Video: Battle between CPU and GPU
Video: Speedup of the defocus node