GL Transitions (VP19 update 3 (build 458) new feature) customization

set wrote on 12/25/2021, 4:06 PM

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.

Last changed by set

Setiawan Kartawidjaja
Bandung, West Java, Indonesia (UTC+7 Time Area)

Personal FB | Personal IG | Personal YT Channel
Chungs Video FB | Chungs Video IG | Chungs Video YT Channel
Personal Portfolios YouTube Playlist
Pond5 page: My Stock Footage of Bandung city

 

System 5-2021:
Processor: Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz   2.90 GHz
Video Card1: Intel UHD Graphics 630 (Driver 31.0.101.2127 (Feb 1 2024 Release date))
Video Card2: NVIDIA GeForce RTX 3060 Ti 8GB GDDR6 (Driver Version 551.23 Studio Driver (Jan 24 2024 Release Date))
RAM: 32.0 GB
OS: Windows 10 Pro Version 22H2 OS Build 19045.3693
Drive OS: SSD 240GB
Drive Working: NVMe 1TB
Drive Storage: 4TB+2TB

 

System 2-2018:
ASUS ROG Strix Hero II GL504GM Gaming Laptop
Processor: Intel(R) Core(TM) i7 8750H CPU @2.20GHz 2.21 GHz
Video Card 1: Intel(R) UHD Graphics 630 (Driver 31.0.101.2111)
Video Card 2: NVIDIA GeForce GTX 1060 6GB GDDR5 VRAM (Driver Version 537.58)
RAM: 16GB
OS: Win11 Home 64-bit Version 22H2 OS Build 22621.2428
Storage: M.2 NVMe PCIe 256GB SSD & 2.5" 5400rpm 1TB SSHD

 

* I don't work for VEGAS Creative Software Team. I'm just Voluntary Moderator in this forum.

Comments

set wrote on 12/25/2021, 4:07 PM

* Same as posted here: https://www.vegascreativesoftware.info/us/forum/vp19b458-gl-transitions-feature--133471/

* and as for gallery if you would like to share your unique transition to community, share here:

https://www.vegascreativesoftware.info/us/forum/gl-transitions-gallery-sharing-place-share-the-code-here--133472/

Setiawan Kartawidjaja
Bandung, West Java, Indonesia (UTC+7 Time Area)

Personal FB | Personal IG | Personal YT Channel
Chungs Video FB | Chungs Video IG | Chungs Video YT Channel
Personal Portfolios YouTube Playlist
Pond5 page: My Stock Footage of Bandung city

 

System 5-2021:
Processor: Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz   2.90 GHz
Video Card1: Intel UHD Graphics 630 (Driver 31.0.101.2127 (Feb 1 2024 Release date))
Video Card2: NVIDIA GeForce RTX 3060 Ti 8GB GDDR6 (Driver Version 551.23 Studio Driver (Jan 24 2024 Release Date))
RAM: 32.0 GB
OS: Windows 10 Pro Version 22H2 OS Build 19045.3693
Drive OS: SSD 240GB
Drive Working: NVMe 1TB
Drive Storage: 4TB+2TB

 

System 2-2018:
ASUS ROG Strix Hero II GL504GM Gaming Laptop
Processor: Intel(R) Core(TM) i7 8750H CPU @2.20GHz 2.21 GHz
Video Card 1: Intel(R) UHD Graphics 630 (Driver 31.0.101.2111)
Video Card 2: NVIDIA GeForce GTX 1060 6GB GDDR5 VRAM (Driver Version 537.58)
RAM: 16GB
OS: Win11 Home 64-bit Version 22H2 OS Build 22621.2428
Storage: M.2 NVMe PCIe 256GB SSD & 2.5" 5400rpm 1TB SSHD

 

* I don't work for VEGAS Creative Software Team. I'm just Voluntary Moderator in this forum.