Contours
V3D V2
V3D V2

15. Making Shows with AI

Instead of recording or importing a show, you can describe it in words and let AI write it: "a 2 axis spiral with final diameter 20 cm", then "make it slower". The AI works out every axis's take, Contours checks it, and it goes straight into the show, where you can play it, edit it and run it like any other. You can also ask the AI to change a show you already have, however it was made, and give it a picture, a drawing or a 3-D animation to follow.

The AI is Claude, from Anthropic. Contours sends your requests to Anthropic under your own Anthropic API key, and each request is billed to that key's Anthropic account.

Note. This chapter is about the AI window on the Shows tab. To change only some points of a take with AI, use Ask AI in the point editor (see chapter 13). To rig a 3-D model with AI, see chapter 21. If you don't have an Anthropic API key, Claude desktop can make shows and send them into Contours on your own Claude plan instead (see chapter 24).

Before you start

  • An Anthropic API key. Enter it on the AI tab of Options (see chapter 23). Without one, an AI button only says The AI needs an Anthropic API key. Add one in Options, under AI.

  • Axes. The project needs at least one axis. The AI refers to axes by name, so give them names you will use in your requests (Pan, Tilt, X, Lid), and no two axes the same name.

  • Units and gearing. Set each axis's units and gearing in Axis Setup (see chapter 7). The AI then works in the axis's own units, and Contours can tell when a version is faster than the motor can go.

  • An internet connection.

Tip. Each axis's Description box, on the Axis card in Axis Setup, is for the AI: say in your own words what the axis moves, for example "turns the left arm, which lifts the left leg and tilts the plate". See What the AI knows below.

Opening the AI window

On the Shows tab:

  • To make a new show, click New show with AI (the sparkle) on the Shows bar, beside +. The window opens on an empty conversation. The show is made by the AI's first version and named by the AI; you can rename it on the Show card.

  • To change a show you already have, select it and click Edit with AI (the sparkle) among the icons on its row. This works for any show, recorded, imported, made by AI or empty.

Both are available once the project has an axis. The window's title says which you opened: Generate a show for a new show, Edit with AI - show name for an existing one.

SCREENSHOT Figure 15.1: the AI window after its first request on a new show: the Axes card folded, version 1 in the Conversation, the Preview on Time

Figure 15.1. The AI window after a first request. On the left, the Axes card (folded) and the conversation with version 1; on the right, the Preview; along the bottom, your request and the privacy line.

The AI window

Part

What it holds

Axes (top left)

Every axis in the project, for information. It folds once the first request has gone; click its arrow to open it again.

Conversation (left)

Each request, the AI's reply, and the version it made. You can select and copy any of its text.

Preview (right)

The current version: each axis over time, or the axes against each other as a path.

Your request (bottom)

The box you type in, the paperclip for adding files, the model and effort chip, the send arrow, and what is sent to Anthropic.

The bar

What a running request is doing, and Close.

The Axes card

Each axis has a row: its name, its take in the show as it is now (for example -120 to 80 mm, or No take), the take's peak speed, and the motor's top speed through the axis's gearing. The peak speed turns amber when it is over the top speed. top speed not known: no gearing set means the axis has no gearing to work it out from.

Above the rows the card says The AI can use every axis: say in your request which to move. An axis it leaves out stays as it is., and the interval the show is made at, for example Rows every 100 ms. A new show is made at 100 ms; an existing show at the interval most of its takes use. A line in the theme colour says which show the versions go into.

The note under the rows says how big the AI makes things when you don't say: within the chart range set in Options, or a take's own range where that is wider, or, with a rigged model, each axis's travel on the model.

Note. A take at another interval is sent to the AI at the conversation's interval, and its row says so: Z's take is at 20 ms. The AI sees it at 100 ms, and a change to it is written at 100 ms. A take the AI leaves alone keeps its own interval.

Making a request

  1. Type what the axes should do, or what should change, in the box: What should the axes do, or what should change?

  2. Press Enter, or click the send arrow (Send).

  3. The box empties and your request appears in the conversation. While the AI works, the bar says what it is doing and for how long, for example Thinking · 0:08 or Running code · step 7 · 3:12. The AI writes the show with code, so a request can take from a few seconds to several minutes; one with a picture or a long, detailed show takes longest.

  4. The reply appears under your request, with the version it made. The version is already in the show, and on the Shows tab's chart behind the window.

Then ask for the next change, in the same conversation: make it slower, twice as big, add a pause at the top, leave Tilt as it is and make Pan go further. Each request starts from the current version. You can also ask a question (how fast does Pan go?): the AI answers, and no version is made.

Writing a good request

  • Give sizes, times and speeds with their units: a circle 100 mm across, once every 4 s, three times.

  • Say which axes to move. An axis the AI leaves out keeps its take.

  • Anything you leave out is chosen for you, and the reply lists those choices under Chosen for you. If one is wrong, say so in your next request.

  • Make big changes in small steps. Each version can be gone back to (see Versions and going back).

