Build a Database

Domain

Create a folder on you hard drive named Augmented_Reality
Download the Workshop Assets to your Augmented_Reality folder
Open Workshop_Assets/AR_Admin.rtf

Create an account at GoDaddy
Web Hosting > GET STARTED
ECONOMY > ADD TO CART
Create a domain name: your_name.com (or .net etc.)

Document Your Work
Open the Workshop_Assets/AR_Admin.rtf file in Text Edit
Enter the following

  • Domain Name: Your_Domain.ext
  • Username: Your_Account_Username
  • Password: Your_Account_Password
  • PIN: Your_Account_PIN

User

Manage My Domains
Manage Hosting
WEB HOSTING > Manage
NEW C Panel > Set Up
Enter the following in AR_Admin.rtf file

  • Username: Your_User_Username
  • Password: Your_User_Password

Database

From cPanel > MySQL @ Database Wizard
Add New User
Add user to database > √ ALL PRIVILEGES
WEB HOSTING > Manage
MANAGE
cPannel > phpMyAdmin
Enter the following in AR_Admin.rtf file

  • Database: Your_Database_Name
  • Username: Your_Database_Username
  • Password: Your_Database_Password

Project PHP

From Workshop_Assets/FTP_to_Your_Web_Server
Rename FTP_to_Your_Web_Server to Your_Project_Name


Credentials

Open Workshop_Assets/FTP_to_Your_Web_Server/Layar/config.inc.php in a software development environment or a text editor

Edit the credentials and save the file

  • define(‘DBHOST’, ‘localhost’);
  • define(‘DBDATA’, ‘database_name‘);
  • define(‘DBUSER’, ‘database_username‘);
  • define(‘DBPASS’, ‘database_password‘);

Enter the following in AR_Admin.rtf file

  • define(‘DBHOST’, ‘localhost’);
  • define(‘DBDATA’, ‘database_name‘);
  • define(‘DBUSER’, ‘database_username‘);
  • define(‘DBPASS’, ‘database_password‘);

Configure Web Service

Right-Click the Your_Project_Name directory > Compress Your_Project_Name

In File Manager Upload the Your_Project_Name.zip to public_html

Right click Your_Project_Name.zip in File Manager and choose > Extract

Delete Your_Project_Name.zip

Enter Your_Domain.com/Your_Project/Layar/Your_Project_Title.php

in a web browser

You should get the following message:

Message: layerName parameter is not passed in GetPOI request. Fatal error: Call to a member function prepare() on a non-object in /Your_Domain.com/Your_Project/Layar/Your_Project_Title.php on line 200

This is expected and the desired result

Enter the following in AR_Admin.rtf file

  • API URL: Your_API Endpoint URL

Add Tables to Database

cPanel > phpMyAdmin

Open Workshop_Assets/Layar_Tables_sqlQuery.sql in text editor (Right-Click > Open > Trust)

Select > All

Edit > Copy

In phpMyAdmin select your_database_name

Select SQL Tab

Edit > Paste

Go


Modify Table Fields

Icon:

In cPannel File Manager upload *Workshop_Icon_64.png to Your_Domain.com/Your_Project/Assets/

