ARchi VR Elements

Revision Info: Documentation for ARchi VR Version 2.3 - June 2020

Table of Contents

Up to ARchi VR Content Creation


Overview to the Data Model of the ARchi VR App

The ARchi VR data model consists of four types of elements:

Each model element has a type and a subtype that define its role and behaviour.

JSON Data Format of ARchi VR models

All captured spaces (single rooms and merged multiple rooms) are stored on the iOS device in the app container as AppData/Documents/rooms.json file. This JSON file contains a list of rooms. A sample of a room is bedroom.json.

Model Context

Each room additionally contains meta data such as

Spatial Data

Spatial parameters, such as positions and vertices, are interpreted according to a right-handed coordinate system and are measured in meters (metric system). The origin (x y z = 0 0 0 ) of the local cordinate system within a room is the device position when capturing starts. The y-axis is the up vector. The negative z-axis points towards the north direction.

Items are described using a list of 3D vertices. The number of vertices depends on the type of model elements:

Space (Room)

The subtypes of a space are:

"Single Room", "Multiple Rooms", // e.g., appartment "Outdoor Area", "undefined"

Wall Element

The subtypes of a wall element are:

"Outer Wall", "Inner Wall", "Partition Wall", "Glass Partition", "Curtain Wall", // non-structural outer wall utilized to keep the weather out "undefined"

Cutout Elements (Opening)

Door

The subtypes of a door cutout are:

"Door Opening",// Opening "Door LH", // Left Hand (opens to outside) "Door LHR", // Left Hand Reverse (reverse = opens to inside) "Door RH", // Right Hand "Door RHR", // Right Hand Reverse "Door D", // Double Swing "Door DR", // Double Reverse "Door LS", // Left Slide "Door RS", // Right Slide "Door DS", // Double Slide "undefined",

Window

The subtypes of a window cutout are:

"Window S", // Single (or Small) "Window D", // Double "Window T", // Triple "Window SB", // Single with center bars "Window DB", // Double with center bars "Window TB", // Triple with center bars "Window SO", // Single with overlight "Window DO", // Double with overlight "Window TO", // Triple with overlight "Window VS", // Vertical Sliding "undefined",

Floor Element

The subtype of the floor element defines the room type. These subtypes are:

"Auditorium", "Balcony", "Bathroom", "Bedroom", "Cave", "Classroom", "Closet", "Conference Room", "Corridor", "Dining Room", "Dressing Room", "Equipment Room", "Family Room", "Garage", "Garden", "Hall", "Home Office", "Kitchen", "Laundry Room", "Lobby", "Living Room", "Nursery", "Office", "Open Space", "Studio", "Utility Room", "undefined"

Item Element

An item element is defined by the following data structure:

