SUNLIGHT/DAYLIGHT ANALYSIS

This is a topic I came across a long time ago when I was confronted with the following question: How do you distribute objects in a way, that for a particular location and for a given time frame, the overall amount of sunlight on the surface get’s maximized? Well, theoretically it’s quite easy since it is a classical optimization problem but how does one accurately calculate the illuminance values needed for this? The first and obvious choice is probably to use Mantra. Even though Mantra is a fantastic render engine it won’t work well for a number of reasons. Mainly because Mantra is simply not meant to be used for daylight and solar analysis but to render huge amount of data and to produce stunning images.
However, a render engine which is quite the opposite in this regard and extensively used for such simulations is Radiance. It provides everything needed for this kind of work and furthermore it is fairly easy to use. For this very reason I thought it might be a good idea to write some python scripts to share geometry and data between Houdini and Radiance. While this worked quite hassle-free in general, it was unfortunately slow and the lack of interactivity became a problem. The reason for this was mainly because of the somewhat cumbersome workflow and data exchange between the two programs which was as follow:

  • Export geometry and sample grids as OBJ
  • Generate Radiance description files for materials, sky and so on
  • Render the scene in Radiance
  • Retrieve the result and bring it back into Houdini for visualization and optimization

This was more or less acceptable for simple tests but for using it on an optimization problem it was simply to slow. Nearly half of the computation time got lost in sharing data between Houdini and Radiance and it became quite apparent that I have to leave Radiance aside and implement everything in Houdini.
And that’s exactly what I finally did. To calculate the sun position I implemented NREL’s Solar Position Algorithm (SPA). It is available as C version but I used Python since it’s calendar library made things easier. This first step was pretty easy. The hard part was to find a good radiance and luminance distribution model for the sky. Most of the physical sky models used by render engines are largely based on the paper “A Practical Analytic Model for Daylight” by Preetham, Shirley and Smits. For simulation purposes however, it is more common to rely on the CIE Standard Sky like Radiance does. Since I couldn’t decide which one is best to implement I finally did the implementation for both, together with the CIE Standard General Sky and the Perez Sky Model.

 

In the UI you have to set up the position in regards to latitude and longitude and the time period for which the calculation should be performed. Currently the following sky models with different luminance distributions are implemented: CIE overcast sky, CIE standard, clear sky, CIE standard general sky, Preetham, Perez
The different luminance distributions of the CIE standard sky can be seen on the fourth image below.

Currently the following sunlight/daylight simulation types are implemented: illuminance analysis, solar radiation, daylight factor and sun hours. To check their accuracy I’ve set up some test scenes and compared the result to results from Radiance. They are not completely identical but the average difference is under 1.5% what’s more than enough for my usage.

Below are some example images showing the results of an sun hour analysis over different calculation periods. The vector field in the last image is showing the average luminance direction which is quite useful for various things. For instance, to simulate different growth processes based on sunlight and direction.

 

 

6 thoughts on “SUNLIGHT/DAYLIGHT ANALYSIS

  1. Awesome stuff!

    I’m currently doing my master thesis on 3d printed functional integrated facades. I always used ladybug for grasshooper in order to inform, adapt and iterate over my models. This setup would highly improve my workflow.
    Is there any chance that you could elaborate or share the hip file for the sun hours heatmap?

    Like

    1. I saw your Youtube video – it’s a very interesting project you’re doing!
      I can’t share the asset but if you tell me what exactly you need I might be able to help you setting up your own.

      Like

      1. Thanks for your reply, I’m able get the sunpath vector of a location into Houdini that adapts to a time period. But at the moment I can’t figure out how to project the sunrays to a geometry an transfer the attributes in order to create the colored “heatmap”.

        Thanks a lot!

        Like

  2. If I understand you correctly, you want to somewhat transfer data from your sunpath (points?) onto the geometry along the given vector. Does this mean that you already have the data (radiance, luminance, sun hours, etc.)? Is it precomputed with another software and associated with the points? Or do I completely misunderstand what you’d like to do?

    Like

    1. Exactly, I have a precomputed sunpath (as points) from an other software. The points don’t have any data besides the sun direction vector. What I need is some sort of colormap of the sun hours over a certain period of time mapped to a double curved facade. This doesn’t need to be scientific accurate. It just needs to show a relationship between parts which get more an which get less sunlight.

      I hope I could express myself a little bit better this time.

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s