> For the complete documentation index, see [llms.txt](https://visionstore.gitbook.io/visionstore-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://visionstore.gitbook.io/visionstore-docs/scripts/weaponhub/configuration/preview-and-stage.md).

# 3D preview and studio

The 3D camera, studio lights, depth of field and the studio backdrop behind the weapon.

Both blocks are in `config/config.lua`.

## 3D preview

```lua
Config.Preview = {
    fov = 30.0,
    minDistance = 0.45,         -- camera distance is fitted to the weapon, then clamped here
    maxDistance = 2.4,
    pitchLimit = 35.0,          -- degrees the weapon can tilt up / down
    lights = true,              -- studio key + rim light around the weapon
    depthOfField = true,        -- blur the world behind the weapon
    hidePlayer = true,          -- hide the local player while the hub is open
    timecycle = nil,            -- optional timecycle modifier name
}
```

| Option                        | Default        | Meaning                                                             |
| ----------------------------- | -------------- | ------------------------------------------------------------------- |
| `fov`                         | `30.0`         | Camera field of view                                                |
| `minDistance` / `maxDistance` | `0.45` / `2.4` | The camera distance is fitted to the weapon size, then clamped here |
| `pitchLimit`                  | `35.0`         | Degrees the weapon can tilt up and down                             |
| `lights`                      | `true`         | Studio key and rim lights around the weapon                         |
| `depthOfField`                | `true`         | Blur the world behind the weapon                                    |
| `hidePlayer`                  | `true`         | Hide the local player while the hub is open                         |
| `timecycle`                   | `nil`          | Optional timecycle modifier name                                    |

## Studio backdrop

The backdrop is a web page (`stage/backdrop.html`) drawn in the game world just behind the weapon, so the weapon renders in front of it with real depth. To keep walls and roofs out of the shot, the stage moves into clear air above the bench and the screen fades across.

```lua
Config.Stage = {
    enabled = true,
    image = 'studio.webp',
    width = 1536,               -- DUI size; keep the photo's aspect ratio
    height = 1024,
    distance = 1.1,             -- metres behind the weapon
    closeDistance = 0.55,       -- used when no clear air was found
    lifts = { 40.0, 70.0, 110.0, 160.0 }, -- heights tried for clear air above the bench
    brightness = 235,           -- 0-255 multiplier on the backdrop
    clearRain = true,           -- no rain streaks in front of the backdrop
}
```

| Option             | Default                        | Meaning                                                                                                                     |
| ------------------ | ------------------------------ | --------------------------------------------------------------------------------------------------------------------------- |
| `enabled`          | `true`                         | `false`: the weapon floats in front of the player at the bench, with no backdrop                                            |
| `image`            | `'studio.webp'`                | A photo in `stage/` (`studio.webp`, `.png` and `.jpg` are also tried). Without one, a built-in dark workshop scene is drawn |
| `width` / `height` | `1536` / `1024`                | Backdrop resolution. Keep your photo's aspect ratio                                                                         |
| `distance`         | `1.1`                          | Metres behind the weapon                                                                                                    |
| `closeDistance`    | `0.55`                         | Used when no clear air was found (deep interiors)                                                                           |
| `lifts`            | `{ 40.0, 70.0, 110.0, 160.0 }` | Heights tried for clear air                                                                                                 |
| `brightness`       | `235`                          | 0 to 255 multiplier on the backdrop                                                                                         |
| `clearRain`        | `true`                         | No rain streaks in front of the backdrop                                                                                    |

### Use your own photo

1. Save your photo as `stage/studio.webp` (or `.png` / `.jpg`), or put any file in `stage/` and set `image` to its name.
2. Set `width` and `height` to the photo's aspect ratio (the default is 3:2).
3. `restart vision_weaponhub`. `stage/*` is already listed in `fxmanifest.lua`, so nothing else is needed.

{% hint style="info" %}
Benches with a fixed `preview` spot (see [Workbenches](/visionstore-docs/scripts/weaponhub/configuration/workbenches.md)) show the weapon at that spot. `/weaponhub_here` fills one in for you.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://visionstore.gitbook.io/visionstore-docs/scripts/weaponhub/configuration/preview-and-stage.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
