Insert text in Radiance images at specific location (x y z)

Thank you Dr.Greg. I also suspected that since Pcompos deals with images
(and not Radiance objects) therefore it will only take pixel
coordinates (and not world coordinates) as input arguments. Your idea of
recording pixel coordinates through ('t' or middle mouse button) will
absolutely work but ideally I was looking for a fully automated process.

Still I think there could be one solution, if I write an algorithm to
convert the (x,y) world coordinates of the sensors into (x,y) pixel
coordinates by taking into account the actual room size and pixel counts of
the image. If I give -vv and -vh options equal to the room size in parallel
camera, and the resolution of the image produced is known than I think
somehow this can be done. This is just a thought process yet. I hope this
could happen. I will be glad to know your views on it. Excuse me if I
confused. Thank you again!

Best regards,


Vaibhav Jain

On 11 December 2013 06:44, Greg Ward <[email protected]> wrote:

Hi Vaibhav,

This is probably in the archives, somewhere, but I wouldn't want the task
of trying to find it myself, so I won't insist you look, either.

If you have a list of (x,y) pixel coordinates (where x is horizontal
position from the left and y is vertical position from the bottom), you can
use vwrays to generate rays and compute illuminance values to composite
into your image. You can generate such a list using the 't' command in

        ximage -tp myrendering.hdr > positions.txt

Just move the cursor over each place you want to compute illuminance and
type 't'. Don't expect a beep or anything, and don't hold down the 't' or
you'll get a whole list of identical values when it repeats. (If you
prefer, you can click the middle mouse button instead of typing 't'.)

The list of positions can then be used in the following manner to generate
illuminance values and output them via psign and pcompos:

        $ echo pcompos myrendering.hdr 0 0 \\ >
        $ vwrays -i myrendering.hdr < positions.txt \
                > rtrace -h [rendering options] -i+ myscene.oct \
                > rlam positions.txt - \
                > rcalc -e 'lux=47*$3+120*$4+12*$5' -o '=00 "!psign -h 25
-s -.1 ${lux}" ${$1} ${$2} \' >>
        $ sh > myluxvalues.hdr
        $ rm

If the text is too large or too small, adjust the psign -h value downwards
or upwards as desired.

I haven't fully tested this, so I hope I didn't make any goofs. Of
course, it assumes you are using Unix. Otherwise, you'll have more
difficulty getting the quotes to work properly since Windows only allows


> From: Vaib <[email protected]>
> Date: December 10, 2013 5:06:35 PM PST
> Hello everyone,
> I wish to show illuminance values at specific locations at world
coordinates (x y z) in an image. I mean, to show the illuminance values (in
an orthographic image of a plan created by a camera with parallel lens) at
the real position of the illuminance sensors (Rtrace/Rsensor).
> The only way I could find is to use Psign to produce text's image, and
then position the produced text in the plan image by using Pcompos.
Something like this: psign 100 Lux | pcompos inp.hdr 0 0 +t .5 - 200 200 >
out.hdr. However, Pcompos takes input of the location of a pixel and places
the text there. This is not what I intend to achieve.
> Are there other ways to do this? Thank you in anticipation.
> Best regards,
> Vaibhav Jain

Radiance-general mailing list
[email protected]