# Make your first scene

[Canonical page](https://nothing.graphics/docs/format/guides/first-scene) · [Page source on GitHub](https://github.com/gridaco/nothing/blob/main/ncf/docs/guides/first-scene.md)

Save a complete .nothing still, render it, and predict where it paints.



Save the complete example below as `first-scene.nothing` in the repository root as UTF-8. Its only drawable is a 40 × 40 rectangle painted opaque terracotta. You can also start with the [runnable file](https://github.com/gridaco/nothing/blob/main/ncf/conformance/first-scene.nothing).

```xml
<scene width="64" height="64">
  <shape translate-x="28" translate-y="28">
    <rect width="40" height="40"/>
    <fill><paint><solid color="#CD6843FF"/></paint></fill>
  </shape>
</scene>
```

1. The `scene` establishes a transparent 64 × 64 canvas. The origin is the top left. X increases right and Y increases down.
2. The `rect` gives the `shape` a contour. By default its center is the shape’s local origin. The shape’s translation places that center at (28, 28).
3. The `fill` paints the interior. Its `paint` contains one `solid` value in `#RRGGBBAA` notation. The final `FF` gives full opacity.

## Render and edit the still [#render-and-edit-the-still]

The Rust preview includes fonts from the pinned shared fixture checkout. With Git and Rustup available, initialize that checkout once from the repository root.

```sh
git submodule update --init --checkout third_party/externals/fixtures
bin/check-fixtures
```

Then pass the file you just saved to the Rust preview CLI. Run Cargo from `ncf` to use the project’s pinned Rust toolchain.

```sh
(cd ncf && cargo run --locked -p ncf-preview -- \
  ../first-scene.nothing -o ../first-scene.svg)
```

Open `first-scene.svg` in a browser. The rectangle starts at (8, 8) and its right and bottom boundaries are both 48. At one pixel per scene unit, pixel (8, 8) is terracotta and pixel (48, 48) is transparent. The scene can render with authored base values because it has neither timed placements nor animation tracks. [Preview CLI](https://github.com/gridaco/nothing/blob/main/ncf/tools/ncf-preview/README.md) · [Canvas and clock](https://nothing.graphics/docs/format/spec#canvas-and-clock)

Edit the shape’s `translate-x` from 28 to 36 and render again. The X boundaries become 16 and 56. Then change only the rectangle’s `width` from 40 to 24. The X boundaries become 24 and 48, centered at 36. Both edits leave the 64 × 64 canvas and the Y boundaries fixed. Use the `.nothing` source for edits. The exported SVG describes the rendered sample.

Next, [rotate and resize around a chosen point](https://nothing.graphics/docs/format/guides/rotate-and-resize) or [add paint and stroke detail](https://nothing.graphics/docs/format/guides/paints-and-strokes).

## Examples

[Download the complete .nothing source](https://nothing.graphics/format/first-scene/source.nothing) · [Source on GitHub](https://github.com/gridaco/nothing/blob/main/ncf/conformance/first-scene.nothing)

Rendered with ncf-preview at 64 × 64.

- [Still · Centered rectangle](https://nothing.graphics/format/first-scene/0.webp) at 0s. A terracotta rectangle occupies x from 8 to 48 and y from 8 to 48 on a transparent 64 × 64 canvas.
