THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 30/10/2004 at 11:49, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.503
Platform: Windows ;
Language(s) : C++ ;
---------
Hi,
I want to extract the correct colors of a rendered line. The color buffer in ExecuteLine though is NOT the same as the actually rendered line.
I tried using the RayFilter on the line but the Filter doesn´t seem to work (or at least I cannot get it to work).
So is there ANY way to retrieve the correct colors in ExecuteLine?
Here is how I get the color:
------------------------------
LONG mul = pp->aa ? 4:1;
Real *col = pp->col+pp->left*mul*pp->comp;
[...]
for (x=pp->left; x<=pp->right; x++)
{
LONG r=0,g=0,b=0;
for (i=0; i<mul; i++, col+=pp->comp)
{
r+=col[0]*256;
g+=col[1]*256;
b+=col[2]*256;
}
}
--------------------
The color is then Vector(r/mul,g/mul,b/mul). But when I compare the line with the line of the rendered image, they differ.
:-(
Anybody any idea how to solve that?
Thx i.a.
Katachi