What is lerp in general?

Lerp is slang for Linear Interpolate. Given two different inputs A and B, think of a straight line drawn between them - with the Alpha node saying how far along that line you are.

For example, lets say you have a red color [1,0,0] in A - and a blue color [0,0,1] in B. If you set the Alpha to 0.5 (50%), then the Lerp will output a dark purplish color [0.5,0,0.5] - or halfway between each of the X Y and Z components linearly (and independently btw - hence the loss in brightness in this example).

They’re great for mixing two materials together. Also very handy for masking out parts of your mesh. Let’s say you feed the Alpha with an actual mask texture - wherever there is white you’ll get one input and where there is black you’ll get the other. Use greys for blending. But anyways, that’s the general idea.

2 Likes

So as the titel says, I constantly get to see this lerp thing that gets used heavily within materials. But what exactly is it, what does the term lerp define?

Hey man, thanks a whole lot. This made me understand it and makes me understand most of the structures in the starter’s content material creations!

I thought this was also very informative! Let’s say you have a green sewer texture and a lava texture right next to each other. Could you use Lerp and a black and white mask to make the black the sewer texture and the white the lava texture??

Your comment and independently btw - hence the loss in brightness in this example is incorrect. The reason it’s darker is mostly because of the standard gamma of ~2.2. A value of 50% brightness in the computer translates to about 22% brightness on the monitor, which is much less than 50%. sRGB colors, in particular, are very bad candidates for lerping. Modern graphics hardware can correct for these issues.

Japanese thread:

Lerp とはどのようなものですか?

… an example on how to use it in different scenario than materials:

Say isn’t that what blend does?

so what… LERP = FALL OFF like in 3dsmax nodes?
or just a Blend?

so LERP is like MIX NODE in Blender and the Alpha(ue) is Factor (Blender)