> For the complete documentation index, see [llms.txt](https://docs.rainmad.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rainmad.com/resources/scenes-draw-everywhere/creating-scenes.md).

# Creating Scenes

Start with `/create_scene` (configurable, or via the [export](/resources/scenes-draw-everywhere/events-and-exports.md)). Creation runs in three phases: select a surface, draw in the editor, then settle depth and save. `BACKSPACE` or `ESC` cancels at any point. All keys below are the defaults and can be remapped in `cfg.scenes.controls` ([Configuration](/resources/scenes-draw-everywhere/configuration.md)).

{% stepper %}
{% step %}

## Select the area

Aim at the surface, **hold the left mouse button and drag** from one corner to the opposite corner. The preview turns **green** when the selection is usable and **red** when it isn't. The two corners must sit on the same plane, so if it stays red, try a flatter spot or a smaller area. Walls, floors and inclined surfaces all work.

* **Static world and props only.** Vehicles and peds are not valid surfaces.
* If the surface belongs to an object, it gets an **orange** outline: the scene can be **linked** to it later, in the depth step. Nothing attaches on its own.
* With job/gang location restrictions, the preview stays red outside your allowed areas.

Once the selection is locked you can fine-tune it: **scroll** grows or shrinks it around its center, and holding `SHIFT` (width) or `CTRL` (height) while scrolling changes one dimension only. The hint card shows the size in meters as you adjust. Frames and bezels that kept peeking through a hand-drawn selection are easiest to cover this way: select roughly, then grow until the edges disappear.

Press `ENTER` to open the editor.
{% endstep %}

{% step %}

## Draw

The editor is a layered canvas:

* **Tools:** brush (with stroke smoothing), rectangle / ellipse / line shapes with fill and outline controls, a **Fill canvas** button that colors the whole background as its own layer (it slots under your existing layers), text, an emoji picker, and image layers from an https URL.
* **Text:** color, outline, and the font list: built-in system fonts plus whatever you add in `cfg.nui.fonts`.
* **URL images** are downloaded server-side with strict validation: https only (plain http can be opted in, see [Configuration](/resources/scenes-draw-everywhere/configuration.md)), 15 MB cap (adjustable via `cfg.scenes.maxImageUrlBytes`), real image bytes (webp/png/jpg), no animated GIF/APNG (only a single frame would bake into the scene).
* **Layers:** select, drag to move, corner handles resize, the stem rotates. The properties panel adds opacity, scale, rotation, align, flip horizontal/vertical and duplicate. A scene-wide opacity slider affects the whole drawing.
* **Shortcuts:** arrows nudge 1px (`Shift` = 10px), `DEL`/`BACKSPACE` removes the layer, `Ctrl+Z` / `Ctrl+Y` undo/redo, `Ctrl+D` duplicates.

**Save Scene** bakes the canvas and returns to the world.
{% endstep %}

{% step %}

## Depth, position, save

The drawing now previews on the surface:

| Key       | Action                                                                                                                                                                           |
| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Q` / `E` | Nudge the drawing off / into the surface. If it flickers against the wall (z-fighting), one or two taps settle it.                                                               |
| `R`       | **Reposition:** the drawing keeps its exact size and follows your crosshair; aim at another surface and place it with the left mouse button. `BACKSPACE` returns without moving. |
| `H`       | Show / hide the scenes being merged under your preview.                                                                                                                          |
| `G`       | Toggle the **object link** when the surface is an object: the outline turns **green** while linked, orange while not.                                                            |
| `ENTER`   | Open the save dialog: pick how long the scene stays in the world (`cfg.scenes.durations`), then confirm.                                                                         |

If the upload takes more than a moment, a **Saving Scene** spinner replaces the hint card until the server confirms; quick saves skip it.\
\
The server re-validates everything on save (authorization, job zones, image bytes, per-player rate limits and the scene limit), so what the client sends is never trusted.
{% endstep %}
{% endstepper %}

## Merging overlapping scenes

If your selection overlaps scenes you're allowed to replace (your own; admins: any), the placement hint offers **Merge N overlapping scene(s)**. Press `G` before opening the editor: their drawings open as layers on top of yours, and when you save, the old scenes are deleted and replaced by the single new one: one render instead of many. Up to 16 scenes merge at once. In the depth step, `H` shows or hides the scenes being absorbed.

## Object attachment

A scene drawn on a prop can be **linked** to that object. The link is opt-in: the candidate object shows an **orange** outline during placement, and pressing `G` in the depth step turns the link on (outline goes **green**) or off again. Scenes save **unlinked** unless you enable it.

A linked scene anchors to the object model at that spot: it follows the object and **only renders while the object exists**. That's ideal for containers, signs and furniture. It also means a scene on an object that never respawns stays invisible until the stale cleanup (`cfg.scenes.deleteUnseenAfter`) removes it, or you **detach** it from the scene list, which pins it at its saved world position. An unlinked scene simply stays where you drew it, no matter what happens to the object.
