Code Monkey home page Code Monkey logo

olive-editor-community-effects's Introduction

Olive-Editor-Community-Effects

A community effort to populate effects for Olive-Editor. Should work from the Olive Editor continuous build after Mar 29, 2019.

Current STATUS: IN HALT. DUE TO STRUCTURE CHANGES IN OLIVE. CODES WILL BE REFACTORED AFTER OLIVE IS CONFIRMED WITH STRUCTURE CHANGES. THANKS.

Install:

  • Download the zip file and extract it.
    • Inside there is Olive-Editor-Community-Effects-master

For Windows and Mac:

  • Open the Olive-Editor installation/portable directory. There is a folder named effects
  • Copy the extracted folder named Olive-Editor-Community-Effects-master
  • Paste it in Olive's effects folder (for MAC it's probably Effects)

For Linux

  • Open this location: ~/.local/share/olivevideoeditor.org/Olive
  • Create a folder name effects
  • Copy the extracted forlder named Olive-Editor-Community-Effects-master
  • Paste it in Olive's effects folder.

For individual effect downloads:

  • Click in the effect folder you want to download
  • Copy the link and paste in http://kinolien.github.io/gitzip/ to download
  • Extract the zip and copy-paste the extracted folder just like above

MUST: you have to make sure the folder COMMON is present in your effect folder means you should download the COMMONfolder at least once for individual download.


Effect List:


If you want to contribute some effects here please fork it and pull a request. It will be merged.

Thanks.

olive-editor-community-effects's People

Contributors

cgvirus avatar foss365 avatar

Stargazers

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

Watchers

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

olive-editor-community-effects's Issues

Effects for GLSL 1.20 (ports for older GPUs)

Is it possible port some official Olive effects for older OpenGL?

For example, "Toonify" (built-in effect)

It not work for me; here is terminal output:

...
2019-04-11T13:18:37 [INFO] Vertex shader added successfully
2019-04-11T13:18:37 [WARNING] QOpenGLShader::compile(Fragment): 0:1(10): error: GLSL 1.50 is not supported. Supported versions are: 1.10, 1.20, and 1.00 ES

2019-04-11T13:18:37 [WARNING] *** Problematic Fragment shader source code ***
#version 150
#define lowp
#define mediump
#define highp
#line 1
uniform sampler2D tex0;
in vec2 vTexCoord;
out vec4 FragColor;

uniform float colors; // 12.0
uniform float sat_levels; // 4.0
uniform float bri_levels; // 4.0
uniform float edge_thres; // 0.2;
uniform float edge_thres2; // 5.0;

vec3 RGBtoHSV( float r, float g, float b) 
{
	 float minv, maxv, delta;
	 vec3 res;

	 minv = min(min(r, g), b);
	 maxv = max(max(r, g), b);
	 res.z = maxv;            // v
	 
	 delta = maxv - minv;

	 if( maxv != 0.0 )
			res.y = delta / maxv;      // s
	 else {
			// r = g = b = 0      // s = 0, v is undefined
			res.y = 0.0;
			res.x = -1.0;
			return res;
	 }

	 if( r == maxv )
			res.x = ( g - b ) / delta;      // between yellow & magenta
	 else if( g == maxv )
			res.x = 2.0 + ( b - r ) / delta;   // between cyan & yellow
	 else
			res.x = 4.0 + ( r - g ) / delta;   // between magenta & cyan

	 res.x = res.x * 60.0;            // degrees
	 if( res.x < 0.0 )
			res.x = res.x + 360.0;
			
	 return res;
}

vec3 HSVtoRGB(float h, float s, float v ) 
{
	 int i;
	 float f, p, q, t;
	 vec3 res;

	 if( s == 0.0 ) 
	 {
			// achromatic (grey)
			res.x = v;
			res.y = v;
			res.z = v;
			return res;
	 }

	 h /= 60.0;         // sector 0 to 5
	 i = int(floor( h ));
	 f = h - float(i);         // factorial part of h
	 p = v * ( 1.0 - s );
	 q = v * ( 1.0 - s * f );
	 t = v * ( 1.0 - s * ( 1.0 - f ) );

	 switch(i) 
	 {
			case 0:
				 res.x = v;
				 res.y = t;
				 res.z = p;
				 break;
			case 1:
				 res.x = q;
				 res.y = v;
				 res.z = p;
				 break;
			case 2:
				 res.x = p;
				 res.y = v;
				 res.z = t;
				 break;
			case 3:
				 res.x = p;
				 res.y = q;
				 res.z = v;
				 break;
			case 4:
				 res.x = t;
				 res.y = p;
				 res.z = v;
				 break;
			default:      // case 5:
				 res.x = v;
				 res.y = p;
				 res.z = q;
				 break;
	 }
	 return res;
}

