If you are looking to start making some awesome things in AR, then we have this super easy tutorial for you guys to follow along with.

ZapWorks is free for personal use, so make sure to sign up for a personal account today.

We have three tools to choose from, but this tutorial is going to focus on ZapWorks Studio. Studio allows you to incorporate 3D models into your AR experiences.

This Instructable will walk you through building an augmented reality experience from start to finish in one sitting. No experience with AR development is required!

If you get stuck, please check out our extensive Documentation that you can find on our website. You can also head to our Forum, a handy way to ask questions of other ZapWorks users.

Let's get started!

Difficulty Level: Easy

Coding Knowledge Required: Absolute Beginner

Time to Complete: 30 minutes

Step 1: Create a New Studio Zapcode

Enter your my.zap.works account and click the ‘Make a New Zapcode’ button in the top left. Give your code a name, and choose between either a circle or lozenge style and select ‘Studio’ as your tool. Widgets and Designer codes will not work for this tutorial.

Step 2: Create a New Project in ZapWorks Studio

Choose to start with a ‘Blank’ template and give your project a name, e.g. “Masked Scene” and click ‘Create’.

Step 3: Download the Asset Pack

Click here to download a zip file containing all the assets we'll need for this experience.

Step 4: Import Image Files Into the Media Library

Unzip the file you downloaded in step 3 and drag the files from the 'Image Asset' folder into the Media Library import box, located in the top right of the window. You can select multiple files and import them at the same time.

Step 5: Train Tracking Image

Tracking Images are images that content appears attached to as they move around in the camera view.

Click the plus (+) sign in top right of the Media Library. From the dropdown, select ‘Train Image File’. This will open up your Explorer / Finder and allow you to select your tracking image, named “Space Page.png”, in the folder ‘Tracking Image’.

The image will then be trained. During this process, which may take up to a minute, the image is analysed from multiple angles and a target file is produced. This file is added to your Media Library, with the file extension ZPT.

Step 6: Drag Your Target Into the Hierarchy

Drag your target file from the Media Library into the root node within the Hierarchy.

Once in the Hierarchy a preview of the target will appear in the 3D view. The icons at the bottom right of the screen can be used to move the target in the view, just as if it were being physically moved in a camera view.

Targets in the Hierarchy act like groups. Content placed inside a target will appear attached to it in the 3D view and when viewed in the app.

Step 7: Create a Group to Keep Your Hierarchy Organised

Groups are incredibly useful for organizing your content. When you create more complex experiences it is good practice to use groups where appropriate.

In order to keep the items in your Hierarchy organised, we are going to create a group. Right click on the target and select 'New > Group'. Name this new group "Scene Ornaments".

Step 8: Add the Wall Asset Into the Scene Ornaments Group

Click and drag the wall.png from the Media Library and into the Scene Ornaments group.

Once completed, you will be able to rotate the target in the 3d view and see that the wall is tracked to the target image.

Step 9: Position and Scale the Wall

Click on the Wall in the Hierarchy. Using the Properties panel on the left hand side below the Hierarchy (image attached), scroll to find the ‘Transform’ section.

Set the position and scale the wall as follows:

Position (0, 0, -5)
Scale ( 10, 10, 10)
Rotation ( 0, 0, 0)

Step 10: Make the Wall Invisible

You are now going to make the wall invisible. This will allow you to easily position the rest of the items correctly in the scene. You will make it visible again once you have everything where you want it.

Making sure that the wall is still selected, scroll in the Properties panel to the ‘Appearance’ section and untick 'visible'.

Step 11: Positioning the Rest of the Content

Click on the 'Set View' option in the top right of the 3D view (it should look like an eye icon) and select 'Front'. This allows us to view the target image straight on, useful for lining up our content.

You will now set up the rest of the scene. Drag the remaining files into the scene ornaments group beneath the previous object in turn. Follow the coordinates below to position each object accordingly.

It is important to make sure that each new asset sits underneath the previous one in the Hierarchy. This is because the order in the Hierarchy determines the order of rendering on screen.

Step 16: Position the Shelves

Step 17: Creating a Floor

Drag the Plane object from the Media Library into the Hierarchy. Place the Plane beneath wall.png and above telescope.png. Right click on the plane node and rename it as ‘Floor’.

Step 18: Position the Floor

Position (0.0, -1.5, -2.5)
Scale ( 5, 2.5, 1)
Rotation ( -90, 0, 0)

We have rotated the floor so that it is coming towards us from the target image. This will be important in giving the impression of depth.

Step 19: Set the Floor Color

Remaining in the Properties section, head to the 'Appearance' section and then click the color box, and set the HEX value to #ff7ebb93.

Step 20: Make the Wall Visible

Click on the wall in the Hierarchy, head to the Appearance section of the Properties panel and check the 'visible' box.

Step 21: Set Scene Ornaments to Test_3d

You are now going to set the 'layerMode' of the objects in our Scene Ornaments group to 'test_3d'. Start from the wall and go through the Scene Ornaments group.

Click the object node, then within the Properties panel, scroll to the ‘Appearance’ section and change the layerMode from overlay to 'test_3d'. Do this individually for each item in the Scene Ornaments group.

Changing the 'layerMode' to 'test_3d' means that these objects will have to be closer to the camera than other 'test_3d' or 'full_3d' objects in order to be visible.

Step 22: Create a Square Mask in the Media Library

Click the (+) icon in the Media Library and select the 'Square Mask'. This will add a Square Mask into your Media Library.

Step 23: Set the Square Mask LayerMode to Full_3d

Click on the Square Mask in your Hierarchy. Go into the Properties panel and in the Appearance section, set the 'layerMode' to 'full_3d'.

The mask object will still hide the other objects but will be drawn to the screen first.

Step 24: Set the Transparency of the Square Mask to 0%

Click on your Square Mask within the Hierarchy. Head to the 'Appearance' section of the Properties panel and click the color box.

This will open a dialogue box. Set the transparency to 0% and click ‘OK’ to close the box.

The mask object now will not be visible but will still hide the objects behind it.