Lerp function

   6473   2   1
User Avatar
Member
161 posts
Joined: Nov. 2018
Offline
Is anyone willing to explain the lerp function (linear interpolation?)in this specific case?
At 7:40sec, the tutor is about to set up lerp function in wrangle in order to color the objects, but before that, having the noise generated in the attribute vop, he also creates one bind export and names is bias. Afterwards he goes to type the lerp function and the color is changed.
Is it supposed to be grasphed in a way that lerp takes one value (existing Cd in this case) second value(some chv(whatever) and bias (bias is the noise in this example)….i dont get it how does this generate color values based on noise. Noise is black and white 0-1 values and afterwards we get color with vector type 0,0,0. Thing is i cant visualize ehats going on here that makes it do what it does.
Any explanation on this topic from someone?
User Avatar
Member
9380 posts
Joined: July 2007
Offline
Think of lerp() as a blend between 2 values (in this case 2 vectors), bias is blend amount, bias 0 returns first value, 1 second value and anything in-between is a blended value
Equivalent in VOPs is Mix VOP which can be more intuitive name

So in your case noise is 0-1 blending ratio between the colors
Edited by tamte - May 17, 2020 19:42:03
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
161 posts
Joined: Nov. 2018
Offline
In the case in the video, the bias is a noise? Thats the part i dont get, because the noose in the vop is at some certain value of frequency (x,y,z), which feeds through the clamp and finally throught bind export called bias (which is used as bias). If that is the blend value, then how come he creates a channel on the second value of lerp, and freely generate color with vector type parameter? Shouldnt then by your saying the bias (noise in this case) control the, how can i name that, if it blends then its “the opacity” between the noise and the Cd…ah any chance you look at the time i marked in the origin post in the video? Its a 30 business hes doing starting at 7:40.
  • Quick Links