LERP

If you had to merge two textures with an exact ratio to create a new material, how would you do that?
If you had to find a mid-point between two locations?
For this exactly we have Lerp, which enables changing the ratio between values (like textures, numbers, locations etc.).

Here is an example of using Lerp to merge textures:

In General:

Lerping is a way to mix one value (A) with another (B). This mix works by a third number called Alpha (100% of A when Alpha = 0, and 100% of B when Alpha = 1).

“Lerp” stands for Linear Interpolation.

We use it to find a new point between two other points we already know. For example:

We have two known points, A and B.

The straight line connecting them is called the Liner Interpolant (not really important to remember the term, but feel like scientists for the fun)

We can set the value we need on this line. This value is called Alpha, and we can think of it as an elevator, where  A is the ground floor and B is the 1st floor.
The higher the value we choose for Alpha, the closer the elevator will be to the first floor, and the lower the value, the closer the elevator is to the ground floor.

If we set point B to the second floor and Alpha to 0.5, then the elevator will be in the middle, in the first floor.

How it works

Inputs:
Float A
Float B
Float Alpha

Output:
Float Return Value

An example to how this function looks in UE4:

As you can see in the image above, we have points A and B.
We have Alpha, for which we select the value between 0 and 1.
And we have the output, for the final value of the LERP.

Some more examples in addition to the elevator:
The flickering light of a light bulb where 1 is the Lerp value for the light bulb being on and Lerp 0 for it beig off.

Another example can be a ball moving from its initial place to 0 on the Z axis gradually by the Lerp: