Exporting from Radiance RGBE to "linear RGB" formats

Dear all,

I am currently trying to set up a reliable work-flow to exchange of imagery between Radiance and computer graphics software. The latter is shalle be used for image editing and 3D modelling. In particular I want to use the same color maps in Radiance and in 3D modellers.

I define colours in Radiance based on spectrometer measurements and photographs that are calibrated with macbethcal. My colours are consequently based on illuminant E (equal energy), have Radiance’s RGB primaries and whitepoint, and are linear.

In computer graphics, “scene linear” workflows are commonly employed. My current target there is Blender, which assumes linear rgb with Rec. 709 primaries and whitepoint (D65 as in sRGB). And I do image editing in Gimp, which provides an sRGB linear space (integer or floating point).

Now I am wondering if I can just rely on ra_tiff to export from Radiance. As far as I understand, it accounts for the EE illuminant and produces something at least similar to sRGB when called without any parameters. I tried that e.g. with macbeth_spec.pic from the Radiance distribution. My current approach is

ra_tiff -g 1 -f input.hdr output.tif

Gimp opens this as 32bit floating point sRGB. The pixel values I get are almost perfeclty matching those I read in ximage (c). The image, however, looks very dark - in Gimp, in MacOS preview, and in Blender as well.

Am I doing something entirely wrong here, or should I just rely on the pixel values since at least Gimp does not know about how to display them?

Best, Lars.

Hi Lars,

By default, ra_tiff does not convert toe Rec.709 primaries, which differ slightly from Radiance both in the green primary’s chromaticities and the white point. To get into Rec.709 before going to ra_tiff, you can use:

ra_xyze -r -p .64 .33 .30 .60 .15 .06 .3127 .3290 input.hdr | ra_tiff -f - output.tif

The “-g 1” option should be the default when converting to 32-bit IEEE-float (-f option). I do not know why Gimp shows it as dark. I tested it with Photoshop, and it seems OK. There may be a slider for the exposure that brings it into range. I don’t know how forgiving Gimp is about having average pixel values much different from 0.5. Does passing the input through pfilt in 2-pass (auto-exposure) mode first help?

Cheers,
-Greg