Jump to: navigation, search

Difference between revisions of "HowTo:Configure Dynamic AR Content"


(Example)
 
(72 intermediate revisions by 6 users not shown)
Line 1: Line 1:
== Introduction ==
 
 
The Dynamic AR Content feature allows the user to see different content according to a marker configuration.
 
The Dynamic AR Content feature allows the user to see different content according to a marker configuration.
 
The configurable content are 3D objects, movies and {{UBIK}} objects. Currently this feature is enabled for ID Markers and Markerless scanning, meaning image tracking.
 
The configurable content are 3D objects, movies and {{UBIK}} objects. Currently this feature is enabled for ID Markers and Markerless scanning, meaning image tracking.
 
Therefore, every time the user has scanned an ID marker or a picture, the corresponding object (3D object, movie or {{UBIK}} object) will be processed and, according to the configuration, displayed on the screen.
 
Therefore, every time the user has scanned an ID marker or a picture, the corresponding object (3D object, movie or {{UBIK}} object) will be processed and, according to the configuration, displayed on the screen.
  
== Setup ==
+
= Prerequisites =
In order for one to be able to use the feature properly a setup folder is required and can be found at [[File:Dynamic AR Content Folder Structure.rar]]. The setup folder contains:
+
In order to be able to use the feature properly, a certain folder structure is required and can be found at the following link {{FileLink|Dynamic_AR_Content_Folder_Structure.rar|Dynamic_AR_Content_Folder_Structure.rar}}. Since version 2.4.4, the schema changed slightly (downwards compatible). The updated example package can be found here: {{FileLink|Dynamic_AR_Content_Folder_Structure_244.zip|Dynamic_AR_Content_Folder_Structure_244.zip}}
# A root folder, named ''UBIK''.
+
The setup folder contains:
# The ''UBIK'' root folder contains a child folder, named ''ARConfig''.
+
# A root folder, named ''UBIK''
# The ''ARConfig'' contains two child folders named ''IDMarker'' and ''Markerless''. <br>
+
# The ''UBIK'' root folder contains a child folder, named ''ARConfig''
## ''IDMarker'' folder contains the resources and configuration files needed for scanning an id marker. <br>
+
# The ''ARConfig'' contains two child folders named ''IDMarker'' and ''Markerless''
## ''Markerless'' folder contains the resources and configuration files needed for scanning a picture.
+
## ''IDMarker'' folder contains the resources and configuration files needed for scanning an ID marker
# ''IDMarker'' and ''Markerless'' folder contain a ''res'' and a ''conf'' folder. In the ''res'' folder all the resources needed for metaio and ubik <br>
+
## ''Markerless'' folder contains the resources and configuration files needed for scanning a picture
to show 3d objects, video and ubik objects are located. In the ''conf'' folder all the configuration files are stored.
+
# ''IDMarker'' and ''Markerless'' folder contain a ''res'' and a ''conf'' folder
* ''Example''. In the following picture one can see a sketch of the folder structure.<br>
+
## The ''res'' folder contains all the resources to be shown, like 3D objects, videos and links to {{UBIK}} objects  
:[[File:folder_structure.png]] <br>
+
## The ''conf'' folder contains all the configuration files
In order for a 3d object to be displayed properly, the 3d object, the texture and the picture must all exist in the same place.
+
  
== Action Mapping XML Setup ==
+
A senseful configuration always consists of a '''tracking configuration''' (in one of the TrackingData.xml) and a corresponding '''action configuration''' (in the parallel ActionMapping.xml). So when the pattern, configured in tracking, is recognized by the camera, the configured action is triggered.
  
