Glare Analysis | Images at minutes interval | Date and time on image | Animation

Hi, I have been working on image-based glare analysis and had to do a lot of manual work while finalizing the animations/ GIF.
I was wondering if all this is possible to do or not:

  1. Images at minutes interval (say in the gap of 5 minutes)
  2. Images with date, time and DGP value
  3. Animation

Attaching an animation which I made manually incorporating point 2 and 3 SW_Winter_Render Animation

Thanks in advance.

You can generate the HDR images using the Daylight Coefficient Image-based recipe in Honeybee[+] and then pretty much automate the entire process with a couple of lines of code. This was done using something similar:

The commandline program that I use for automating the GIF or video creation is ffmpeg. There are several threads on stack-overflow that explain the procedure for generating videos.


1 Like

Thank you for the reply @sarith this looks little tricky for a non-coder. Is this possible by scripting in Grasshopper itself? Also please throw some light on how are you getting the results in seconds frame.
@mostapha @chris is it possible to add text on the false colour image (as shown in the animation above). It becomes really annoying to edit each image manually.
Thank you in advance.

The text was added using a psign and pcomb. I am fairly certain that this can done using Pillow too and actually might turn out to be faster, considering that we’d then be dealing with JPG/TIFFs instead of HDR images.
It might be possible to do all this through Grasshopper by making system calls to those programs but it will be (at least) 10-20 times slower.


Just to clarify quickly the things that can be done with the currently-available Grasshopper components:

  1. Images at minutes interval (say in the gap of 5 minutes) - This is definitely possible right now with Honeybee[+] and I believe that it is also possible with legacy. The key is to plug in a decimal value for the hour inputs of the components that generate the .sky files. (eg. 9.25 for 9:15 AM) or change the timestep of the Wea going into the sky matrix:
  2. Animation - That’s what sliders are for in Grasshopper. There are tons of ways to animate them but the simplest would be to just right-click on the slider and select “animate”. You can ensure each Radiance image gets written to a separate file (they don’t get overwritten) by using the output of the slider (eg. hour of the day) to generate a unique file name for each simulation (using the “name” input of the simulation component).

What there isn’t a component for:

  1. Images with date, time and DGP value - As @sarith says, you’ll need to use some other commands (or Python scripting) to do this now. Maybe we’ll make a component at some point to do system calls to such commands (and there are always ways of improving performance if the “10-20 times slower” becomes an issue). But it’s not a high priority at the moment so you might need to teach yourself a little bit of scripting here if you want an automated (as opposed to a manual) solution for the near future.

Most of the framework to create images with date, time and DGP value is already within the glareAnalysis component, i.e., using psign and pcompos to add text to images. Since I may need it myself sometime I tried to recreate your example. The component inputs are:

  • Falsecolor image (HDR)
  • Date and time (or other optional text)
  • DGP value (automatically returns the comfort range)

There are some additional inputs to control the height, aspect ratio, intercharacter spacing, and vertical spacing of the text. The falsecolor legend must be in the lower left corner (default)… or centre left I guess, otherwise, it will not work properly since the text will always be added to the top left corner.

The images used below can be downloaded here. (476.0 KB)



All these years of using/hacking HB and I had no idea this was a thing!

1 Like

Just to be clear - it uses pcompos and not pcomb. I guess I got confused since I also used the latter to mask the corners of the fisheye image with black corners.

Thanks a lot for the clarifications. Will check on the scripting part. Great help!

Thanks @mikkel Ill look into this!