# Near/Far Begin

Near/Far Begin is a versatile optimization tool used in lighting to enhance visual quality and improve performance, especially in scenarios involving unmotivated lights or complex environments.

**Functionality:**

* **Near Begin:** This parameter determines where the light rendering begins, originating from the Light object. It serves a crucial role in optimization by stopping the rendering of pixels, effectively minimizing computational load. Near Begin acts as a boundary for rendering, preventing unnecessary pixel calculations.
* **Far Begin:** Also starting from the light source, Far Begin softens the edge created by Near Begin. By defining the boundary between illuminated and non-illuminated areas, Far Begin ensures a smooth transition. Without this parameter, a harsh seam akin to an Oriented Bounding Box (OBB) would be visible.

**Usage Scenarios:**

1. *Faking Light:* Near/Far Begin can be used to simulate natural light sources, such as sunlight or smaller fixtures, by spreading light effectively. By adjusting Near and Far Begin values, one can conceal artificial lighting, avoiding noticeable specular highlights.
2. *Large Forerunner Rooms:* In expansive environments, especially Forerunner-style rooms, point lights with tweaked Near and Far Begin values create hollow centers while generating lights at the outer bounds. This technique enables the creation of rim lights and specular hits without cluttering the space with additional light sources.
3. *Optimizations:* Applying Near/Far Begin settings to all lights can significantly optimize rendering. By excluding the top portions of spotlights from calculations, fewer pixels are processed, enhancing overall performance. Utilizing this optimization across all lights collectively improves performance, contributing to a more efficient rendering pipeline.
4. *Organic Maps:* In organic environments like caves, where curved surfaces complicate the use of Oriented Bounding Boxes (OBBs), Near/Far Begin settings prove invaluable. These parameters minimize overlap and optimize lighting calculations in intricate, curved spaces, ensuring a visually appealing result without sacrificing performance.

<figure><img src="/files/dLmEaUcbUvsUqSW6Qn6u" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/MeK4FkPN5YMHqj60MTEY" alt=""><figcaption></figcaption></figure>

Here is an example of default lights and their heatmaps. Notice how the more pixels are being affected near the source of the lights.

<figure><img src="/files/Vy4O0nmtqauw8E2bwtce" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/oN2vIPLYXn67q1kWieg1" alt=""><figcaption></figcaption></figure>

And lastly here is an example of Far begin, Where is softens the edges but it doesn't contribute to cutting off Pixels. Only Near begin does that.

<figure><img src="/files/ERJaQp2qpRgqDFndGVHk" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/o9ibdA8z80ROO2xFdnq8" alt=""><figcaption></figcaption></figure>

**Contributors**\
Tyler | Lighting Artist\
Captain Punch


---

# 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://wiki.thescriptersguild.com/forge/lighting/settings-object-based-lighting/near-far-begin.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.
