gutsblow wrote: I know how to do it using Subpixel sampling, but I really want to know how to do it without it. |
subpixel sampling???
you might poke some's eye with that...
perhaps you meant the iteration suite?
anyway, i don't know any operation in the AE API that manipulates only specific channels.
to display only one channel you have to either filter your pre-transform input,
or your post-transform output.
i can think of a few ways to do that.
1. use the iteration suites.
these will hand you each pixel in the input and output buffers,
and all you have to do is:
outP->alpha = inP->alpha;
outP->red = 0;
outP->green = 0;
outP->blue = inP->blue;
and viola! you've suppressed the red and green channels. (no subpixel sampling here)
the pros of using this method is the it's multi-threaded and easy to manage. it can also replace the copying intermediate buffers into the output (or input to intermediate).
the cons: it's handling all the channels, so it's wasteful.
2. the do it yourself approach.
get the base address of the world you wish to filter, and iterate through that world yourself.
this way you can get the PF_Plane for the channels you wish to affect, and skip directly to the correct spot in memory for that channel,
avoiding the other channels altogether.
pros: is the least wasteful and most customizable way.
cons: good luck getting that to be multi-threaded.
3. the compositing approach.
to show only the red channel, create a new world and fill it with red.
composite it using composite_rect and the "multiply" transfer mode.
that will supress other colors.
4. the someone-else's-problem approach.
if you're using smartFX, you can tell AE which channels to use.
AE will ignore the result of the other channels.
i never used that, so i don't know if you'll get only what you want, or you'll get the original input for the unused channels.
personally, i'd go with the iteration suite.