Docs / AR Experiences

Blocks, video and buttons

A scene is a list of blocks. Every block has the same two questions answered for it — where is it? (Placement) and when is it visible? (Reveal) — plus its own content. This page is the complete reference, and shows how to build the classic card: a message that plays on the card, and a button that appears while it plays.

A video plays on the printed card and a button appears once it has been running for two seconds

Placement — where a block sits

Every block has a Placement group in the Design panel.

FieldMeaning
Spacetarget (the default): positions are millimetres from the centre of the printed card. meters is world space, for scenes that are not tied to a printed card.
X / Y / ZX is to the right, Y is up, Z lifts the block off the card toward the viewer — give a block that overlaps another a small Z (for example 1 mm) so it sits in front.
Rotate X / Y / ZDegrees.
Scale / Scale X / Y / ZA uniform scale, or per axis.

Positions only mean something once the target has a Printed Width (mm). The viewer converts millimetres into the card’s own units using that width, so “48 mm above the centre” is the same on a business card and on a poster. Without a printed width the viewer assumes 100 mm.

Widths work the same way: a block’s Width is in millimetres, and 0 means “as wide as the card”.

Reveal — when a block is visible

Show whenBehaviour
Target found (default)As soon as the camera recognises the card.
AlwaysNo condition: visible whenever the card is in view.
After delayN seconds after the card was found (At).
Video timeWhen the video has played for N seconds (At).
TapAfter the visitor taps the block.
Hide whenBehaviour
Target lost (default)When the card leaves the picture.
NeverStays once shown.
After delay / Video timeN seconds after the card was found / the video reached N seconds (Hide at).

Animation is fade, scale, slide (rises into place) or none. It is decoration only — a block is always shown or hidden correctly whichever you pick.

Video time follows the scene’s first video block. If a scene has several videos, put the video’s block id in Driven by.

The blocks

AR Text

A heading and a body, optionally on a translucent plate so it stays readable over whatever the camera sees.

Field
Heading, BodyThe text.
WidthMillimetres; 0 = the card’s width.
AlignmentLeft, centre or right.
Text colorAny CSS colour.
Font sizeCap height in millimetres, so the type keeps its size relative to the print. Empty = a size that fits the width.
Plate color, Plate opacitySet a plate colour and a plate is drawn behind the text — the biggest legibility win over a busy background.
Corner radiusMillimetres; rounds the plate.
Always face the cameraThe text turns to follow the viewer instead of lying on the card.

AR Image

A flat picture on the card — a logo, a photo, a decorative overlay.

Field
ImagePick from the Assets library.
WidthMillimetres; the height follows the picture.
Opacity0–1.
Respect alpha channelKeeps PNG transparency (on by default).
Always face the camera, Alt textAs above; the alt text is set as an aria-label.

AR Video

A video on the card. This is the block the format is built around.

Field
VideoAn MP4 (H.264 + AAC) from the Assets library.
PosterA still shown before playback. It is the tap target.
WidthMillimetres; the height is 16:9 of the width.
Show play buttonNeeds a poster; hides the poster once playback starts.
AutoplayStarts when the card is found — only if Muted is also on.
Muted, LoopAs named.
Show controlsA progress bar under the picture; tap it to jump to that point.
Chroma key, Key colorMakes pixels close to the key colour transparent — footage shot on a green screen (or blue: set the colour) shows the person or object standing on the card.

Things to design around:

  • Playback needs a tap. iOS and Android only autoplay muted video. A message with sound must start from the visitor’s tap, which is why the poster exists — make it look tappable. Tapping the video afterwards pauses and resumes it.
  • The video pauses when the card is lost and continues from the tap again.
  • Use a poster. Without one a not-yet-playing video is a black rectangle with nothing to tap.
  • Keep videos short and well compressed — they stream over mobile data. MP4 with H.264 plays everywhere.

Chroma key tips: shoot on an evenly lit green background, avoid green clothing, and export at a modest size — keying runs on the phone’s graphics chip for every frame.

AR Button

A call to action. The visitor taps a real HTML button drawn over the camera picture by your app — not a shape inside the 3D scene — so it is easy to hit, reachable by screen readers and works on iOS.