After the folder is configured and understood the next step is validate the schema against an online validator. A solution can be found at <br>
+
The following shows an exemplary sketch of the folder structure:
[http://www.utilities-online.info/xsdvalidation/ Online XML Schema Validator]. The schema used to validate against can be found inside the UBIK Folder and it is named ''xsd_schema_validation''.
+
  
 +
<source lang="xml">
 +
/UBIK/ARConfig/
 +
  IDMarker
 +
    conf
 +
      TrackingData_Marker.xml
 +
      Action_Mapping.xml
 +
    res
 +
      .obj
 +
      .png
 +
      .jpg
 +
      .mtl
 +
      .3g2
 +
      .md2
 +
  Markerless
 +
    conf
 +
      TrackingData_Game.xml
 +
      Action_Mapping.xml
 +
    res
 +
      .obj
 +
      .png
 +
      .jpg
 +
      .mtl
 +
      .3g2
 +
      .md2
 +
</source>
 +
 +
= Tracking Setup =
 +
The first step is to configure the tracking data Xml in order for {{UBIK}} to recognize scanned pictures and ID's. In case the marker is a picture (image), the location of the picture must also be provided. In the example it is '''../res/pic_name.(png, jpeg)'''. The ID located in the tracking data Xml should be the same as the order of the ID in the list of IDs.
 +
 +
The example below show the configuration of the location of the image:
 +
<source lang="xml">
 +
  <SensorCOS>
 +
    <SensorCOSID>1</SensorCosID>
 +
    <Parameters>
 +
        <referenceImage widthMM="420" heightMM="297">../res/img_pic.png</referenceImage>
 +
    </Parameters>
 +
  </SensorCOS>
 +
</source>
 +
 +
{{Attention|The ID must be an integer number and it is not allowed to leave gaps, otherwise tracking wont work!}}
 +
 +
= Action Setup =
 +
 +
After the folder is configured, the next step is to validate the schema against an online validator. A solution can be found at [http://www.utilities-online.info/xsdvalidation/ Online XML Schema Validator]. The schema used to validate against can be found inside the example package provided in the prerequisites section (xml_schema_xsd).
 +
Since version 2.4.4, GeometryAction derives from UBIKObjectAction. When a geometry is clicked, it will try to find the respective UBIK object and show a dialog for it.
 +
 +
The action mapping Xml contains different actions such as
 +
* GeometryAction (3D Object)
 +
* MovieAction
 +
* UBIKObjectAction
  
to actually configure the action mapping xml and the tracking data xml. <br>
+
The following Xml shows an example configuration:
The action mapping xml contains different actions such as GeometryAction, MovieAction and UBIKObjectAction.
+
* In the xml below an example can be seen.<br>
+
 
<source lang="xml">
 
<source lang="xml">
 
<TrackingActionMapping>
 
<TrackingActionMapping>
<GeometryAction TrackingID="1">
+
  <GeometryAction TrackingID="1">
  <GeometryResource>
+
    <!-- Since 2.4.4, you can use a UBIK-UID for linking an POI dialog to the geometry. -->
    <ResourcePath>pump.obj</ResourcePath>
+
    <!-- Alternatively, you can configure (by customizing) an object with Marker Classification and its Marker ID set to the Tracking ID of this action. -->
    <Scale>100</Scale>
+
    <UBIK-UID>a5aa5a70-591f-11e3-949a-0800200c9a66</UBIK-UID>
  </GeometryResource>
+
    <GeometryResource>
</GeometryAction>  
+
      <ResourcePath>pump.obj</ResourcePath>
 +
      <Scale>100</Scale>
 +
    </GeometryResource>
 +
  </GeometryAction>  
  
<UBIKObjectAction TrackingID="2"/>
+
  <GeometryAction TrackingID="2">
<GeometryAction TrackingID="5">
+
    <GeometryResource>
  <GeometryResource>
+
      <ResourcePath>pump.obj</ResourcePath>
    <ResourcePath>pump.obj</ResourcePath>
+
      <Scale>100</Scale>
    <Scale>100</Scale>
+
      <RotationDegrees>
    <RotationDegrees>
+
 
         <Z>90</Z>
 
         <Z>90</Z>
    </RotationDegrees>
+
      </RotationDegrees>
  </GeometryResource>
+
    </GeometryResource>
</GeometryAction>
+
  </GeometryAction>
 +
 
 +
  <UBIKObjectAction TrackingID="3">
 +
    <!-- Alternatively, you can configure (by customizing) an object with Marker Classification and its Marker ID set to the Tracking ID of this action. -->
 +
    <UBIK-UID>a5aa5a70-591f-11e3-949a-0800200c9a66</UBIK-UID>
 +
  </UBIKObjectAction>
  
<UBIKObjectAction TrackingID="6">
 
  <UBIK-UID>a5aa5a70-591f-11e3-949a-0800200c9a66</UBIK-UID>
 
</UBIKObjectAction>
 
 
 
</TrackingActionMapping>
 
</TrackingActionMapping>
 
</source>
 
</source>
<br>
 
  
All the actions tags must have as an attribute a tracking id. The Tracking id must exist <br>
+
All Action tags must specify a TrackingID attribute, where ID value must exist in the corresponding tracking Xml within a ''<SensorCOSID>'' tag.
in the tracking xml, the one that metaio needs in order to recognize id markers or pictures scanned.
+
  
 +
{{Attention|If a texture is used for a geometry, the material (*.mtl file) and the texture (picture) must all exist in the same place in order for to have the 3D object displayed properly, Only the geometry has to be specified as a resource in the Action Mapping, though.}}
  
=== GeometryAction Tag ===
+
=== Displaying 3D objects ===
 +
 
 +
3D objects can be displayed using the ''<GeometryAction>'' tag. The sub-tag ''<GeometryResource>'' defines the content and the parameters for displaying the 3D object.
 +
 
 +
==== UBIK-UID Tag ====
 +
 
 +
Available since version 2.4.4:
 +
Just like the UBIKObjectAction, this action allows the usage of a optional UBIK-UID tag, specifying the ID of a UBIK object.
 +
If it is specified, the respective object is linked to this geometry; else, it is tried to find an object with a marker classification and the geometry action's tracking ID for it's marker id value.
 +
When the user clicks on the geometry, a dialog is opened for the linked object (if found).
  
The GeometryAction xml tag for a GeometryAction must contain a tracking id attribute. Inside the GeometryAction tag there can be a GeometryResource tag that defines the type of resource
 
required for the GeometryAction.
 
 
==== GeometryResource Tag ====
 
==== GeometryResource Tag ====
  
 
The GeometryResource contains:
 
The GeometryResource contains:
# '''Resource path'''. It is the resource path of the 3d object or video to be displayed.
+
# '''Resource path''': the resource path of the 3D object or video to be displayed.
# '''Scale'''. If it exists, it is the scale of the current object.
+
# '''Scale''': if specified, the 3D object will be scaled to this size.
# '''OffsetMillimeters'''. If it exists, it is the translation vector of the current object. It has a X, Y and Z value, but not all them are mandatory.  
+
# '''OffsetMillimeters''': if specified, this value will be added to the position of the detected marker when displaying the 3D object. The offset can be defined along the X, Y and Z axis.  
# '''RotationDegrees'''. If it exists, it is the rotation of the current object.
+
# '''RotationDegrees'''. if specified, the 3D object will be rotated by this value against the detected marker.
* ''Resource path example''. pump/pump.obj. <br>
+
 
 +
* ''Resource path example''
 +
<source lang="xml">
 +
pump/pump.obj
 +
</source>
 +
 
 
* ''OffsetMillimeters example''.
 
* ''OffsetMillimeters example''.
 
<source lang="xml">
 
<source lang="xml">
Line 76: Line 135:
 
   </OffsetMillimeter>
 
   </OffsetMillimeter>
 
</source>
 
</source>
<br>
 
=== MovieAction Tag ===
 
The MovieAction xml tag must also contain a trackingid attribute. Inside the MovieAction tag there are two possible resources, a MovieResource and a PlayButton resource.
 
==== MovieResource ====
 
The MovieResource Tag contains the same values as the GeometryResource except the rotation vector.
 
==== PlayButton Tag ====
 
  
The PlayButton Tag, if it is defined, contains the same values as the GeometryResource tag. It's purpose, if it exists, is to start a video, if the geometry is touched.
+
In the following rotation example the user must see the 3D object rotated around X axis and around Z axis 90 degrees.
=== UBIKObjectAction Tag ===
+
Note that the angle is in radians.  
 +
* ''RotationDegrees example''.
 +
<source lang="xml">
 +
  <Rotation>
 +
    <X>0.5707</X>
 +
    <Z>0.5705</Z>
 +
  </Rotation>
 +
</source>
  
The UBIKObjectAction tag should enable handling of the ubik objects when scanning either a picture or an id marker. <br>
+
=== Displaying movies ===
The tag must contain the tracking id attribute and, optional, the ubik-uid tag.
+
  
== Tracking Data XML ==  
+
Inside the ''MovieAction'' tag there can be two possible resources defined, a '''MovieResource''' and a '''PlayButton''' resource.
 +
 
 +
==== MovieResource Tag====
 +
 
 +
Movies can be displayed using the ''<MovieResource>'' tag, which basically contains the same values as the ''GeometryResource'', except the rotation vector. 
 +
 
 +
==== PlayButton Tag====
 +
By using the ''<PlayButton>'' tag, the movie will not start immediately but there will be a geometry shown in between which basically contains the same values as the ''GeometryResource'' tag. Its purpose is to start the video only when this intermediate geometry is touched.
  
First step that one has to do is to configure the tracking data xml in order for Metaio to recognize scanned pictures and ids. <br>
 
In case one needs to scan pictures, the location of the pictures must be provided also. In our case it's ../res/pic_name.(png, jpeg). <br>
 
The id located in the tracking data xml should be the same as the order of the id in the list of ids.
 
* ''Example''. Below you can see an example where you need to configure the location of the image. <br>
 
 
<source lang="xml">
 
<source lang="xml">
   <SensorCOS>
+
<MovieAction>
     <SensorCOSID>1</SensorCosID>
+
   <MovieResource>
    <Parameters>
+
     ...
        <referenceImage widthMM="420" heightMM="297">../res/img_pic.png</referenceImage>
+
  </MovieResource>
    </Parameters>
+
  <PlayButton>
   </SensorCOS>
+
      <Scale>150</Scale>
 +
      <ResourcePath>plane/plane.obj</ResourcePath>
 +
      <RotationDegrees>
 +
        <Z>3.14</Z>
 +
      </RotationDegrees>
 +
   </PlayButton>
 +
</MovieAction>
 
</source>
 
</source>
  
== '''Usage''' ==
+
=== Displaying an UBIK object dialog ===
In order to use the previously configured xmls, one can use either the ID Marker activity or the Markerless activity.
+
 
 +
The ''<UBIKObjectAction>'' allows to bring up a popup to navigate to an {{UBIK}} object when scanning either a picture or an ID marker. The tag must contain the tracking ID attribute and, optional, the ''<UBIK-UID>'' tag.
 +
When configuring a tag without the ''UBIK-UID'' sub-tag, the object is searched based on the value of its ''MarkerID'' property, which is compared to the value of the ''TrackingID'' attribute. If the ''UBIK-UID' tag exists the object is searched based on the value inside the ''UBIK-UID' tag.
 +
 
 +
= Example =
 +
In order to use the previously configured xml's, you can use either the ID Marker activity or the Markerless activity on the {{UBIK}} Android Client.
 +
 
 
=== ID Marker Activity ===
 
=== ID Marker Activity ===
  
Having in mind the setup tracking ids, one can now scan id markers. For an id that has a 3d object mapped in the action xml one should see <br>
+
The ID markers used can be found at the following link {{FileLink|ID_Marker_Example_1_6.pdf|ID Marker Example Ids 1-6}}.<br>
a 3d object displayed onto the screen as in the next picture.  
+
Having in mind the setup tracking IDs, you can now scan ID markers.  
If the id has a video object mapped in the action xml, one should see a video object onto the screen, depending on the existence of the play button.
+
* For an ID that has a 3D object mapped in the action xml, the object should be displayed on the screen as shown in the next picture.  
If the play button exist one should see first the 3d object, and after it's clicked, a video. If the play button doesn't exist, the movie will be shown <br>
+
* If the ID has a video object mapped in the action xml, you should see a video object on the screen, depending on the existence of the play button. Clicking the play button starts the video.
immediately.
+
* If the play button exist you should see first see the play button, and after it's clicked the mapped video. If the play button doesn't exist, a movie preview image will be shown. Clicking the image starts the video.
  
 
=== Markerless Activity ===
 
=== Markerless Activity ===
The scenario is very similar with the id marker activity with the difference that instead of ids one must scan pictures.
 
  
=== Examples ===
+
The markerless photos used in this example can be found at the following link {{FileLink|Markerless_Examples._Pics_1-7.pdf|Markerless example pictures}}.<br>
 +
The scenario is very similar with the ID marker activity with the only difference that instead of IDs you have to scan your tracking images.
 +
 
 +
=== Results ===
 +
 
 +
With the existent configuration from the .zip file, you should see the following picture when scanning the first ID or the first picture:
 +
:[[File:scanning_id1.png|border]] <br>
  
With the existent configuration from the zip file one should see when scanning the first id or the first picture the following picture
+
When scanning the second ID or the second picture, you should see the following:
:[[File:scanning_id1.png]] <br>
+
:[[File:scanning_id2.png|border]] <br>
  
When scanning the second id or the second picture one should see the following:
+
When scanning the sixth ID, using the Markerless activity, you should see a play button and, if pressed, a movie.
:[[File:scanning_id2.png]] <br>
+
* Play button:
 +
:[[File:scanning_id3_play_button.png|border]] <br>
 +
* Movie:
 +
:[[File:scanning_id3_movie.png|border]] <br>
  
When scanning the sixth id using the Markerless activity one should see a play button and, if pressed a movie. <br>
+
When scanning the sixth ID using the IdMarker Activity you should see a play button also and, if pressed, a movie too.
play button:
+
* Play button:
:[[File:scanning_id3_play_button.png]] <br>
+
:[[File:scanning_id6_play_button.png|border]] <br>
Movie:
+
* Movie:
:[[File:scanning_id3_movie.png]] <br>
+
:[[File:scanning_id6_movie.png|border]] <br>
  
When scanning the sixth id using the IdMarker Activity one should see a play button also and, if pressed a movie too. <br>
+
[[Category:Client|Configure Dynamic AR Content]]
Play button:
+
[[Category:How-To|Configure Dynamic AR Content]]
:[[File:scanning_id6_play_button.png]] <br>
+
[[Category:POI|Configure Dynamic AR Content]]
Movie:
+
:[[File:scanning_id6_movie.png]] <br>
+
[[Category:How-To]]
+
[[Category:UBIK Client]]
+

Latest revision as of 09:28, 20 May 2015

The Dynamic AR Content feature allows the user to see different content according to a marker configuration. The configurable content are 3D objects, movies and UBIK® objects. Currently this feature is enabled for ID Markers and Markerless scanning, meaning image tracking. Therefore, every time the user has scanned an ID marker or a picture, the corresponding object (3D object, movie or UBIK® object) will be processed and, according to the configuration, displayed on the screen.

[edit]

Prerequisites

In order to be able to use the feature properly, a certain folder structure is required and can be found at the following link IC FileLink Download.png Dynamic_AR_Content_Folder_Structure.rar. Since version 2.4.4, the schema changed slightly (downwards compatible). The updated example package can be found here: IC FileLink Download.png Dynamic_AR_Content_Folder_Structure_244.zip The setup folder contains:

  1. A root folder, named UBIK
  2. The UBIK root folder contains a child folder, named ARConfig
  3. The ARConfig contains two child folders named IDMarker and Markerless
    1. IDMarker folder contains the resources and configuration files needed for scanning an ID marker
    2. Markerless folder contains the resources and configuration files needed for scanning a picture
  4. IDMarker and Markerless folder contain a res and a conf folder
    1. The res folder contains all the resources to be shown, like 3D objects, videos and links to UBIK® objects
    2. The conf folder contains all the configuration files

A senseful configuration always consists of a tracking configuration (in one of the TrackingData.xml) and a corresponding action configuration (in the parallel ActionMapping.xml). So when the pattern, configured in tracking, is recognized by the camera, the configured action is triggered.

The following shows an exemplary sketch of the folder structure:

/UBIK/ARConfig/
  IDMarker
    conf
      TrackingData_Marker.xml
      Action_Mapping.xml
    res
      .obj
      .png
      .jpg
      .mtl
      .3g2
      .md2
  Markerless
    conf
      TrackingData_Game.xml
      Action_Mapping.xml
    res
      .obj
      .png
      .jpg
      .mtl
      .3g2
      .md2

Tracking Setup

The first step is to configure the tracking data Xml in order for UBIK® to recognize scanned pictures and ID's. In case the marker is a picture (image), the location of the picture must also be provided. In the example it is ../res/pic_name.(png, jpeg). The ID located in the tracking data Xml should be the same as the order of the ID in the list of IDs.

The example below show the configuration of the location of the image:

  <SensorCOS>
    <SensorCOSID>1</SensorCosID>
    <Parameters>
         <referenceImage widthMM="420" heightMM="297">../res/img_pic.png</referenceImage>
    </Parameters>
  </SensorCOS>
IC Attention.pngThe ID must be an integer number and it is not allowed to leave gaps, otherwise tracking wont work!

Action Setup

After the folder is configured, the next step is to validate the schema against an online validator. A solution can be found at Online XML Schema Validator. The schema used to validate against can be found inside the example package provided in the prerequisites section (xml_schema_xsd). Since version 2.4.4, GeometryAction derives from UBIKObjectAction. When a geometry is clicked, it will try to find the respective UBIK object and show a dialog for it.

The action mapping Xml contains different actions such as

  • GeometryAction (3D Object)
  • MovieAction
  • UBIKObjectAction

The following Xml shows an example configuration:

<TrackingActionMapping>
  <GeometryAction TrackingID="1">
    <!-- Since 2.4.4, you can use a UBIK-UID for linking an POI dialog to the geometry. -->
    <!-- Alternatively, you can configure (by customizing) an object with Marker Classification and its Marker ID set to the Tracking ID of this action. -->
    <UBIK-UID>a5aa5a70-591f-11e3-949a-0800200c9a66</UBIK-UID>
    <GeometryResource>
      <ResourcePath>pump.obj</ResourcePath>
      <Scale>100</Scale>
    </GeometryResource>
  </GeometryAction>

  <GeometryAction TrackingID="2">
    <GeometryResource>
      <ResourcePath>pump.obj</ResourcePath>                                    
      <Scale>100</Scale>
      <RotationDegrees>
        <Z>90</Z>
      </RotationDegrees>
    </GeometryResource>
  </GeometryAction>

  <UBIKObjectAction TrackingID="3">
    <!-- Alternatively, you can configure (by customizing) an object with Marker Classification and its Marker ID set to the Tracking ID of this action. -->
    <UBIK-UID>a5aa5a70-591f-11e3-949a-0800200c9a66</UBIK-UID>
  </UBIKObjectAction>

</TrackingActionMapping>

All Action tags must specify a TrackingID attribute, where ID value must exist in the corresponding tracking Xml within a <SensorCOSID> tag.

IC Attention.pngIf a texture is used for a geometry, the material (*.mtl file) and the texture (picture) must all exist in the same place in order for to have the 3D object displayed properly, Only the geometry has to be specified as a resource in the Action Mapping, though.

Displaying 3D objects

3D objects can be displayed using the <GeometryAction> tag. The sub-tag <GeometryResource> defines the content and the parameters for displaying the 3D object.

UBIK-UID Tag

Available since version 2.4.4: Just like the UBIKObjectAction, this action allows the usage of a optional UBIK-UID tag, specifying the ID of a UBIK object. If it is specified, the respective object is linked to this geometry; else, it is tried to find an object with a marker classification and the geometry action's tracking ID for it's marker id value. When the user clicks on the geometry, a dialog is opened for the linked object (if found).

GeometryResource Tag

The GeometryResource contains:

  1. Resource path: the resource path of the 3D object or video to be displayed.
  2. Scale: if specified, the 3D object will be scaled to this size.
  3. OffsetMillimeters: if specified, this value will be added to the position of the detected marker when displaying the 3D object. The offset can be defined along the X, Y and Z axis.
  4. RotationDegrees. if specified, the 3D object will be rotated by this value against the detected marker.
  • Resource path example
pump/pump.obj
  • OffsetMillimeters example.
  <OffsetMillimeter>
    <X>10</X>
  </OffsetMillimeter>

In the following rotation example the user must see the 3D object rotated around X axis and around Z axis 90 degrees. Note that the angle is in radians.

  • RotationDegrees example.
  <Rotation>
    <X>0.5707</X>
    <Z>0.5705</Z>
  </Rotation>

Displaying movies

Inside the MovieAction tag there can be two possible resources defined, a MovieResource and a PlayButton resource.

MovieResource Tag

Movies can be displayed using the <MovieResource> tag, which basically contains the same values as the GeometryResource, except the rotation vector.

PlayButton Tag

By using the <PlayButton> tag, the movie will not start immediately but there will be a geometry shown in between which basically contains the same values as the GeometryResource tag. Its purpose is to start the video only when this intermediate geometry is touched.

<MovieAction>
  <MovieResource>
    ...
  </MovieResource>
  <PlayButton>
      <Scale>150</Scale>
      <ResourcePath>plane/plane.obj</ResourcePath>
      <RotationDegrees>
        <Z>3.14</Z>
      </RotationDegrees>
  </PlayButton>
</MovieAction>

Displaying an UBIK object dialog

The <UBIKObjectAction> allows to bring up a popup to navigate to an UBIK® object when scanning either a picture or an ID marker. The tag must contain the tracking ID attribute and, optional, the <UBIK-UID> tag. When configuring a tag without the UBIK-UID sub-tag, the object is searched based on the value of its MarkerID property, which is compared to the value of the TrackingID attribute. If the UBIK-UID' tag exists the object is searched based on the value inside the UBIK-UID' tag.

Example

In order to use the previously configured xml's, you can use either the ID Marker activity or the Markerless activity on the UBIK® Android Client.

ID Marker Activity

The ID markers used can be found at the following link IC FileLink Download.png ID Marker Example Ids 1-6.
Having in mind the setup tracking IDs, you can now scan ID markers.

  • For an ID that has a 3D object mapped in the action xml, the object should be displayed on the screen as shown in the next picture.
  • If the ID has a video object mapped in the action xml, you should see a video object on the screen, depending on the existence of the play button. Clicking the play button starts the video.
  • If the play button exist you should see first see the play button, and after it's clicked the mapped video. If the play button doesn't exist, a movie preview image will be shown. Clicking the image starts the video.

Markerless Activity

The markerless photos used in this example can be found at the following link IC FileLink Download.png Markerless example pictures.
The scenario is very similar with the ID marker activity with the only difference that instead of IDs you have to scan your tracking images.

Results

With the existent configuration from the .zip file, you should see the following picture when scanning the first ID or the first picture:

Scanning id1.png

When scanning the second ID or the second picture, you should see the following:

Scanning id2.png

When scanning the sixth ID, using the Markerless activity, you should see a play button and, if pressed, a movie.

  • Play button:
Scanning id3 play button.png
  • Movie:
Scanning id3 movie.png

When scanning the sixth ID using the IdMarker Activity you should see a play button also and, if pressed, a movie too.

  • Play button:
Scanning id6 play button.png
  • Movie:
Scanning id6 movie.png