In phpMyAdmin

  • Your_Database Icon Table > Sidebar > Icon > Edit (pencil)
  • id = 1
  • url = a href=”Your_Domain.com/Your_Project/Assets/*Workshop_Icon_64.png”
  • type = 1
  • Go

*Replace this image with your own PNG file

Layer:

See Create and Configure a GeoLayar

Layar Table > Browse Tab > Edit (pencil)

  • layer = yourlayarname (Established in Create and Configure a GeoLayar)
  • refreshInterval = 300
  • refreshDistance = 100
  • fullRefresh = 1
  • showMessage = √
  • id = 1
  • biwStyle = classic
  • Go

LayarAction:

LayarAction Table > Browse Tab > Edit (pencil)

  • No change

Object:

In Photoshop

  • Modify Simple_Facing_Plane_512.png from Workshop_Assets/Resources
  • Save as Your_Project_512px.png

In cPannel File Manager

  • Upload Your_Project_512px.png Your_Domain.com/Your_Project/Assets/

In phpMyAdmin

  • Browse Tab > id1 > Edit (pencil)
  • id = 1
  • contentType = image/vnd.layar.generic
  • url = Your_Domain.com/Your_Project/Assets/Your_Project_512px.png
  • reducedURL = √
  • size = 100.00000
  • Go

In cPannel File Manager

  • Upload *Simple_Facing_Plane.l3d Your_Domain.com/Your_Project/Assets/

In phpMyAdmin

  • Browse Tab > id2 > Edit (pencil)
  • id = 2
  • contentType = model/vnd.layar.l3d
  • url = Your_Domain.com/Your_Project/Assets/Simple_Facing_Plane.l3d
  • reducedURL = √
  • size = 100.00000
  • Go

* We will replace this model with your modification of the Simple_Facing_Plane.l3d file, see Project Production section of  Augmented Reality Workshop

POI:

In Photoshop

  • Modify Simple_Facing_Icon_128.png from Workshop_Assets
  • Save as Your_Project_Icon_128.png

In cPannel File Manager

  • Upload Your_Project_Icon_128.png Your_Domain.com/Your_Project/Assets/

In Google Maps

  • Find Location (latitude, longitude)
  • Click on location and choose ‘What’s here?’ to determine GPS coordinates

In phpMyAdmin
POI Table > Insert Tab

  • id = Your_Object
  • footnote = Your Name
  • title = Your_Project_Title
  • lat = Your Location lat (41.602066)
  • lon =Your Location lon (-93.652167)
  • imageURL = http://your_domain.com/yourprojectname/
    Assets/Your_Project_Icon_128.png
  • description = Short description (3 or 4 words max)
  • biwStyle = classic
  • alt = √
  • doNotIndex = 0
  • showSmallBiw = 0
  • showBiwOnClick = 1
  • poiType = • geo
  • iconID = 1
  • objectID = 2
  • transformID = 1
  • layerID = 1
  • Go

POIAction:

  • POIAction Table > Browse Tab > Edit (pencil)
  • poiID = Your_Object
  • label = Open Website
  • uri = https://johncraigfreeman.wordpress.com/augmented-reality/
  • autoTriggerOnly = √
  • id = 1
  • contentType = application/vnd.layar.internal
  • method = • GET
  • activityType = 1
  • params = lat,lon,alt,lang,countrycode,
    localCountryCode,version
  • closeBiw = 0
  • showActivity = 1
  • activityMessage = √
  • autoTrigger = 0
  • Go
  • Change All poiIDs = Your_Object
  • POI Table > id geo_1 > delete

Transform:

  • Transform Table > Browse Tab > Edit (pencil)
  • id = 1
  • rel = 1 (always face user)
  • angle = 0
  • rotate_x = 0
  • rotate_y = 0
  • rotate_z = 1
  • translate_x = 0
  • translate_y = 0
  • translate_z = 1.5
  • scale = 2.0
  • Go
  • Transform Table > Browse Tab > Edit (pencil)
  • id = 2
  • rel = 1 (always face user)
  • angle = 0
  • rotate_x = 0
  • rotate_y = 0
  • rotate_z = 1
  • translate_x = 0
  • translate_y = 0
  • translate_z = 0.0
  • scale = 1
  • Go

Add Audio

POIAction:

Browse Tab > Edit (pencil)

  • labelPlay Audio
  • uri = –http://your_domain.com/yourprojectname/
    Assets/*Audio.wav
  • autoTriggerRange = 3
  • autoTriggerOnly = 1
  • contentType = audio/mpeg
  • activityType = 2
  • params = √ Null
  • activityMessage = Listen to this
  • autoTrigger = 1
  • Go

* Replace this audio file with your own .WAV file and ftp to
–http://your_domain.com/yourprojectname/Assets/


Return to Augmented Reality Workshop