# ARchi VR Content Creation

Revision Info: Documentation for ARchi VR Version 2.8 - Nov 2021

## Augmented Reality Content for ARchi VR

### User-generated AR Content

ARchi VR allows any user to capture rooms, add virtual items, and share the finished space within an interactive AR view. See the How to Capture Rooms and the How to Augment Spaces guides for more details. The user-generated Elements available in captured and augmented spaces are documented in ARchi VR Elements.

All available AR elements of ARchi VR are presented as detailed class hierarchy diagram in Classification of Model Entities.

### Curated AR Content

ARchi VR supports five main types of app extensions to provide curated AR content:

• Catalog: catalog of 3D models
• Service: service that a user can select within an AR session to trigger an action
• Workflow: workflow that is manually or conditionally triggered after saving an AR space
• Curation: curation that presents a coherent set of Web pages and AR scenes
• Channel: channel from which dynamic AR content can be received (not yet available)

Catalog, Service, Workflow, Curation, and Channel extensions can be provided by third parties as custom expansions for end-users of ARchi VR. See ARchi VR Extensions for more details.

In opposite to user-generated content, curated content is provided by an organisation (e.g. a company or an association). Curated content needs to be registered with ARchi VR by the corresponding organisation. Please contact support@metason.net to request registration and publication of curated content.

### Dynamic Behavior

Curated content can add new items to an AR scene and additionally run tasks to control items. Tasks may also act on visuals, UI elements, data, and processes. A task defines its behaviour by the "do" tag.

Dynamic behaviour of AR scenes is supported by active rules which specify Event - Condition - Task dependencies. Get more details in Dynamic Behavior using Active Rules.

## Declarative Creation of AR Content

### Declarative AR

ARchi VR app extensions are technically based on declarative AR specifications. Instead of using a programming or scripting language to algorithmically describe HOW an extension should work, the decalarative approach focuses on specifying WHAT ('task') should be done with which object ('item'). The declarations of ARchi VR app extensions are stored in JSON data structures and do not include conventional program code.

The following example Action specifies WHAT tasks should be executed on WHICH item:

{
"$schema": "https://service.metason.net/ar/schemas/action.json", "items": [ { "type": "Geometry", "subtype": "Box", "id": "red.box", "attributes": "color:#FF0000; wxdxh: 0.5x0.9x0.5;" } ], "tasks": [ { "do": "add", "id": "red.box", "ahead": "0.0 0.0 -1.0" }, { "do": "remove", "id": "red.box", "in": "5.0" } ] }  You can read this declaration as: • "create a box with the identifier red.box. It uses a color and has wxdxh dimensions of 0.5x0.9x0.5 (meters)" • "add red.box 1 (meter) ahead of the user" • "remove red.box in 5 (seconds)" ## declARe - Create AR Content with Schema Support The declaration of ARchi VR app extensions and all interactive AR content is stored in JSON data structures. The specification vocabulary is made explicit as JSON schemes. A JSON schema provides clear human- and machine-readable documentation for defining and validating the structure of the corresponding JSON data. More information on the JSON schema (draft) standard can be found at https://json-schema.org. The "declARe" JSON schemes are including specifications for: Various editors and IDEs have direct support for JSON schema. You therefore may use the "declARe" JSON schemes in your favourite code editor to support data validation, problem reporting, tooltips, auto completion, and code snipplets. Copy the corresponding template file to start with. The "declARe" JSON schemes — used here in 'Visual Studio Code' — facilitate validation, problem reporting, tooltips, auto completion, and code snipplets to support the creation of AR content. Editors with JSON schema support (such as VS Code) will map the JSON schema automatically from the $schema attribute embedded in the edited JSON file. In the following example, a JSON file for an AR action specifies that its contents follow the declARe schema in https://service.metason.net/ar/schemas/action.json.

{
"$schema": "https://service.metason.net/ar/schemas/action.json" ...  The JSON files for App extension and for AR catalog do not support the $schema attribute. In VS Code you may associate a schema to files in the User settings (File > Preferences > Settings) under the property json.schemas. The following excerpt from User Settings shows how files can be mapped to the declARe schema.

    "json.schemas": [
{
"fileMatch": [
"ext.json"
],
"url": "https://service.metason.net/ar/schemas/extension.json"
},
{
"fileMatch": [
"catalog.json"
],
"url": "https://service.metason.net/ar/schemas/catalog.json"
}
],


### Sample Code

Browse through examples of extensions with their corresponding JSON data resources and all referenced media files. Use the examples as templates for your own content creation.

### Develop App Extensions and Curated AR Content

ARchi VR supports a specific app extension for developing curated AR content:

• Developer: an App extension for local on-device implementation of Catalog / Service / Workflow / Curation extensions

If you want to start creating AR content, request a free Developer extension.

### Documentation

In order to understand the concept of the 'declARe' approach in detail and to dive deep into the creation of curated AR content, please study the documentation on: