Saving floating-points with rtrace

Hi everyone,

I’m trying to use vwrays with rtrace and save floating-point output rather than RGBE images to calculate irradiance or illuminance. The code I’m using is:

vwrays -ff -vf Vista.vf -x 2048 -y 2048 > ./Render/04-IImagen$azimuth-$elevation-vwrays.txt
rtrace -ov 02-Escena.oct < ./Render/04-IImagen$azimuth-$elevation-vwrays.txt > ./Render/04-IImagen$azimuth-$elevation.out

Nevertheless, the .out file is empty (it only has the header) and I don’t know if there is something that I’m doing wrong because I don’t really understand what I’m doing.
Could you help me with that?

Thank you in advance

You need to set the float format at each stage. The output of vwrays -ff is a raw-float file, but then you didn’t tell rtrace that. Normally, you would use a pipe to avoid the temporary file like so:

vwrays -ff -vf Vista.vf -x 2048 -y 2048 | rtrace -ff -ov 02-Escena.oct Render/04-IImagen$azimuth-$elevation.flt

The output file will include an information header, i.e., a few lines of text at the beginning saying what is in the file. If you don’t want that, add a “-h” option to rtrace.

Cheers,
-Greg