# Visibility Percent

![](https://894783789-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPHXQ1I3gb93zpLrLZf%2Fuploads%2Fgit-blob-caefefd10b8a511919aa290717c3ea9bac741650%2FVisibility_Percent.png?alt=media)

![](https://894783789-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPHXQ1I3gb93zpLrLZf%2Fuploads%2Fgit-blob-b56468e575e3301e8dbaf6a72c6b75d41d8fd559%2FVisibility_Percent.png?alt=media) - [\[source code\]](https://github.com/ladybug-tools/ladybug-grasshopper/blob/master/ladybug_grasshopper/src/LB%20Visibility%20Percent.py)

Evaluate the percent visibility from geometry to a specific set of points.

Such visibility calculations can be used to understand the portions of a building facade that can see a skyline or landmark when used on the outdoors. When used on the indoors, they can evaluate the spectator view of a stage, screen, or other point of interest.

### Inputs

* **view\_points \[Required]**

A list of points that characterize an area of interest to which visibility is being evaluated. If the area of interest is more like a surface than an individual point, the "LB Generate Point Grid" component can be used to obtain a list of points that are evenly distributed over the surface.

* **pt\_weights**

An optional list of numbers that align with the \_view\_points and represent weights of importance for each point. Weighted values should be between 0 and 1 and should be closer to 1 if a certain point is more important. The default value for all points is 0, which means they all have an equal importance.

* **geometry \[Required]**

Rhino Breps and/or Rhino Meshes for which visibility analysis will be conducted. If Breps are input, they will be subdivided using the \_grid\_size to yeild individual points at which analysis will occur. If a Mesh is input, visibility analysis analysis will be performed for each face of this mesh instead of subdividing it.

* **context**

Rhino Breps and/or Rhino Meshes representing context geometry that can block visibility from the test \_geometry.

* **grid\_size \[Required]**

A positive number in Rhino model units for the size of grid cells at which the input \_geometry will be subdivided for direct sun analysis. The smaller the grid size, the higher the resolution of the analysis and the longer the calculation will take. So it is recommended that one start with a large value here and decrease the value as needed. However, the grid size should usually be smaller than the dimensions of the smallest piece of the *geometry and context* in order to yield meaningful results.

* **offset\_dist**

A number for the distance to move points from the surfaces of the input \_geometry. Typically, this should be a small positive number to ensure points are not blocked by the mesh. (Default: 10 cm in the equivalent Rhino Model units).

* **max\_dist**

An optional number to set the maximum distance beyond which the end\_points are no longer considered visible by the start\_points. If None, points with an unobstructed view to one another will be considered visible no matter how far they are from one another.

* **geo\_block**

Set to "True" to count the input \_geometry as opaque and set to "False" to discount the *geometry from the calculation and only look at context* that blocks the visibility. (Default: True)

* **legend\_par**

Optional legend parameters from the "LB Legend Parameters" that will be used to customize the display of the results.

* **cpu\_count**

An integer to set the number of CPUs used in the execution of the intersection calculation. If unspecified, it will automatically default to one less than the number of CPUs currently available on the machine or 1 if only one processor is available.

* **run \[Required]**

Set to "True" to run the component and perform visibility analysis of the input \_geometry.

### Outputs

* **report**

...

* **points**

The grid of points on the test \_geometry that are be used to perform the visibility analysis.

* **results**

A list of numbers that aligns with the points. Each number indicates the percentage of the \_view\_points that are not blocked by context geometry.

* **mesh**

A colored mesh of the test \_geometry representing the percentage of the input \_geometry's visibility that is not blocked by context.

* **legend**

A legend showing the number of hours that correspond to the colors of the mesh.

* **title**

A text object for the study title.

* **int\_mtx**

A Matrix object that can be connected to the "LB Deconstruct Matrix" component to obtain detailed point-by-point results of the study. Each sub-list (aka. branch of the Data Tree) represents one of the geometry points used for analysis. The length of each sub-list matches the number of \_view\_points used for the analysis. Each value in the sub-list is either a "1", indicating that the vector is visible for that vector, or a "0", indicating that the vector is not visible for that vector.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ladybug.tools/ladybug-primer/components/3_analyzegeometry/visibility_percent.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
