Calculating shading factors
Pre-calculation of shading factors per sky segment: surface-partitioning and rendering methods, Tregenza/Reinhart quality levels, geometry mode, output formats and up-to-date hash
Overview
VICUS Buildings calculates the shading from self- and external shading (building wings, neighboring buildings, shading elements) not during the dynamic simulation, but in an upstream calculation step. The result is, for each exterior surface and window, a shading factor per sky segment (0 = fully shaded, 1 = unshaded), stored in a file shading_factors.tsv/.d6o/.d6b in the input/ subfolder of the project data folder. For this, the sky is divided into approximately equal-sized segments according to Tregenza or Reinhart; from the segment factors, the solver determines the reduction of direct and diffuse solar radiation during the simulation (see Window calculation model).
Access
Main toolbar, button Simulation (F10), there the page
Dynamic simulation, tab Building settings, section Shading calculation. Advanced options can be expanded under Detailed settings.
The calculation requires a valid simulation time interval and valid location data; otherwise the start button is disabled and a corresponding error message is shown. Latitude and longitude are taken from the location data, or alternatively read from the selected climate file (see Climate & Location).
Considered surfaces
Which geometry is included is controlled by the options under Simulated geometry in the same tab:
- Simulate the entire project (all buildings) – all surfaces of the project, regardless of visibility or selection. Before the start, a confirmation prompt appears with the number of surfaces, sub-surfaces and obstacles.
- Simulate only selected geometry – only currently selected surfaces, windows and shading elements. Without a selection, the calculation aborts with an error message.
Shading factors are only generated for exterior surfaces with sky contact. The following are skipped:
- surfaces without a component assignment or without valid boundary conditions on both sides,
- interior components (component instances with surfaces on both sides) and ground-coupled components,
- surfaces and windows smaller than 0.1 m² in area (they are also not exported into the simulation model).
Notice messages inform you about the skipped surfaces (e.g. “n surfaces were skipped because they have no component assignment or invalid boundary conditions assigned to them.”). No factors are calculated for shading elements themselves – they only act as obstacles.
Calculation methods
Under Calculation mode: two methods are available:
Surface partitioning
Purely geometric polygon clipping: for each sky segment, all obstacle polygons (remaining building surfaces and shading elements) are projected onto the surface under consideration from the direction of the segment center. The shading factor results from the ratio of the unobscured to the total area. The calculation runs parallelized over all surfaces.
Rendering
Combination of clipping and GPU rendering: the self-shading of the calculated surfaces among each other is determined by clipping as in surface partitioning. In addition, the scene is rendered once with and once without shading geometry from the segment direction for each sky segment; from the pixel ratio of the visible surface fractions, an external shading factor results, which is multiplied by the clipping factor. The displayed scene geometry, including shading elements and imported OSM buildings, is used in the rendering. The setting Pixel density: (default 80) determines the raster resolution of the rendering and only takes effect in this mode.
Quality levels (sky model)
The slider between Fast and Detailed selects the sky discretization:
| Level | Sky model | Segments | Angular resolution |
|---|---|---|---|
| 0 | Tregenza | 145 | ~12° |
| 1 (default) | Reinhart MF2 | 580 | ~6° |
| 2 | Reinhart MF3 | 1305 | ~4° |
| 3 | Reinhart MF4 | 2320 | ~3° |
More segments increase the accuracy of the direct-radiation shading in particular, but extend the computation time approximately proportionally.
Geometry mode
Under Geometry mode: you define how the component thickness is taken into account:
- Planar surfaces – all surfaces enter the calculation as planar polygons (default).
- Extruded surfaces based on construction thicknesses – each surface is shifted by the total thickness of its construction along the surface normal; in addition, perpendicular side surfaces are added at all edges as obstacles (reveal shading). Windows are placed in the middle of the construction (half the component thickness); a notice message points this out.
Output and file management
The target file name is shown under Shading-factor file name:: <ProjectName>/input/shading_factors with the extension selected under Output type::
- tsv – text format (tab-separated); is additionally read by the surroundings analysis for display
- d6o – DataIO format (ASCII)
- d6b – DataIO format (binary, most compact file)
There should always be only one shading file: if several files with different extensions exist, the simulation export uses the first one found (search order tsv, d6o, d6b). The status area shows File name: and Created: (date/time) of the existing file; the button Delete shading file removes all existing shading files (
.tsv, .d6o, .d6b).
If no file exists, the simulation runs without shading factors – external and self-shading of opaque components then remain unconsidered.
Starting the calculation
Start shading calculation runs the calculation with a progress dialog (including a remaining-time estimate); it can be canceled at any time via Cancel. After successful completion, the result file is written, the up-to-date hash is updated and the storage location is confirmed in a message.
Up-to-date hash
Alongside the result file, a file shading_factors.hash is stored, which contains a hash over all shading-relevant project data (building geometry, component and sub-surface component instances, shading objects, OSM data, world-coordinate origin as well as location, simulation and solver parameters). The status area continuously compares this hash with the current project state:
| Status | Display |
|---|---|
| Green | The shading factors are up to date with the current project. |
| Yellow | Project changed since the shading factors were calculated – recalculation recommended. |
| Red | No shading factors have been calculated yet. |
The same check runs when starting the simulation: if the factors are out of date, the dialog Shading factors out of date appears with the options Recalculate… (recommended; recalculates and then starts the simulation), Continue anyway and Cancel.
Good to know:
The following staging has proven useful for everyday work: during model creation, use Tregenza (level 0) to quickly check whether the shading situation is plausible, and only switch to Reinhart MF2 or higher for the submission calculation run. The Rendering method is worthwhile above all when imported OSM neighboring development dominates the shading – for pure self-shading of the building, Surface partitioning delivers the same result without GPU effort.
Related topics
- Surroundings analysis – visualization of the calculated factors
- Shading geometry – draw obstacles or import them from OSM
- Starting the simulation
- Assigning solar shading – dynamic blind shading (independent of the geometric shading factors described here)