Sky color for annual daylight analysis

Hi Ladybug community!

I would like to run a annual daylight simulation with a custom sky color. Is there a way to do it using HB legacy, HB [+] or the Ladybug tools?

For running a point in time simulation, I used HB legacy together with a modified version of the Lark plugin to create the colored sky.

Can I do something similar for an annual workflow?


How do you want to change the sky color? There are some ways to tweak the sky on the SDK layer of the LBT plugin but they might not be what you’re looking for.

Annual simulations are very different from point-in-time ones. There’s always a way to hack it but it’s much harder to customize annual simulations than point-in-time ones.

1 Like

Hi Chris,

Thanks for the quick reply!

I would like to use a constant color for all the hours of the annual analysis. I think I can do this by using the -c option in gendaymtx. Is there a way to change it with the LBT plugin?

Hi @M.Gkaintatzi ,

In that case, it sounds like you just want to use the HB Certain Illuminance sky component. You’ll see in the SDK Docs for that sky that it is equivalent to the following Radiance command:

gensky -c -B desired_irradiance

Hi @chris,

This will give me a CIE overcast sky, and if I understand this right, this can be an input to a point in time simulation but not an annual.

I think what I want is to be able to define the -c R G B option of the gendaymtx that generates an annual Perez sky with color:

gendaymtx -m 1 -c R G B weather.wea > sky.smx

Can I do something like this?

Ah, I see. Sorry that I was looking at the wrong Radiance command and didn’t realize that you were trying to customize the annual simulations and not the PIT ones. We don’t have anything exposed on the SDK layer that would allow you directly access the gendaymtx -c option from Grasshopper but everything’s open source and so you only have to edit a line of code in a .py file of the core libraries if you want to access this.

Here is where the recipe is setting the options for gendaymtx command:

If you’re on Windows, you should be able to find this file in this location:


You’ll just have to add a line of code like this in order to be able to change the color of the sky:

opt.c  = (0.960, 1.004, 1.118)

… where the fractional values in the tuple are for the RGB values of the sky.

This page of the LBT SDK docs shows you all that you can customize with that GendaymtxOptions object:

Thanks @chris for the reply! This works. :slight_smile:

Is there a way to do it though so that the RGB values in the tuple are input from Grasshopper?

And an additional question: Are the opt.d (sun only) and opt.s (no sun) accessible from Grasshopper?

I would like to create a workflow where I run a sun-only simulation with the -c option for color of the sun and a no-sun simulation with the -c option for the color of the sky and as a result I get the 3-channel irradiance values (for sun and for sky) instead of illuminance. Can I create my own recipe for this to make it a bit more flexible without having to change the file every time? I see that the HB Annual Daylight component uses this:
recipe = Recipe(‘annual-daylight’)
Can I make my own ‘colored-annual-daylight’ recipe to do what I described?

Thanks again!

The short answer is “not easily but there’s always a way to hack it.” The fastest/hackiest way to do it is just write a GHPython component that edits that .py file, adding in the lines of Python that you want when the component runs. Then, when you go to run the recipe, the new/edited Python code would be used.

If you’re interested in implementing a longer-term solution that’s not nearly as hacky, I think we’d accept a code contribution that exposes the Radiance parameters for sky generation. The first step would be to expose these radiance-paramters on that command in the .py file that you’re editing. If you end up sending a Pull Request to the Honeybee-Radiance repo that does this, I would be happy to review and merge if it’s all good. Then, we can work towards exposing these parameters on the recipe.