[Radiance-dev] Ray Parameters
Marcus Jacobs
marcdevon at hotmail.com
Sat Aug 13 22:44:23 CEST 2005
Dear Group
I am seeking to make a minor modification of the Radiance source code to
solve an issue that I am having with my renders. The issue that I am trying
to resolve is the color shift (i.e. color bleeding) that occurs. My goal is
to allow for me or anyone else to wishes to utilize the added functionality
to gain some artistic control on the amount of color bleeding that occurs
without invalidating the physical accuracy of the result. I have been able
to accomplish this in RADZILLA by utilizing its alternate ambient material.
I have an idea which may accomplish the same goal in classic Radiance.
In rayinit.cal there are many variables (i.e. Dx, Dy, Dx, Lu, Lv, etc.) that
are available to the user for use in function files. What I would like to do
is to gain control of the ray type parameter (rtype) defined in ray.h. The
basic concept is that in a function file associated with colorpict or
colorfunc, if the ray type is equal to anything excluding an ambient ray,
the color will remain unchanged. If the ray type is an ambient ray, the
color could be defined by the user. I have created my own function file
,colorshift.cal, which would define the ambient color of a material as:
red = (1- B4) * grey(B1,B2,B3) + B4*B1;
green = (1- B4) * grey(B1,B2,B3) + B4*B2;
blue = (1- B4) * grey(B1,B2,B3) + B4*B3;
where B1, B2, B3, B4 is the color's red, green, blue components and color
bleeding factor (detemined by the user) respectively. This will have the
effect of desaturating the color according to the color bleedig factor
without altering its overall reflectance (i.e. grey(r,g,b) will remain
constant). I have done some research in func.h and func.c to see how I might
gain some control over the ray type parameter. I have not had much luck in
completely understanding how the code works. I am assuming that many of the
standard parameters listed in rayinit.cal are extracted in the function
chanvalue. One problem that I am having is that I can find where this
particular function is being called elsewhere in the source code. Any
insight as to how to accomplish my goal would be greatly appreciated.
Regards,
Marcus Jacobs
More information about the Radiance-dev
mailing list