IDisplace
Function
This function is a hard-wired version of DisplaceX
to warp an image based on a second image's intensity. The formula it uses
is "x-(a*xScale)" and "y-(a*yScale)".
This image is a checkerboard warped by a QuickShape.
Because the shape is black and white, with little grey, it is difficult
to make out the distortion in the checkerboard.. It is often a good idea
to insert a blur between a high contrast distortion image and the IDisplace.

This looks really snazzy when you combine it with the Relief
macro from the Cookbook:
Parameters
|
Type
|
Defaults
|
Function
|
x/yScale |
float
|
0, xScale |
The amount of pixels that the
image is offset by the second image. |
x,yDOffset |
float
|
0, xDOffset |
A panning factor applied to
the image. Intensity is usually 0 to 1, with 1 being 100% of the x/yScale
factor. |
x, yChannel |
string
|
"a",
"a" |
The channel from the second
image that is used to distort the first image. |
x,yDelta |
float
|
0, xDelta |
The anticipated amount that
the pixels will move. If this is too much, calculations will slow
down. If it is too little, there will be black holes in the image. |
Synopsis
image IDisplace(
image img,
image controlImg,
float xScale,
float yScale,
float xDOffset,
float yDOffset,
const char * xChannel,
const char * yChannel,
float xDelta,
float yDelta
);
Script
image = IDisplace(
img,
controlImg,
xScale, yScale,
xMaskOffset, yMaskOffset,
"xChannel", "yChannel",
xDelta, yDelta
);
Command Line
shake -idisplace controlImg xScale ....
See Also
Randomize, Rand,
Turbulate , DisplaceX
|