# Path Tracing

The project is designed with Path Tracing in mind, making the demonstration City Scene fully prepared for high-quality, path-traced rendering.

To use the optimal settings for path tracing, select "B\_Settings" from the scene and enable the "Path Tracing" checkbox.

<div align="left"><figure><img src="https://2879434512-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmcoqWcKLaQGjAoIZlvwX%2Fuploads%2FMq6Vv2wJKPoBQJq866eu%2F2024-11-11_22h41_06.png?alt=media&#x26;token=744103f8-0155-475c-84a4-1e23ae1cb9fe" alt=""><figcaption></figcaption></figure></div>

<figure><img src="https://2879434512-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmcoqWcKLaQGjAoIZlvwX%2Fuploads%2FtGjVkgB9AOMX5MrGgbfJ%2FPathTracing.gif?alt=media&#x26;token=1ec123bc-1565-4d82-89de-1d4ec190c572" alt=""><figcaption></figcaption></figure>

The problem that could appear at some specific angles of the sun, the light will "leak" through the building. This occurs because, in path tracing, shadows are cast differently compared to virtual or cascade shadowing techniques.

<figure><img src="https://2879434512-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmcoqWcKLaQGjAoIZlvwX%2Fuploads%2FdfUk6xKg8W8ACdY2BNFY%2F2024-11-11_23h03_02.png?alt=media&#x26;token=32f6d8dc-dc3c-4bca-9e9e-a2a3670289c1" alt=""><figcaption></figcaption></figure>

You can resolve this issue by enabling "Block Occlusion" in the Occlusion Culling category for the building where the light is leaking:

<div align="left"><figure><img src="https://2879434512-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmcoqWcKLaQGjAoIZlvwX%2Fuploads%2FTov2f0TKpQ1EcZ5R11aO%2F2024-11-11_23h13_25.png?alt=media&#x26;token=c2d515b6-23ca-4ab7-9dea-ae6e5a1ea4bc" alt=""><figcaption></figcaption></figure></div>

Enabling this option will generate an interior "block" shaped like the building to prevent light leakage. It's not performance-efficient, so it's recommended only for use with path tracing.

<figure><img src="https://2879434512-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmcoqWcKLaQGjAoIZlvwX%2Fuploads%2FcU0cuqjTGeGqfGE6ya5U%2F2024-11-11_23h12_39.png?alt=media&#x26;token=9ca73b2b-7c10-4ba0-9095-21f1bf32dd35" alt=""><figcaption></figcaption></figure>


---

# 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://polysphere-studio.gitbook.io/citycore-newyork/path-tracing.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.
