Effects » User » Remote Control » OLD! RC 3001, cyclic control


OLD! RC 3001, cyclic control
Author(s):
Release date: May 3, 2018
Creation date: Feb. 13, 2017
License: unknown

Lightworks user effect RC3001_Cyclic_Remote.fx

*** WARNING: This is an outdated effect version!
If you are using Lightworks 14.5 or better, please install the latest version of this effect.
While this old version has some compatibility with older versions of Lightworks, this effect file is no longer maintained, and is much more difficult to set up than the current version.

This is a version of the master controller for the remote control user effects subsystem
adds the ability to cycle the values of the effects channels.
This effect outputs the remote control signal on channel 3001.

Outdated update:
3. May 2018 by LW user schrauber: Unnecessary sampler settings removed.
Subcategory defined, effect description
and other data relevant to the user repository added.

18 Feb 2017 by LW user schrauber: Status level of the blue transmission channel updated
(standardization with the other remote control effects)

Inputs & Samplers
.... Render the incomplete transmission signal (Step 1)
The MagFilter setting "PYRAMIDALQUAD" and "GAUSSIANQUAD" worked well in tests
when the sampler uses the pixel coordinates of "TEXCOORD0".
All other tested settings ("NONE", "POINT", "LINEAR", "ANISOTROPIC" ) caused small deterioration of image quality,
which increased with each new rendering (even if the effect is only to pass the pixels unchanged).
A detailed test of the transmission quality with Linux / Mac is pending,
but the size of the Texel of 1% of the texture dimensions, provides a margin of safety.
"TEXCOORD1" can not be used because the remote control input is only used optionally.
Parameters
The Min value is higher than the Max value to disable the slider.
The Max value is lower than the Min value to disable the slider.
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
| Notes on multi-line macros: (Preprocessor)
|
| Apart from the last macro line "}", the end of the line must be completed with backslash \
Definitions | After backslach, the line must actually be terminated (no subsequent comments, no blank spaces, etc.).
| Before the backslash, comments can only be entered if these are /* enclosed in comment delimiters, so that backslash is not interpreted as a comment. */\
and declarations | The single-line comment delimiter // can only be used for the last macro line.
|
| If a macro contains an error, the compiler error message often does not display the relevant macro line, but instead the line in the calling shader.
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
... Preprocessor, macros:
Conversion of Y coordinate direction: xy.y = top 0, bottom 1 converted to Y = bottom 0, top 1
Conversion of Y coordinate direction: xy.y = top 0, bottom 1 converted to Y = bottom 0, top 1
Step width (distance) between two horizontal adjacent pixels.
Step width (distance) between two vertically adjacent pixels.
Float2 distance to the currently processed pixels (defined as float2 distance in X direction and in Y direktion. With a correction which is dependent on the aspect ratio.)
Allowed deviation between the two variables "progress" and "_Progress".
Exceeding the maximum allowed effect length specified in frames. In the first frame progress can remain on the first frame too long. In tests, the critical limits ranged between 62488 and 62503 frames total. (Side note: "_Progress" generates errors when using export function "use marked section", and is therefore used only as a cross-check)
Start time of the next ramp within a cycle, Temporary recycling of the "tmp" variable for multi-line macros "HALF_WAVE...
A cycle must be just over 2 frames long due to rounding tolerances in the zero point correction of the cycle.
Adjusted interval
Possibly corrected main interval (cycle length in frames).
Number of integer frames that can be represented in a cycle.
Cycle Time between the beginning and the end of the same frame. Timebase expressed in 0 to 1, within the current cycle.
1/2 Duration of a frame. Timebase expressed in 0 to 1, within the effekt .
Sets the position on the manually set start time. The duration of a half frame is added so that no pause in the effect progress occurs between the 1st and 2nd frame.
Position in the current cycle, Intermediate step 1 without correction of the zero point
Position in the current cycle, Correction of the zero point of the cycle
Transmitter, Status checks for transfer to the "Settings Display Unit"
It is checked whether the playhead is before a possibly set delayed start time.
Transmitter, Plausibility check for transfer to the "Settings Display Unit"
It is checked whether "Total frames" contains a fractional part. (0 = ok, 1 = error) (1E-20 is the tolerance)
It is checked whether the two progress variables differ. (0 = ok, 1 = error)
It is checked whether the adjusted effect length is too high. (0 = ok, 1 = error)
It is checked whether the set interval length is sufficient. (0 = ok, 1 = error)
Transmitter, transfer graphics variables
Channelgroup 30 Multiplication with 0.02 = y-Position of the upper edge of the color signal.
Channel group for transmission of graphic variables. 0.02 is the y-size of the color signal areas.
x - position position and dimensions of the the color point, remote control signal (is also used by the "Settings Display Unit")
x - position position and dimensions of the the color point (used by the "Settings Display Unit")
x - position position and dimensions of the the color point (used by the "Settings Display Unit")
x - position position and dimensions of the the color point (used by the "Settings Display Unit")
x - position position and dimensions of the the color point (used by the "Settings Display Unit")
Option (free channel)
x - position position and dimensions of the the color point (used by the "Settings Display Unit")
x - position position and dimensions of the the color point (used by the "Settings Display Unit")
Transmitter, transfer graphics data: Output of the waveform form encoded as a colored line (occupies Remote control channel 3101 to 3200)
Channelgroup 31 Multiplication with 0.02 = y-Position of the upper edge of the color signal.
Transmitter: Position and dimensions of the color signal. 0.02 is the y-size of the color signal areas.
Note specifically the following variables:
float tmp (hidden behind "START_NEXT")
float strengthCycle (The variable to be calculated.)
float progressCycle (corresponds to "PROGRESS_CYCLE" or xy.x , depending on which shader function this macro is called from.)
Theses variables must be declared in the calling program part.

