[Radiance-general] Re: Re: transform from Radiance to PPM file

Qing Xu [email protected]
Tue, 08 Oct 2002 17:12:39 +0200


Dear all (especially Dr. Peter),
First of all , thank you very much for giving me timely help.

I am trying to practice the method you told me, but it seems that the
scaling is not working very well. Actually, my point is to render a
region on the image plane pixel by pixel. As long as I can get the
radiance values, I can organize then into a picture (file). So could you
please tell me how to form a radiance picture file (unf or pic) or
something like that from the floating point values produced from
"rtrace"? It is really urgent for me!

Thanks a lot!

Qing Xu 

Today's Topics:

   1. Re: transform from Radiance to PPM file (Peter Apian-Bennewitz)

--__--__--

Message: 1
Date: Thu, 03 Oct 2002 10:32:19 +0200
From: Peter Apian-Bennewitz <[email protected]>
To: [email protected]
Subject: Re: [Radiance-general] transform from Radiance to PPM file
Reply-To: [email protected]

Hi Qing Xu,

rtrace gives floating point values, PPM uses 8bit integers (the format
is flexible and could handle more bits, but that is rarely supported).
So, to render a PPM image with rtrace, you'll have to scale the floating
point values and use something like:
	(echo -e "P3\n1 1\n255" ; ( echo 10 10 10 -1 -1 -1 | rtrace -ov -h
teich.oct | awk '{printf "%d %d %d\n", 255*$1/3e-1, 255*$1/3e-1,
255*$1/3e-1}' ) ) > q
Of course, you'll have to feed appropriate input to rtrace. The whole
exercise seems a bit exotic, what's your reason not to use rpict ?

Should you'll be looking for converting from a pic file (rendered by
rpict or rview) to PPM, use ra_ppm .

regards
Peter
-- 
 pab-opto, Freiburg, Germany, www.pab-opto.de


--__--__--

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general


End of Radiance-general Digest