GithubHelp home page GithubHelp logo

moebiussurfing / ofxgpulutcube Goto Github PK

View Code? Open in Web Editor NEW
12.0 3.0 0.0 25.4 MB

openFrameworks addon to apply LUT filters live from standard .cube files using a GPU shader.

License: MIT License

Makefile 0.07% GLSL 2.51% C++ 96.62% PowerShell 0.53% Batchfile 0.27%
openframeworks cpp openframeworks-addon

ofxgpulutcube's Introduction

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

Alt text Alt text Alt text Alt text Alt text

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 ofApp with an ofParameterGroup and an ofxGui panel
  • 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 .cube files + 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:
yasuhirohoshino/ofxGpuLut#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 with ofxImGui.

PLEASE FEEL FREE TO ADD MODIFICATIONS/ISSUES/FEATURES AND TO SEND ME PULL REQUESTS

License

MIT License.

ofxgpulutcube's People

Contributors

moebiussurfing avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.