Lux values of sun and sky

Dear all,
I am sure it is a quite trivial question but I was wondering how to get lux values for my sun and sky generated with gensky. Is there a function I am missing?

Thank you for your help!

Hi Danka,
Have a look at Section 6.7.1 in the Radiance book. If you don’t have the book, that chapter appears in my thesis as Chapter 2 - so Section 2.7.1. Link to thesis here:

John Mardaljevic PhD FSLL FIBPSA
Professor of Building Daylight Modelling
School of Architecture, Building & Civil Engineering
Loughborough University
Leicestershire, LE11 3TU, UK

Daylight Experts Ltd.
Expert Witness | Simulation | Measurement | Conservation

Associate Editor Lighting Research & Technology

Thank you John for your reply,
I actually have the book but it is also good to have access to your digital thesis, that’s great.
I might have missed some details in my question, though. Just to be sure, I am using a software for Virtual Reality as a complement to my Radiance analyses. In this software (Unity 3D) I have a light that simulates the sun and a sky. The software allows using LUX values for both to simulate physical behavior. I was wondering how to get those values from the sun+sky that I have generated through gensky in Radiance.

I don’t know if your previous reply already answers to my question.
Thank you for your help!

In that case, maybe Section 3.2.2 onwards in the thesis (as well as 2.7.1).

Thank you for your help. I am not really sure how this has to be done but I assume one should look into the brightfunc values?

Danka wrote to me this morning as well:

I am sorry to bother you. I have already asked the forum about this question but wasn’t able to understand how it works. John Mardaljevic was very kind in pointing me to his thesis and chapter 2 of the book, but maybe that is more useful if one already has measured values and wants to turn them into a sun and sky in Radiance. But I might be wrong.

The question is this: I am using VR software to do some complementary work to my analyses done in Radiance. I would need lux values characteristic of the sky and sun generated via Gensky to assign them to a light and a sky in the software in order to make them behave in a ‘physically correct’ way.

I was wondering if there was any chance to get such values from the file I get from Genky.
Is it in the Brightfunc values I have to look at?

The lux value for the sun may be computed from the solar diameter, cosine to the zenith, and radiance value. For example, “gensky 3 21 10” produces:

# gensky 3 21 10
# Local solar time: 9.74
# Solar altitude and azimuth: 40.7 -47.3
# Ground ambient level: 14.4

void light solar
3 6.64e+06 6.64e+06 6.64e+06

solar source sun
4 0.557595 -0.514504 0.651440 0.5

void brightfunc skyfunc
2 skybr
7 1 8.48e+00 1.94e+01 5.08e-01 0.557595 -0.514504 0.651440

The third “source” argument gives you the cosine of the zenith angle, which is just the normalized z-component of the solar vector, and the fourth argument is the subtended angle in degrees, which is 0.5. The solar radiance taken from the preceding “light” primitive is 6.64e6, which is in watts/sr/meter^2. You can therefore compute the solar irradiance on the horizontal from:

solar_irrad = PI*(0.5*PI/360)^2 * 0.651440 * 6.64e6

which gives 258.7 watts/meter^2. To convert this to illuminance, you can multiply this value by the Radiance default luminous efficacy of 179 lumens/watt, or use a more accurate solar efficacy factor, like 208. This may depend on your VR software, and is generally considered a “fudge factor” as it depends on the solar altitude, atmospheric and other conditions.

That was the hard part. The horizontal irradiance due to the sky may be computed simply from the recommended ambient level in the comment at the top. This is multiplied by PI to get horizontal irradiance:

sky_irrad = PI * 14.4

which is 45.2 watts/meter^2. Again, you may need to convert this to illuminance using the same 179 lumens/watt multiplier, or substitute a sky efficacy factor closer to 110 (I think).


Thank you Greg,
that was a great explanation!

Sure – it helps when you explain exactly what you are trying to calculate and why. It wasn’t as clear from your initial queries, which is why I quoted what you wrote to me.

Actually, what still isn’t (absolutely) clear to me is the sky luminance distribution. In the example, gensky defaults to the CIE clear sky distribution (see Your VR software most likely uses this pattern also, but it’s probably worth knowing. Note, even if it was some other model (say, Perez All Weather) it shouldn’t matter too much since differences in clear sky luminance patterns tend to be greatest around the circumsolar region – where the effect will be overwhelmed by the sun contribution in any case.

I can only apologise for my initial lack of clarity and be very grateful to you both for your help.

When it comes to the sky, the specifications in my software (Unity 3D) only say:
Set an absolute intensity for the HDR Texture. This value (lux) represents the light received in a direction perpendicular to the ground. This is similar to the Lux unit you use to represent the Sun and thus is complimentary."

If any apologies are due, they are from the author of that specification (who might well be, in part, this entity: :wink:

1 Like

…and I know I am asking the obvious here but PI is Archimedes’ constant, right?

3.14159265354979323846 and that’s all I know…


Indeed it is. English-speaking programmers limited to ASCII have been using “pi” for “π” for decades.

1 Like