openFrameworks addon to apply LUT filters live from standard .cube files using a GPU shader.
README
ofxGpuLutCube
openFrameworks addon to apply
LUT (Color Lookup Table) filters with a GPU shader using standard .cube files. (sizes 16, 32, 64)All process is done live and fast into the GPU
It's faster than other alternatives that use the CPU. (like the bundled
openFrameworks\examples\graphics\lutFilterExample)Inspired from: https://github.com/yasuhirohoshino/ofxGpuLut that does the almost same GPU process but with special
.png files.An useful Windows-only free app to batch convert and create LUT files: https://grossgrade.com/
Screenshots
Usage
ofApp.h
#include "ofxGpuLutCube.h"
ofxGpuLutCube GpuLutCube; ofApp.cpp
//setup()
GpuLutCube.setup();
//update() or draw()
GpuLutCube.begin();
{
//draw and feed your scene here
}
GpuLutCube.end();
//draw()
GpuLutCube.draw();//gui
GpuLutCube.drawGui();
//help
GpuLutCube.drawHelp();
//helper methods
GpuLutCube.loadNext();
GpuLutCube.loadPrevious();
GpuLutCube.loadLut(int i);
GpuLutCube.loadRandomize();Features
- Browsing LUT files folder using GUI or keys.
- Easy integration into your
ofAppwith anofParameterGroupand anofxGuipanel - Float parameter to set filter mix/dry.
- Int parameter to select
LUT index. - String parameter to show
LUT name. - Included example with
/data/files (291.cubefiles + shader files).(Remember to include ``/data`files!) - Two testing images. Left/Right keys to select images.
Tested system
- OF 0.11
- Visual Studio 2017
About
Addon modifications by MoebiusSurfing https://github.com/moebiussurfing
Based on and using the code of HUBRIS: https://github.com/youandhubris/GPU-LUT-OpenFrameworks https://forum.openframeworks.cc/t/gpu-lut-photoshop/18070
BY HUBRIS [http://cargocollective.com/hubris] [http://github.com/youandhubris]
THANKS to @johanjohan: https://github.com/johanjohan to point me to this source here: https://github.com/yasuhirohoshino/ofxGpuLut/issues/3
pow2 snippet from @johanjohan.
THANKS to: https://github.com/yasuhirohoshino for the original https://github.com/yasuhirohoshino/ofxGpuLut
TODO:
- Set custom draw position and size (x, y, w, h).
- A better solution to realtime vertical flip that sometimes happens.
- To not use internal FBO or add getter/setter to use by reference.
- A faster loader of files, threaded or cache some files.
- Settings to store/load LUT by name.
- .cube
files browser system and thumbs maybe withofxImGui`.
ofxAddons