// averaged pixel intensity from 3 color channels
float avg_intensity(vec4 pix) 
{
 return (pix.r + pix.g + pix.b)/3.;
}

vec4 get_pixel(vec2 coords, float dx, float dy) 
{
 return texture(tex0,coords + vec2(dx, dy));
}

// returns pixel color
float IsEdge(in vec2 coords)
{
	float dxtex = 1.0 /float(textureSize(tex0,0)) ;
	float dytex = 1.0 /float(textureSize(tex0,0));
	float pix[9];
	int k = -1;
	float delta;

	// read neighboring pixel intensities
	for (int i=-1; i<2; i++) {
	 for(int j=-1; j<2; j++) {
		k++;
		pix[k] = avg_intensity(get_pixel(coords,float(i)*dxtex,
													float(j)*dytex));
	 }
	}

	// average color differences around neighboring pixels
	delta = (abs(pix[1]-pix[7])+
					abs(pix[5]-pix[3]) +
					abs(pix[0]-pix[8])+
					abs(pix[2]-pix[6])
					 )/4.;

	//return clamp(5.5*delta,0.0,1.0);
	return clamp(edge_thres2*delta,0.0,1.0);
}

void main() {
	vec2 uv = vTexCoord.xy;
	vec4 tc = vec4(1.0, 0.0, 0.0, 1.0);
	vec3 colorOrg = texture(tex0, uv).rgb;
	vec3 vHSV =  RGBtoHSV(colorOrg.r,colorOrg.g,colorOrg.b);

	// hue limiting	
	if (colors == 0.0) {
		vHSV.y = 0.0;
	} else {
		float hue_divider = (360.0/colors);
		vHSV.x = round(vHSV.x/hue_divider)*hue_divider;

		float sat_divider = 100.0/sat_levels;
		vHSV.y = round((vHSV.y*100.0)/sat_divider)*sat_divider/100.0;
	}

	float bri_divider = 100.0/bri_levels;
	vHSV.z = round((vHSV.z*100.0)/bri_divider)*bri_divider/100.0;

	float edg = IsEdge(uv);
	vec3 vRGB = (edg >= (1.0-((edge_thres-1.0)*0.01)))? vec3(0.0,0.0,0.0):HSVtoRGB(vHSV.x,vHSV.y,vHSV.z);
	tc = vec4(vRGB.x,vRGB.y,vRGB.z, 1);
	FragColor = tc;
}
***
2019-04-11T13:18:37 [WARNING] Fragment shader could not be added

Information about new OpenGL pipeline

As has been mentioned previously here and on the original repo, there's a new OpenGL pipeline that's close to being merged in and these effects will need to be modified for that so I thought I'd start some discussion.

The main differences will be no common.frag or common.vert and the function will have to be in the form of:

vec4 process(vec4 color) {
    return changesTo(color);
}

rather than:

void main(void) {
    gl_FragColor = changesTo(color);
}

You can see an example of this here: https://github.com/olive-editor/olive/blob/furtherocio/effects/shaders/boxblur.frag

Additionally the compositing will all occur in scene-referred linear color space, as opposed to the current unmanaged color space. I'm not yet sure whether the effect will work in scene-linear without modifications, but it'll be something to look into once the branch is ready for merging.

Project Dead?

This hasn't been updated in 4 years, so it looks dead and incompatible with version 0.2.0 and later builds.

adding effects to ~/.local/share/ ... does not work [Linux]

Greetings,
[Update, skip down to update - snap install issue..]
Added directory as per document:
mkdir -p ~/.local/share/olivevideoeditor.org/Olive/effects

I added the effects directory to the created directory:
~/.local/share/olivevideoeditor.org/Olive/effects
with result:
~/.local/share/olivevideoeditor.org/Olive/effects/Olive-Editor-Community-Effects-master

The permissions were opened up for director also have no effect:
sudo chmod -R ug+rwx ~/.local/share/olivevideoeditor.org

I do not see the community effects in the effects options menu

Added new sequence added, added Solid color, selected it, no community effects menu items in effects menu list

