Any ideas on how to create solar irradiance maps?

I have seen a couple of solar 3D editors that allow you to visualize the solar irradiance in the roofs. They display “hotter” colors for higher irradiance and “colder” colors for lower irradiance. Note that the irradiance is taking into account not just the orientation of each plane, but also the shadow projections of nearby objects:

Screenshot from 2021-01-28 19-56-21 Screenshot from 2021-01-28 19-56-03

Here are a couple of videos if you feel interested:

I wonder if that could be done with Three.js. Do you have any ideas?

I can think of putting multiple directional lights in the scene at different positions where the Sun can be at different times of the day. Each would project a different shadow, but would they add up correctly? Maybe I could then smooth the projected shadows. I guess the orange-purple gradient can be a filter applied to an originally white-black gradient?

Not asking for source code, just general ideas on how this could be implemented, theoretically, with Three.js. :slight_smile:

I think I would compute solar exposure per vertex and display it like in this example

1 Like

If I was doing it I’d probably draw the radiance on a canvas and then throw that at the geo as a THREE.CanvasTexture. This would let you update the heat map in real time and show as much or as little detail as you liked regardless of the vertex count.

4 Likes

I would modify @becky_rose 's method: a grayscale texture of heat as a base, and a gradient texture.
Like in this example (click grayscale and gradien canvases to change their content):

2 Likes

@felixmariotto @becky_rose @prisoner849 Thank you all for your suggestions! :blush:

It seems you all agree in having the irradiance texture calculated first and then use a gradient texture.