{ "type" : "Spot", // item type "subtype" : "Panel", // item subtype "id" : "_", // item UUID, set by app when created interactively "version" : 1, // optional: data structure version "spaceId" : "_id", // set by app: single room space UUID the item belongs to "anchorId" : "_id", // set by app: id of floor, wall or other item this item is attached to "name" : "", // optional: item name or title "content" = "", // optional: text (description, message) or URL to content (html) for enhancing item "mvertices" : [], // measured vertices as list of [x y z] interpreted as pos, line, polyline, or bounding box "vertices" : [], // set by app: aligned vertices calculated from mvertices "assetData" : "", // optional: can be URL to (img or 3d) file OR (directly embeded) rich-text/html code "assetMeta" : "", // optional: attributes for asset "isLocked" : false, // disbables move & rotate interaction "scope" : "private", // set by app: "private", "shared", or "public" "ownerId" : "_id" // set by app: ID of creator/owner of this item }

The attributes in assetMeta are defined like HTML attributes seprated by semicolon. Which attributes are valid is depending on type and subtype of the item and are described in the subsections below.

{ "assetMeta" : "wxdxh:0.4x0.0x0.4;billboard:1;color:yellow;", }

Item Types

Items can be of the following types:

"Spot" // point, POI (point of interest), marker, anchor "Route" // line, (tbd: multi-line path) "Zone" // horizontal area "Picture", // vertical rectangular image area, loaded from asset URL "Building" // immobile element that belongs to building structure "Equipment" // immobile, stationary equipment "Interiour" // furniture "Commodity" // daily used item "Avatar" // representation of creature

A good way to get the data structure with the specific data values of an item type is to interactively create it within ARchi VR and then analyze the generated JSON code of the item. There are several options to get access to the generated JSON data:

  1. by analyzing the code in the AR Session Inspector (a Service that is part of the Developer extension)
  2. by saving it to the iCloud Drive dev folder (a Service that is part of the Developer extension)
  3. by sending it via POST:SPACE to your Web service
  4. by downloading the App container via XCode and analyzing the AppData/Documents/rooms.json file

Color

Some items can change color. The color is specified in assetMeta using HTML color specifications:

{ "assetMeta" : "color:blue; bgcolor:#FF0000AA;", }

Spot Item

The subtypes of spot items are:

"Info", // with info icon "Question", // with question mark icon "Warning", // with warning icon "Task", // repair task, care task "Open Task", // unsolved task "Done Task", // solved task "Text", // text only without 3D icon "Panel" // image or multi-line text with background panel

A spot item is spatially defined by one vertex as an anchor point, and optionally with a second vertex to specify its orientation in x direction.

Example of a spot item (e.g., as used in a Service extension):

{ "id" : "com.company.archi.attention", "vertices" : [ [ -0.2, 0.0, -1.0 ] ], "type" : "Spot", "subtype" : "Warning", "name" : "Attention" }

Panel

If "subtype": "Panel" is declared, the spot item is either a text panel or an image panel. A text panel may include embedded HTML in the "assetData" parameter to define styled text. You may also define color (font color) and bgcolor (background color) in assetMeta.

{ "id" : "com.company.archi.textpanel", "type" : "Spot", "subtype" : "Panel", "name" : "Text Panel", "vertices" : [ [ 0.0, 0.0, 0.0 ] ], "assetData" : "<b>Hello</b><br>Welcome to ARchi VR.<br><small><i>Augmented Reality</i> at its best.</small>", "assetMeta" : "color:#DDCCFF;bgcolor:#333333DD;scale:1.0" }, { "id" : "com.company.archi.imgpanel", "version" : 1, "type" : "Spot", "subtype" : "Panel", "name" : "Img Panel", "vertices" : [ [ 0.0, 0.0, 0.0 ] ], "assetData" : "https://service.metason.net/ar/content/signs/img/general_warning.png", "assetMeta" : "wxdxh:0.4x0.0x0.4;billboard:1" }

A file referenced by assetData for an image panel should be in one of the following formats:

The following screen shot shows a text panel and two (interactive) image panels:

Route Item

The subtypes of a route item are:

"Distance", // measure "Pointer", "Direction", // arrow "Radius", "undefined"

A route item is spatially defined by two vertices as from-to points.

Example of a Route item (e.g., as used in a Service extension):

{ "id" : "com.company.archi.exit", "version" : 1, "vertices" : [ [ 0.0, 0.0, 0.0 ], [ 0.0, 0.0, 0.75 ] ], "type" : "Route", "subtype" : "Direction", "name" : "Exit" }

Route elements typically have fixed default colors. For example, arrows of "subtype" : "Direction" are blue with white text by default, but their appearance can be overridden with color (font color) and bgcolor (background color):

"assetMeta" : "color:#00FFFF; bgcolor:#FF0000;"

Zone Item

The subtypes of a zone item are:

"Carpet", "Keep Free", "Entry", "Gangway", "Lane", "Lawn", "Pool", "Parking", "Damaged Area", "Named Area", "Object Footprint", "undefined"

A zone item is spatially defined by at least three vertices in a plane. The last vertex will be connected to the first one to close the zone area.

Geometry Item

The subtypes of geometry item are:

"Box", "Capsule", "Cone", "Cylinder", "Octahedron", "Plane", "Pyramid", "Sphere", "Torus", "Tube", "Light", "Spot"

These items support the generation of corresponding 2D and 3D visualizations.

"items" : [ { "id" : "", "version" : 1, "type" : "Geometry", "subtype" : "Box", "assetMeta" : "color:#FF0000; wxdxh: 0.5x0.9x0.5; ratio:0.15", } ]

The geometric representation is generated within the bounding box defined by wxdxh (width, depth, height = x, z, y). It is centered in the x-z-plane, and sits on the floor level (y = 0) of the local object coordinate system.

Some geometry items can define a ratio in assetMeta such as "ratio:0.25" that defines the relation between:

The color of a geometry item can be defined using HTML color specifications within assetMeta:

Another sample of a geometry item (e.g., as used in a Service extension):

{ "id" : "com.company.archi.point", "version" : 1, "type" : "Geometry", "subtype" : "Sphere", "assetMeta" : "color:yellow; wxdxh:0.025x0.025x0.025" }

3D Object Item (Catalog Item)

3D objects allow you to place custom models located in the URL in assetData. Such a model may be part of a Catalog or be provided separately as a 3D file on a Web server. See more details in the Catalog chapter.

{ "id" : "com.company.archi.officechair", "assetData" : "https://archi.metason.net/catalog/3D/Office%20Chair.scnz", "assetMeta" : "wxdxh: 0.6x0.5x0.8;scale: 0.01;", "type" : "Interiour", "subtype" : "Chair", }

3D objects can have the following types:

"Building" // immobile element that belongs to building structure "Equipment" // immobile, stationary equipment "Interiour" // furniture "Commodity" // daily used items

Building Item

The subtypes of a building item are:

"Column", // pillar "Round Column", "Platform", // podium "Rail", // guardrail, handrail, balustrade "Stairs", "Wall", // free wall "Glass Partition", "undefined"

These items support the generation of corresponding 2D/3D visualizations.

Interiour Item

The subtypes of an interiour item are:

"Chair", "Couch", // Sofa "Desk", "Table", "Bed", "Shelf", "Cabinet", "Kitchen", "Curtain", "Lamp", "Floor Lamp", "undefined"

The following items support the generation of corresponding 3D/VR visualizations:

All other items are visualized in 2D and 3D with their bounding box.

Data Item

The subtypes of data items are:

"Label", // text label "Lamp", // on/off lamp "Level", // linear gauge "Needle", // radial gauge: rotating needle

A data item is spatially defined by one vertex as an anchor point (centered), and optionally with a second vertex to specify its orientation in x direction.

The value(s) of a data item is set by the update function.

Label

If "subtype": "Label" is declared, the data item is a text label.

{ "id" : "com.company.archi.label", "type" : "Data", "subtype" : "Label", "name" : "HH:mm.ss", "vertices" : [ [ 0.0, 0.0, 0.0 ] ], "assetMeta" : "wxdxh:0.3x0.0x1.0;color:#DDCCFF;bgcolor:#333333DD;font:Courier;" }

The data range of the update function are any strings.

The height in "wxdxh" is defining the height of the text label if it is horizontally aligned, otherwise it is flipped to the normal of the longest dimension.

If "bgcolor" is defined, a background panel will be added to the text label. The string set in "name": "___" defines the width of the panel.

Lamp

If "subtype": "Lamp" is declared, the data item is an indicator lamp.

{ "id" : "com.company.archi.lamp", "type" : "Data", "subtype" : "Lamp", "vertices" : [ [ 0.0, 0.0, 0.0 ] ], "assetMeta" : "wxdxh:0.03x0.0x0.03;color:#FFCC00;bgcolor:#AAAAAA;ratio:0.8;" }

The data range of the update function is 0/"NO" or 1/"YES".

The ratio in assetMeta such as "ratio:0.8" defines the relation between innerRadius : outerRadius.

Level

If "subtype": "Level" is declared, the data item is a linear gauge.

{ "id" : "com.company.archi.level", "type" : "Data", "subtype" : "Level", "name" : "Label", "vertices" : [ [ 0.0, 0.0, 0.0 ] ], "assetData" : "imgURL", // background image "assetMeta" : "wxdxh:0.01x0.4x0.0;color:#DDCCFF;min:0.0; max:2.0;ratio:0.7;dx:0.1;dy:01;" }

The data range of the update function is from 0.0 to 1.0.

The ratio in assetMeta such as "ratio:0.7" defines the relation between level length and full length (depending on main direction). "dx" and "dy" define the relative shift to the center. Use an image URL in assetData to set a gauge background.

Needle

If "subtype": "Needle" is declared, the data item is a radial gauge.

{ "id" : "com.company.archi.needle", "type" : "Data", "subtype" : "Needle", "name" : "Gauge", "vertices" : [ [ 0.0, 0.0, 0.0 ] ], "assetData" : "imgURL", // background image "assetMeta" : "wxdxh:0.15x0.15x0.0;color:#DDCCFF;min:-135.0; max:135.0;ratio:0.7;dx:0.0;dy:02;" }

The data range of the update function is from -1.0 to 1.0, with 0 at North position and going clockwise.

The ratio in assetMeta such as "ratio:0.7" defines the relation between needle length and full radius (half width). "dx" and "dy" define the relative shift of the needle to the center. Use an image URL in assetData to set a gauge background.


NOT YET IMPLEMENTED STUFF

Data Item

Additional subtypes of data items such as:

"Arc", // radial gauge: arc bow "Line Chart", // line chart "Bar Chart", // 3D bar chart "Area Chart", // 3D area chart "Pie Chart", // 3D pie chart

Interaction Item

The subtypes of Interaction items will be:

"Switch", // on/off switch "Slider", // slider / fader

Back to ARchi VR Content Creation


Copyright © 2020 Metason - All rights reserved.