Hi Guys,

I'm having trouble with my pixel stretch plugin, I've tried linear and
cubic interpolation to get from one value to another over a given number of
pixels. linear interpolation should get this done.
I basically want a smoother blend from the start value to the end value.

attached is an image of the result I currently get.

any help would be great thanks. Bryan

for (;X<r;X++)
{
float shift = (multiplier*distortionValue[X]);
int stretch = int(shift)*-1;

foreach (z, channels)
{
for (int i=0; i <= stretch; i++)
{
if ((X-stretch) < X) //check for out of bounding box
{
break;
}
else
{
float value = tile[z][y][X];
float d_value = tile[z][y][X+stretch];

int current_value = (X-stretch)+i;

if (stretch != 0)
{
//LINEAR INTERPOLATION
//((float*)(modifiedRow[z]))[current_value] =
lerp(value,d_value,(i/stretch));
}
else
{
((float*)(modifiedRow[z]))[current_value] = value;
}
}
}
}
}

<<attachment: spread_artifact.jpg>>

_______________________________________________
Nuke-dev mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev

Reply via email to