UPDATE:
After review I have installed using snap, so it has a different reference point for inclusion:

/snap/olive-editor/2/share/olive-editor/effects

which is read-only, so you can't tamper with that mount point of read only, so it remains you have to install in the local home reference point for snap like:
ls -la ./snap/olive-editor/2/.local/share/olive-editor/

after putting in try to add effects there like:
./snap/olive-editor/2/.local/share/olive-editor/effects/Olive-Editor-Community-Effects-master
or
./snap/olive-editor/2/.local/share/olive-editor/Olive-Editor-Community-Effects-master

still no go.

How does one add the effects with a snap install?

System wide install of Community Effects?

Hi

Can someone tell me if there is a global system location that I can install the Olive-Editor-Community-Effects instead of in each users home folder?

I have tried /usr/local/share/olive-editor/effects/ and /usr/share/olive-editor/effects/ to no effect

I have built olive from the 0.1.2 release source code and built and running on Aarch64 Linux system (custom OS for Arm TV Box)

[Suggestion] An effect to add "Text Border/Outline" to the Rich Text.

Text Shadow is not enough. It would be so great to have an effect that would add borders
and you could change textborder size.

EDIT: Uh, the Olive Video Editor 0.1 Alpha seems to have it already for Text Filter, but not Rich Text.
image

Uh but it still do not have Outline Opacity option.
Or an option of Outline Blur. (However it could be made as entirely seperate Filter Effect)

[suggestion] Effect organization

If this repo grows, it would be a little overwhelming if all of the .xml and .frag files are on the same folder. The user should be able to easily pick and choose the effects they want to add, and I think a good way would be to split effects into different folders.

Downside is that the effect developer will need to refer to ../common.vert (included with the repo) or ../../common.vert (incuded with Olive) in their xml files.

Also would the common.vert file in the repo be compatible with Olive if a later version updates it? I'm afraid that it might break color or something.

Bloom Shader?

Is it possible to implement a glare shader with parameters such as threshold, radius, and intensity?

Thanks for your work on this, makes Olive more fun to edit :)

"Denoise" not work

Here is terminal log:

...
2019-04-11T13:25:09 [INFO] Vertex shader added successfully
2019-04-11T13:25:09 [WARNING] QOpenGLShader::compile(Fragment): 0:38(22): error: could not implicitly convert operands to arithmetic operator
0:38(18): error: no matching function for call to `min(error, float)'; candidates are:
0:38(18): error:    float min(float, float)
0:38(18): error:    vec2 min(vec2, float)
0:38(18): error:    vec3 min(vec3, float)
0:38(18): error:    vec4 min(vec4, float)
0:38(18): error:    vec2 min(vec2, vec2)
0:38(18): error:    vec3 min(vec3, vec3)
0:38(18): error:    vec4 min(vec4, vec4)
0:38(18): error:    int min(int, int)
0:38(18): error:    ivec2 min(ivec2, int)
0:38(18): error:    ivec3 min(ivec3, int)
0:38(18): error:    ivec4 min(ivec4, int)
0:38(18): error:    ivec2 min(ivec2, ivec2)
0:38(18): error:    ivec3 min(ivec3, ivec3)
0:38(18): error:    ivec4 min(ivec4, ivec4)
0:38(14): error: cannot construct `int' from a non-numeric data type
0:44(23): warning: `kSize' used uninitialized
0:46(9): warning: `kSize' used uninitialized
0:46(27): warning: `kSize' used uninitialized
0:54(14): warning: `kSize' used uninitialized
0:54(26): warning: `kSize' used uninitialized
0:56(14): warning: `kSize' used uninitialized
0:56(26): warning: `kSize' used uninitialized
0:59(52): warning: `kSize' used uninitialized
0:59(68): warning: `kSize' used uninitialized

2019-04-11T13:25:09 [WARNING] *** Problematic Fragment shader source code ***
#define lowp
#define mediump
#define highp
#line 1
/***

    Port of https://www.shadertoy.com/view/4dfGDH
    Adapted by CGVIRUS for the Olive-Editor Community

***/


uniform sampler2D tex;
varying vec2 vTexCoord;
uniform vec2 resolution;
const vec2 renderScale = vec2(1.,1.);

//Effects Parameter
uniform float sigma_s;
uniform float sigma_r;

#define MSIZE 30

float normpdf(in float x, in float sigma)
{
	return 0.39894*exp(-0.5*x*x/(sigma*sigma))/sigma;
}

float normpdf3(in vec3 v, in float sigma)
{
	return 0.39894*exp(-0.5*dot(v,v)/(sigma*sigma))/sigma;
}


void main()
{
	vec2 uv = gl_FragCoord.xy / resolution.xy;
	vec3 c = texture2D(tex, uv).rgb;
	{
		//declare stuff
		int kSize = int(min((MSIZE-1)/2., 1.5*(sigma_s*0.5)*renderScale.x));
		float kernel[MSIZE];
		vec3 final_colour = vec3(0.0);
		
		//create the 1-D kernel
		float Z = 0.0;
		for (int j = 0; j <= kSize; ++j)
		{
			kernel[kSize+j] = kernel[kSize-j] = normpdf(float(j), (sigma_s*0.5)*renderScale.x);
		}
		
		
		vec3 cc;
		float factor;
		float bZ = 1.0/normpdf(0.0, (sigma_r*.001));
		//read out the texels
		for (int i=-kSize; i <= kSize; ++i)
		{
			for (int j=-kSize; j <= kSize; ++j)
			{
				cc = texture2D(tex, uv + (vec2(float(i),float(j))) / resolution.xy).rgb;
				factor = normpdf3(cc-c, (sigma_r*.001))*bZ*kernel[kSize+j]*kernel[kSize+i];
				Z += factor;
				final_colour += factor*cc;

			}
		}
		
		
		gl_FragColor = vec4(final_colour/Z, texture2D( tex, uv ).a);
	}
}

***
2019-04-11T13:25:09 [WARNING] Fragment shader could not be added

"Bokeh Blur" not work

Here is terminal log:

...
2019-04-11T10:12:06 [INFO] Vertex shader added successfully
2019-04-11T10:12:06 [WARNING] QOpenGLShader::compile(Fragment): 0:43(13): error: no matching function for call to `texture2DLod(sampler2D, vec2, float)'; candidates are:
0:43(13): error: type mismatch

