Articles
2D Objects
Canvas

The Canvas

A Canvas object, about to be added to the Scene panel.

In Spark AR Studio, the canvas is an object that will scale up or down with the size of a device screen.

2D objects like rectangles or 2D text will always be children of a canvas. This means they'll scale in sync with the screen of the device.

Adding a canvas

To add a canvas:

  1. Click Add Object.
  2. Select Canvas.

It'll be listed as canvas0 in the Scene panel and you'll see a blue outline of the canvas in the Viewport:

A screenshot from Spark AR Studio, showing canvas0 in the scene panel and a blue outline around the viewport.

Using a canvas in camera space

The canvas will be in screen space by default. In screen space, the size and shape of the canvas is fixed to fit the screen of the device. You can't change its size, scale or rotation, because they'll always match the device screen.

A canvas in screen space can be used to position 2D objects like rectangles to make 2D effects like frames and colored filters.

To use a canvas in screen space, set the Mode to Screen space in the Inspector.

Build an effect with a canvas in screen space in this tutorial.

Using a canvas in world space

When a canvas is in world space, you can use it to position a 2D or 3D object. The object will only be visible through the camera on the back of the device.

In world space the size of the canvas will no longer be determined by the size of the device screen. You'll be able to adjust this property in the Inspector.

To use a canvas in world space, set the Mode to World space in the Inspector.

Follow this tutorial to build an effect using the canvas in world space.

Properties

Adjust these properties in the Inspector to edit the canvas in your scene. Clicking the arrow to the left of a property will create a patch to represent it in the Patch Editor.

Visible

Clear this box to stop the canvas or any children from being rendered in the scene.

Mode

Use the dropdown to select whether the canvas is in either:

  • Camera space - the size of the canvas will be fixed to fit the device.
  • World space - the canvas can be transformed, for example rotated and resized.

Size

Adjust the width and height of the canvas, if it's in world space.

Transformations

Change the position, scale or rotation of the canvas, if it's in world space.

Enable for

Choose the mobile device camera or cameras that you want the canvas and its children to render to.

Was this article helpful?