VEGAS Pro 19 update build 458 has new transition called as GL Transition (OpenGL Transitions).
There are 50 new presets of transition included, ready to be used... BUT, you can also add your own (😳😮), if you have coding skill like shown in https://gl-transitions.com/
Example 1
On the website you will find the missing transition "Heart" ( https://gl-transitions.com/editor/heart ).
This transition does not require any parameters. You can copy this transition to the textbox of your "default" preset. Give it a new name and save the preset with "Heart". Done.
You created a new transition. Cool... is'nt it?
Example 2
Next. You would like to extand an existing transition with additional parameters. For example... The preset "Bounce" for up and down exists. You would like to create the bounce from left to right. On the web site you will find the code with parameters. The default preset in VEGAS is not able to add new parameters on-the-fly...
No problem... remove the "uniform" and add some values (the default values are behind "//") with an ending semicolon.
vec4 shadow_colour = vec4(0.,0.,0.,.6); float shadow_height = 0.075; float bounces = 3.0;
The code below is only the physics (math) to bounce an object, to mix 2 frames with different pixel position and to draw a shadow.
If you change "x" and "y" position or invert the movement with 1-x or 1-y. You are done.
Bounce (Left to Right)
vec4 shadow_colour = vec4(0.,0.,0.,.6); float shadow_height = 0.075; float bounces = 3.0; const float PI = 3.14159265358; vec4 transition (vec2 uv) { float time = progress; float stime = sin(time * PI / 2.); float phase = time * PI * bounces; float x = (abs(cos(phase))) * (1.0 - stime); float d = uv.x - x; return mix( mix( getToColor(uv), shadow_colour, step(d, shadow_height) * (1. - mix( ((d / shadow_height) * shadow_colour.a) + (1.0 - shadow_colour.a), 1.0, smoothstep(0.95, 1., progress) // fade-out the shadow at the end )) ), getFromColor(vec2(uv.x + (1. - x), uv.y)), step(d, 0.0) ); }
Bounce (Right to Left)
vec4 shadow_colour = vec4(0.,0.,0.,.6); float shadow_height = 0.075; float bounces = 3.0; const float PI = 3.14159265358; vec4 transition (vec2 uv) { float time = progress; float stime = sin(time * PI / 2.); float phase = time * PI * bounces; float x = 1. - (abs(cos(phase))) * (1.0 - stime); float d = uv.x - x; return mix( mix( getToColor(uv), shadow_colour, step(d, shadow_height) * (1. - mix( ((d / shadow_height) * shadow_colour.a) + (1.0 - shadow_colour.a), 1.0, smoothstep(0.95, 1., progress) // fade-out the shadow at the end )) ), getFromColor(vec2(uv.x + (1. - x), uv.y)), step(d, 0.0) ); }
Example 3
Finally, you created you own transition like in example 2 and you would like to have your own sliders and parameters. This would also work.
The custom presets for this transition FX are stored in "C:\User\<username>\Documents\OFX Presets\de.magix_glTransition\Transition\"
So, you may want to save this preset, say, "C:\Users\<username>\Documents\OFX Presets\de.magix_glTransition\Transition\BounceRtoL.xml"
Start with this line first:
<?xml version="1.0" encoding="UTF-8"?>
Next, copy the bounce OfxPreset and give it a new name (name="Bounce (Right to Left)"). You can reuse the bounce parameter and you only have to change your code in OfxParamTypeString name="GLSLString".
<OfxPreset plugin="de.magix:glTransition" context="Transition" name="Bounce (Right to Left)"> <OfxPlugin>de.magix:glTransition</OfxPlugin> <OfxPluginVersion>1 0</OfxPluginVersion> <OfxParamTypeInteger name="IsPreset"> <OfxParamValue>14</OfxParamValue> </OfxParamTypeInteger> <OfxParamTypeDouble name="kParamFloat0"> <OfxParamValue>0.075</OfxParamValue> </OfxParamTypeDouble> <OfxParamTypeDouble name="kParamFloat1"> <OfxParamValue>3</OfxParamValue> </OfxParamTypeDouble> <OfxParamTypeRGBA name="kParamVec40"> <OfxParamValue>0 0 0 0.6</OfxParamValue> </OfxParamTypeRGBA> <OfxParamTypeString name="kParamFloat0Name"> <OfxParamValue>Shadow Height</OfxParamValue> </OfxParamTypeString> <OfxParamTypeString name="kParamFloat1Name"> <OfxParamValue>Bounces</OfxParamValue> </OfxParamTypeString> <OfxParamTypeString name="kParamVec40Name"> <OfxParamValue>Shadow Color</OfxParamValue> </OfxParamTypeString> <OfxParamTypeString name="GLSLString"> <OfxParamValue> // Author: Adrian Purser // License: MIT uniform vec4 kParamVec40; // = vec4(0.,0.,0.,.6) uniform float kParamFloat0; // = 0.075; [0.01,0.4] uniform float kParamFloat1; // = 3.0 [0.1, 10] const float PI = 3.14159265358; vec4 transition (vec2 uv) { float time = progress; float stime = sin(time * PI / 2.); float phase = time * PI * kParamFloat1; float x = (abs(cos(phase))) * (1.0 - stime); float d = uv.x - x; return mix( mix( getToColor(uv), kParamVec40, step(d, kParamFloat0) * (1. - mix( ((d / kParamFloat0) * kParamVec40.a) + (1.0 - kParamVec40.a), 1.0, smoothstep(0.95, 1., progress) // fade-out the shadow at the end )) ), getFromColor(vec2(uv.x + (1. - x), uv.y)), step(d, 0.0) ); } </OfxParamValue> </OfxParamTypeString> </OfxPreset>
Save the file as XML (uft8 encoded) in the folder mentioned above ("C:\User\<username>\Documents\OFX Presets\de.magix_glTransition\Transition\").
Done.