2019-04-11T10:12:06 [WARNING] *** Problematic Fragment shader source code ***
#define lowp
#define mediump
#define highp
#line 1
/***
    
    Bokeh disc. Fixed for Scaling and Noise, Optimized for MIPMAP
    
    Port of https://www.shadertoy.com/view/4d2Xzw by David Hoskins.
    Adaption and Implementation by CGVIRUS for Olive-Editor Community
        
    License Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
    
***/


uniform sampler2D tex;
varying vec2 uTexCoord;
uniform vec2 resolution;

#define USE_MIPMAP
#define GOLDEN_ANGLE 2.39996323


uniform float Samples;
uniform float Amount;
uniform float Exposure;

mat2 rot = mat2(cos(GOLDEN_ANGLE), sin(GOLDEN_ANGLE), -sin(GOLDEN_ANGLE), cos(GOLDEN_ANGLE));

vec3 Bokeh(sampler2D tex, vec2 uv, float radius, float amount)
{
    vec2 rscale = vec2(1.0,1.0);
    vec3 acc = vec3(0.0);
    vec3 div = vec3(0.0);
    vec2 pixel = (1.0 / resolution.xy)*rscale;
    float r = 1.0;
    vec2 vangle = vec2(0.0,radius); 
    amount += radius*5000.0;
    
    for (int j = 0; j < int(Samples); j++)
    {  
        r += 1. / r;
        vangle = rot * vangle;
        vec2 tuv = (uv + pixel * (r-1.) * vangle);
        vec3 col = texture2DLod(tex, tuv, radius*.8).xyz;
        col *= Exposure; 
        vec3 bokeh = pow(col, vec3(9.0)) * amount+.4;
        acc += col * bokeh;
        div += bokeh;
    }
    return acc / div;
}

void main()
{
    
    vec2 uv = gl_FragCoord.xy / resolution.xy;
    float a = 40.0;
    // uv *= vec2(1.0, 1.0);
    gl_FragColor = vec4(Bokeh(tex, uv, Amount, a),texture2D( tex, uv ).a);
    
    
}
***
2019-04-11T10:12:06 [WARNING] Fragment shader could not be added

I've made a simple despill effect for green screen

I've coded a simple despill effect for fixing gree nedges on green screen chorma-keyed footage for my own needs.

It lacks any configuration rigth now.

I'd like to make it work for R G or B channels, and allow controlling the influence and other things, but I don't know how to do that yet.

Here's the code:

despill.tar.gz

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.