What a reply shows

  • The AI's summary of what it did.

  • Chosen for you: what the AI decided for you, such as a size or a speed you didn't give.

  • Notes (in amber): things to check. See What Contours checks below.

  • The version's chip, Version 1, Version 2 and so on, with the axes it changed beside it (Changed Pan and Tilt.). Under the version that is in the show: In show name.

  • The model that answered and an estimate of what the request cost, for example Haiku 5.5 · $0.01.

A version that goes into the show is an unsaved change to the project. Save the project to keep it.

What Contours checks

Contours checks every show the AI makes before it goes in: a row every interval from 0, and a number for every axis on every row. If something is wrong, Contours sends the AI what it found and asks once for a fix; the bar then says Fixing what the checks found: .... Anything still wrong after that is listed in the version's Notes.

The notes also tell you about anything that may not work on the motors, without stopping it:

  • An axis that moves faster than its motor's top speed, and when.

  • A take longer than a motor holds, which can be streamed but not loaded into the motor (see chapter 9).

  • An axis that goes past its travel on the rigged model, where the model stops at its ends.

  • Takes held at their last value to the end, because the version made the show longer.

  • An axis left as it was because its column couldn't be read.

Contours doesn't hold the AI to the chart range, the top speed or the motor's memory: these are where it starts when you don't say. If you ask for more (a bigger move, a faster one, a 30-minute show), the AI does it and says so in the notes.

The Preview

The Preview shows the current version, its number and request in the card's title. Until there is one it says The show appears here once the model has made it. When you edit a show, it shows the takes as they are before your first request.

  • Time: each axis over time, in its colour. A dashed line is a motor holding its position; a marked time is too fast for that axis's motor.

  • Path: the axes against each other, flat for two axes and 3-D for three, with a list of views (3-D, Top, Front, Side). It uses the project's first axis group whose axes the version has (see chapter 17), or else its first two or three axes. The caption names them. The points are joined with straight lines; the motors' smooth curve between points isn't drawn.

  • Trace: only for a version made from a picture. See Adding pictures, drawings and 3-D files.

The choice of Time or Path is remembered, and is shared with the import window's Preview.

SCREENSHOT Figure 15.2: the Preview on Path for a two-axis spiral, X and Y in an axis group

Figure 15.2. The Preview's Path view: the version drawn as the path the two axes make together.

Versions and going back

Every version goes into the show as it is made, and its chip is highlighted while it is the current version. To go back, click an earlier version's chip. It goes back into the show and the Preview at once; nothing is sent to Anthropic and nothing is charged. Your next request changes that version, and the version it makes says Made from version 1.

  • As it was: when you edit a show that has takes, the conversation starts with this chip, The show's takes when this conversation began. Click it to put the show back exactly as it was.

  • If the AI makes a show identical to the one you asked about, no new version is made, and the conversation says The show it saved is version 1 unchanged, so no new version was made.

  • The chips can't be clicked while a request runs.

When you close the window, the version in the show stays there. To abandon the changes, click As it was before you close it.

SCREENSHOT Figure 15.3: a conversation with four requests, gone back to version 2: its chip highlighted, version 4 below it made from version 2

Figure 15.3. A conversation that went back. Version 2's chip is highlighted, and the version made after it says what it was made from.

Versions kept in the project

A show keeps its AI history in the project: the requests and replies that led to the version now in the show, and the last 10 of those versions themselves. When you open Edit with AI on the show again, even after closing Contours, they are in the conversation, dimmed, with their chips, followed by As it was. Click a chip to put that version in the show before you send anything; your first request then starts from it.

  • A kept version is greyed when it can't be used, and says why: Made at 50 ms; this edit is at 100 ms., or Made on Q, which this project has no axis for.

  • Only the versions leading to the one in the show are kept. A branch you went back from is not.

  • Changes you made by hand after a version went in are not a version. If you choose a kept version, click As it was to get them back.

The AI also gets the show's earlier requests, so a later conversation carries on from them.

Adding pictures, drawings and 3-D files

You can give the AI a file to work from: a logo to trace, a sketch of a path, a 3-D animation to follow. Click the paperclip (Add a picture, drawing or 3-D file) and choose one or more files, or drop them anywhere on the AI window. Each waits as a chip under the box, where its × takes it away, and goes with your next request. The conversation lists the files each request took.

File

What Contours sends

Pictures: PNG, JPEG

The picture, which the AI can see. A phone photo is turned the right way up, and a large picture is made smaller (2576 pixels on its long side).

Drawings: SVG

The drawing's lines as points, with a picture of them. Text, embedded images, clip paths and masks can't be read: they are left out, and a note under the box names them (Left out of badge.svg: 2 text.). Convert text to paths in your drawing program first.

3-D: GLB, glTF, BVH, OBJ

The file as it is: an animation to follow, or a path. A glTF whose data is in separate files is turned away (export it as GLB), and so is FBX (export it as glTF/GLB or BVH).

When the AI works from a picture, it draws what it traced, in red, over the picture, and the Preview opens on Trace. Check that the red follows the drawing before you rely on the version: a misread picture shows its mistake there.

SCREENSHOT Figure 15.4: a version made from a picture (a simple logo outline), the Preview on Trace with the red trace over the picture

