[Sidefx-houdini-list] HDK COP
malexander at sidefx.com
Fri Feb 16 16:10:10 EST 2007
> i found "tiles->myX1" and "tiles->myY1" that is the Xmin and Ymin for the tile, but couldn't find the X and Y of the current pixel it is processing.
You're processing a lot of pixels at once, in one tile, containing from
1-4 channels. I often use:
int x, y, idx;
idx = 0;
for(y = tiles->myY1; y<=tiles->myY2; y++)
for(x = tiles->myX1; x<=tiles->myX2; x++, idx++)
data[idx] = /somevalue/; // at x,y
You'll have to do this once for each channel; or, you can process every
channel inside that loop (often easier to process RGB all at once).
More information about the Sidefx-houdini-list