ActionWhat your app receivesTypical use
url{ kind: 'url', url }Open a page, a map, a ticket shop.
whatsapp{ kind: 'url', url: 'https://wa.me/…' }Reply on WhatsApp with a prefilled message.
tel{ kind: 'url', url: 'tel:…' }Call.
mailto{ kind: 'url', url: 'mailto:…' }Write an email.
share{ kind: 'share', text }Share a message (navigator.share).
scene{ kind: 'scene', scene }Switch to another scene — your app decides what that means.
event{ kind: 'event', name }Anything your app wants to do: add to calendar, confirm an RSVP, open a form.

The button’s Label, the number (international format, +41…), the prefilled message and the address are set in the block. Render inside the 3D scene draws a plain plate in the scene as well; your app still receives the action.

Buttons follow their Reveal rule. “Hide when the card is lost” and “Show at 2 seconds of video” are honoured: the SDK tells your app when each button becomes visible or hidden, and the prompt and the SDK page show how to draw only the visible ones. A button set to Tap cannot be tapped before it is drawn — use Target found, Delay or Video time for buttons.

AR 3D Model

A glTF / GLB model on the card.

Field
ModelA .glb or .gltf from Assets.
Animation clipName of the clip; empty plays the first.
Autoplay / Loop animationOn by default.

Scale and rotation are in Placement. Shadow (cast, receive, both) makes a model cast a shadow onto blocks that receive one; a model on its own, with nothing to fall on, shows none. The scene is lit with a soft ambient and one directional light. Keep models small (a few MB) and test them on a mid-range phone.

AR Shape

A simple 3D shape that stands on the card — a cube with your logo on top, a glowing orb, a ring. No model file to prepare.

Field
ShapeBox, sphere, cylinder, cone, disc (flat circle) or ring.
SizeWidth or diameter in millimetres.
HeightMillimetres; empty = same as the size. Box, cylinder and cone.
Colour, OpacityAny CSS colour; 0–1.
Image, Image placementWrap stretches the picture over the whole shape; label puts it as a flat decal on the top face — the way to put a logo on a box.
Animation, Seconds per cycleSpin turns it around the card’s normal, float bobs it up and down, pulse breathes in and out, wobble tilts it side to side.

The shape’s base rests on the card (its lowest point is at Z = 0); use Placement Z to lift it. On the stage the animation is not played — test it with the viewer.

AR Audio

A sound that starts when the card is found and stops when it is lost.

Field
AudioAn audio file from Assets.
Loop, Volume0–1.
Positional audio, Rolloff distanceSound that gets quieter as the phone moves away (millimetres).

Browsers refuse audible playback without a gesture, so on a phone the sound plays once the visitor has interacted with the page — in practice, after the “Start AR” tap that opens the camera. For a message the visitor must choose to hear, use a video block with a poster instead.

AR Group

Holds other blocks so they move and appear together. Its own Placement applies to everything inside and its Reveal gates the whole group — “the RSVP panel appears at 0:42” stays one decision instead of one per child. Children are positioned in the group’s own space, so moving the group moves them all. On the stage, drop a block onto a group to put it inside. A group cannot hold another group.

Recipes

A video message with an RSVP button.

  1. Add an AR Video: pick the video, pick a poster, width 60, leave Show play button on and Muted off.
  2. Add an AR Button: label “Reply on WhatsApp”, action whatsapp, your number, a prefilled message. Under Reveal choose Show when → Video time, At 42.
  3. Publish. The visitor taps the poster, the video plays with sound, and the button appears at 0:42.

A greeting that fades in, then a photo after three seconds. AR Text with Target found and Fade; AR Image with Show when → After delay, At 3.

A card that shows a menu only when tapped. Put the menu in an AR Group with Show when → Tap and give it a small AR Text or AR Image as the thing to tap.

Two sides of one card. Add a second target to the experience for the back, and a scene under each. Compile once — both targets live in the same bundle.

One scene or several

A target can hold more than one scene. The built-in viewer shows the first active scene of each target. A scene’s Rule (the same rule builder personalisation uses) is evaluated by your own app: it filters the manifest before mounting the viewer, which is how you show a German scene to German visitors. Untick Active to take a scene out of play without deleting it.

What the viewer will not do

  • It does not play sound or video that would need a gesture without one — by design.
  • It tracks the images you compiled; it does not recognise 3D objects or places.
  • Several targets can be in one bundle, but a phone tracks one at a time.
  • It does not draw its own buttons — your app does (that is deliberate, see AR Button).

Next: wire the viewer into your app.

Pilot documentation. Studio is in a partner pilot. Screens and YAML shown here are current as of the version noted on each page; tell your Maravilla contact when something does not match what you see.