Ramp A Step 1
Ramp A
Adds the Hold_Time to the already elapsed time.
add Time Ramp B Step1.
Ramp B
Cosine fallback (no sharp edges), Cosine result: +1 to -1 , after correction: 0 = max zoom , 1 = no zoom
Note specifically the following variables:
float tmp (hidden behind "START_NEXT")
float strengthCycle2 (The variable to be calculated.)
float progressCycle (corresponds to "PROGRESS_CYCLE" or xy.x , depending on which shader function this macro is called from.)
Theses variables must be declared in the calling program part.

Ramp A Step 1
Ramp A
Adds the Hold_Time to the already elapsed time.
add Time Ramp B Step1.
Ramp B
Cosine fallback (no sharp edges), Cosine result: +1 to -1 , after correction: 0 = max zoom , 1 = no zoom
#define STATUS_OFF 0.0 // Status, Channel OFF
Status, Channel ON , Content: Data, Data for the "Settings Display Unit"
Status, Channel ON , Content: Remote control,
#define STATUS_RC_CLAMP 1.0 // Status, Channel ON , Content: limited remote control, The value of the remote control signal was limited by a remote controls.
Transmits 3 values as 8-bit color (bzw. 1-bit, numeral system 0 to 1, in this effect, this macro is used only for boolean transfer)
Blue = Status, transmitter ON
"RENDER16BIT(Tx)" (numeral system 0 to 1), Transmits the value of "Tx" as a 16-bit color by using two 8-bit colors
Return: Red = bit 1 to bit 8 Green (BIT9TO16) = bit 9 to bit 16 Blue = Status, transmitter ON
Submacro. Here the color channel for bit 9 to bit 16.
"RENDER16BIT_1_0_1(Tx)" (numeral system input -1 to +1, output 0 to 1), Transmits the value of "Tx" as a 16-bit color by using two 8-bit colors, and transmits the value of "Tx" as a 8-bit color
Return: Red = bit 1 to bit 8 of 16 Bit, Green (BIT9TO16) = bit 9 to bit 16 of 16 Bit, Blue = Status, transmitter ON, Alpha = 8 Bit
Submacro. Here the color channel for bit 9 to bit 16.
Submacro. Adjustment of the numeral system from (-1 ... +1) to ( 0 ... 1)
Shaders
"TEXCOORD0" is used Because the effect can also be operated without a connected input, and the graphically encoded color signal is generated by the effect itself.
1nd half wave, or after the combination half waves, the variable contains the sum of the first half waves and the second half wave. Relative strenth of the effect of the current position in the cycle (relative from 0 to 1 or 0 to -1).
2nd half-wave: Relative strenth of the effect of the current position in the cycle, or mixed with the first half-wave
Simulates a run through a cycle. Displays an idealized curve.
Here, the variable is made available to different macros, which can be used to temporarily store different values.
Macro, 1st half-wave: Relative strenth of the effect of the current position in the cycle (relative from 0 to 1 or 0 to -1)
Macro, 2nd half-wave: Relative strenth of the effect of the current position in the cycle, or mixed with the first half-wave
Combine the half waves
Output of the waveform form encoded as a colored line (occupies Canal 5001 to 5100). Macro, Render a variable ("strengthCycle") as a 16-bit color by using two 8-bit colors (numeral system 0 to 1)
Pass the color signal from the remote input. Note the filter settings for the sampler!
"TEXCOORD0" is used Because the effect can also be operated without a connected input, and the graphically encoded color signal is generated by the effect itself.
1nd half wave, or after the combination half waves, the variable contains the sum of the first half waves and the second half wave. Relative strenth of the effect of the current position in the cycle (relative from 0 to 1 or 0 to -1).
2nd half-wave: Relative strenth of the effect of the current position in the cycle, or mixed with the first half-wave
Simulates a run through a cycle.
Here, the variable is made available to different macros, which can be used to temporarily store different values.
Simulates a run through a cycle. Displays the actual curve in the frame steps.
Macro, 1st half-wave: Relative strenth of the effect of the current position in the cycle (relative from 0 to 1 or 0 to -1)
Macro, 2nd half-wave: Relative strenth of the effect of the current position in the cycle, or mixed with the first half-wave
Combine the half waves
Output of the waveform form encoded as a colored line (occupies Canal 5001 to 5100). Macro, Render a variable ("strengthCycle") as a 16-bit color by using two 8-bit colors (numeral system 0 to 1)
Pass the color signal from the remote input. Note the filter settings for the sampler!
------------- Transmission Step No 2 , Calculate and render the remote control signal and pass the signal from Step No1
"TEXCOORD0" is used Because the effect can also be operated without a connected input, and the graphically encoded color signal is generated by the effect itself.
1nd half wave, or after the combination half waves, the variable contains the sum of the first half waves and the second half wave. Relative strenth of the effect of the current position in the cycle (relative from 0 to 1 or 0 to -1).
2nd half-wave: Relative strenth of the effect of the current position in the cycle, or mixed with the first half-wave
Here, the variable is made available to different macros, which can be used to temporarily store different values.
Macro, 1st half-wave: Relative strenth of the effect of the current position in the cycle (relative from 0 to 1 or 0 to -1)
Macro, 2nd half-wave: Relative strenth of the effect of the current position in the cycle, or mixed with the first half-wave
Combine the half waves
Transmitting the remote control signal. 16 Bit (and adjustment of the numeral system from (-1 ... +1) to ( 0 ... 1))
Pass the color signal from Render_transmission. Note the filter settings for the sampler!
------------- Transmission Step No 3 , Calculate and transmit selected values and pass the signal from Step No2
"TEXCOORD0" is used Because the effect can also be operated without a connected input, and the graphically encoded color signal is generated by the effect itself.
Channel group for transmission of values needed to generate the graph.
Transmission 16 Bit (numeral system 0 ... 1)
Transmission 16 Bit (numeral system 0 ... 1)
Transmission 16 Bit (numeral system 0 ... 1)
Transmission 16 Bit (numeral system 0 ... 1)
Boolean transmission of 3 possible error types.
Boolean transmission of 2 values ( the macro "RENDER8BIT" can transmit a maximum of 3 values)
Pass the color signal from Render_transmission2. Note the filter settings for the sampler!
------------- Remote Control Transmitter, if only one shader is used (do not send graphic data), Calculate and render the remote control signal and selected values and pass the signal from the remote input.
"TEXCOORD0" is used Because the effect can also be operated without a connected input, and the graphically encoded color signal is generated by the effect itself.
1nd half wave, or after the combination half waves, the variable contains the sum of the first half waves and the second half wave. Relative strenth of the effect of the current position in the cycle (relative from 0 to 1 or 0 to -1).
2nd half-wave: Relative strenth of the effect of the current position in the cycle, or mixed with the first half-wave
Here, the variable is made available to different macros, which can be used to temporarily store different values.
Macro, 1st half-wave: Relative strenth of the effect of the current position in the cycle (relative from 0 to 1 or 0 to -1)
Macro, 2nd half-wave: Relative strenth of the effect of the current position in the cycle, or mixed with the first half-wave
Combine the half waves
Transmitting the remote control signal. 16 Bit (and adjustment of the numeral system from (-1 ... +1) to ( 0 ... 1))
Pass the color signal from the remote input. Note the filter settings for the sampler!
Technique
Transmission Step No 1 , Calculate and render the waveform encoded as a colored line (occupies Canal 5001 to 5100) , Simulates a run through a cycle.
Transmission Step No 2 , Calculate and render the remote control signal and selected values and pass the signal from Step No1
Transmission Step No 3 , Calculate and transmit selected values and pass the signal from Step No2
Transmission Step No 1 , Calculate and render the waveform in frame steps, encoded as a colored line (occupies Canal 5001 to 5100) , Simulates a run through a cycle.
Transmission Step No 2 , Calculate and render the remote control signal and selected values and pass the signal from Step No1
Transmission Step No 3 , Calculate and transmit selected values and pass the signal from Step No2
Remote Control Transmitter, if only one shader is used (do not send graphic data), Calculate and render the remote control signal and selected values and pass the signal from the remote input.


Additional resources