[Radiance-general] my real question

Qing Xu [email protected]
Thu, 10 Oct 2002 14:11:46 +0200


Hi Greg,
Thank you for your suggestion at first!

For this moment, I think I should tell you my real situation. From the requirement
of our project, I could not use the Radiance in the form of command line and I
must change some codes to form our own APIs (making use of static library). Also,
I couldn't use system calls. We can get the required image using API altered from
"rpict", and then our real problem is to specify a region (or even a single pixel)
on the image plane to get the radiance value and the picture of that region. In my
opinion, "rpict" can specify the exact position on an image plane. So, I use the
changed "rtrace" to render the region to obtain their radiance values (r, g, b)
and then I want to transform them into a suitable file form to obtain the picture.
I know I can get the answer through looking into the source codes, but I do not
have so much time for that. I have tried the method Dr. Peter told me. However,
that method sometimes works well and sometimes not. Now, I want to take advantage
the Radiance picture directly. Could you please tell me the suggestion? From your
opinion, what is the better solution for my problem?

Thank you in advance!

Qing

Greg Ward wrote:

> Hello Qing,
>
> There are many options for getting the output of rtrace and converting
> it to an image.  I would first echo Peter's question, which is why you
> are not using rpict?  If it is because you cannot generate the image
> you want, be sure you have explored all of the view types (-vt?) and
> options rpict has to offer from the man page.  If you do not have the
> man pages installed on your system, you can always get them from the
> online versions (slightly out of date) at LBNL:
>
>         http://radsite.lbl.gov/radiance/refer/index.html#cat2
>
> If you want to create a Radiance picture from rtrace, the simplest
> method is to specify the horizontal and vertical resolutions on the
> rtrace command line, and use the -fac output option, like so:
>
>         % rtrace -ov -fac -x $xsiz -y $ysiz $octree < $input_rays > $output_pic
>
> where the variables xsiz, ysiz, octree, input_rays, and output_pic are
> set appropriately.  The second option is to output the standard
> floating point values, and convert the result with the pvalue program,
> like so
>
>         % rtrace -ov $octree < $input_rays | pvalue -r -y $yres +x $xres -d >
> $output_pic
>
> There is no real advantage to using this method, however.  And as I
> said, there is no real advantage to using rtrace over rpict, either,
> unless you absolutely cannot generate the view you want with rpict.
>
> -Greg