Figure 15.4. A version made from a picture, on the Trace view. The red line is what the AI traced.

Files aren't saved in the project. They go to Anthropic with the request and are deleted when the conversation ends.

What the AI knows

  • The axes: every axis's name, unit, default range, top speed and how many rows its motor can hold, and the interval the show is made at.

  • The show: when you edit a show, its current takes, its earlier AI requests, and the code that made its last AI version.

  • Your descriptions: each axis's Description from Axis Setup (see chapter 7).

  • The rigged model, when the project has one (below).

The AI doesn't see the video, the motors' positions, or anything else in Contours.

Shows for a rigged model

When the project has a 3-D model whose joints the axes drive (see chapter 18 and chapter 20), the AI is told about it: the model's name and size, its bodies and their parts, and what each axis moves and how far it can travel on the model. So you can ask in the model's own words: tilt the plate towards the left arm and back, twice, then circle it slowly. Left and right are the model's own, unless you say otherwise.

  • Each axis's travel on the model is its default range, and the Axes card's note says so.

  • Each axis can have two lines saying what it does: your Description, and a line from the model's rig, shown in Axis Setup as From the model: (set when the model is rigged, see chapter 21). Where they differ, the AI follows yours.

  • Contours works the model out as the window opens, and your first request waits for it. If you change the rig in the Model window while the AI window is open, your next request tells the AI.

SCREENSHOT Figure 15.5: Edit with AI on the BiDex hand's index finger project, show Curl, spread and beckon: the Axes card open (Index spread, Index MCP, Index PIP) with the note about each axis's travel on the model, and a request to beckon twice, slowly, with its version

Figure 15.5. Edit with AI on the BiDex hand's index finger. The Axes card's note says each axis's travel on the model is its default range.

Requests it turns away

The AI only makes and changes motion shows, and answers questions about them, their axes, motors and timing. Asked anything else, it replies The AI only makes and changes motion shows, and answers questions about them. For help with Contours itself, see the User Guide. It makes no version, and the conversation carries on. A request that mixes the two gets the motion made and a note on what was left out.

Text inside a file you add is treated as material to work from, never as a request.

Stopping a request

While a request runs, the send arrow becomes a stop button, Stop this request. Click it or press Esc. The bar says Stopping..., then the conversation says Cancelled. The request is back in the box. Your request and any files are back under the box to send again. What the AI had used until you stopped it is still billed.

A request that fails says why in the conversation, and it too goes back in the box. The common reasons:

Message

What to do

Anthropic refused the API key. Check it in Options, under AI.

Enter the key again in Options (see chapter 23).

Couldn't reach Anthropic. Check the internet connection and try again.

Check the PC's internet connection, and that your network lets it reach Anthropic.

Too many requests just now. Wait a minute and try again.

Wait, then send it again.

This API key can't use model. Choose another model.

Choose another model with the chip (below).

The model used all its room for one reply before it finished.

Try again, or ask for the change in smaller steps.

See chapter 26 for more.

Choosing the model and effort

The chip beside the send arrow names the model and effort the next request uses, for example Haiku 5.5 · medium. Click it to open AI model and effort:

  • Recommended: what Contours was tested with. For shows, Haiku 5.5 at medium effort, about $0.01 a request.

  • Custom: choose the Model (Haiku 5.5, Sonnet 5.5, Opus 5.5, Fable 5.2, or Other model ID... to type one) and the Effort (low, medium, high, xhigh, max).

A larger model or a higher effort costs more and takes longer, and may help with a difficult show. The choice applies to this window from its next request, and the conversation carries on. Each time the AI window opens it starts from the choice on the Models card in Options (see chapter 23). Fable 5.2 needs 30-day data retention on your Anthropic organisation.

The AI model and effort panel open above the request box, Custom, Sonnet 5.5 and high chosen

Figure 15.6. The AI model and effort panel, opened from the chip beside the send arrow.

Privacy

The line under the request box says what is sent: Your requests, every axis's name, unit and default range, the current takes and any files you add are sent to Anthropic. With a rigged model, the description of the model and each axis's description are sent too.

The (i) at the end of the line says the rest:

  • Requests and files go from this PC straight to Anthropic, under your own API key. Myostat never sees your requests, files or key.

  • They are billed to your Anthropic account.

  • What Anthropic keeps, and for how long, is set by your organisation's agreement with Anthropic (privacy.claude.com).

  • Your key is stored encrypted on this PC, for your Windows user only.

  • Contours deletes the files it sent, and the files the AI made, when the conversation ends or Contours closes.

Costs

Each reply ends with the model that answered and Contours' estimate of what the request cost, from Anthropic's published prices. A question costs less than a new show, and a turned-away request costs a fraction of a cent. Your Anthropic account's billing is the final word.

Contours also adds a row for every request to a cost log you can open in Excel: the time, the request, the model, how it went, the tokens, the cost, the seconds it took and the show. Open it with Open cost log on the AI tab of Options (see chapter 23).

Closing the window

Click Close, or press Esc while no request is running. The version in the show stays, and the conversation's files are deleted from Anthropic. Save the project to keep the show and its AI history.