Creating your first package

Most of the content for Popcode is created using an XML-based language. If you are unfamiliar with XML consider taking a look at W3Schools' XML tutorial before starting. If you have experience with HTML or other XML-like languages you'll have no trouble getting started with Popcode. It is important to note that XML is case-sensitive and that in the Popcode platform, all nodes and attributes are lower case.

Composing a scene

In this tutorial we'll create a simple scene with some objects, animation and interaction. Packages are arranged in folders in the Packages folder of the Developer Kit. You might like to take a look at the examples that are already there but for the moment create a new folder named "SimplePackage".

Each package is composed of a number of files:

  • A target file describes the picture to display the content on top of.

  • ARO object model files describe 3-D geometry. A number are included with the platform (we'll use one in a moment!).

  • A scene file places ARO object models and describes any animation or iteraction.

  • The manifest.xml file tells the application which scene and target files to use.

Inside this SimplePackage folder, create a new file, SimpleScene.xml and copy the following into it using Notepad or your favourite text editor:

	<object type="primitives://plane.aro"/>

This scene contains one object. The model for this object is a plane (a square) and is one of the ARO models included with the platform.

Also create a manifest.xml file and copy the following into it:

title="Simple Scene"
description="An example scene"

Here we give some details about our scene - some descriptive data, the filename of the scene file to show, and the filename of the target to display the scene on top of.

Preparing the target

Open the Popcode Test Target folder of the Kit. Inside there are two files. Print out PopcodeTestTarget.png - it will be what the content that we've just created will be augmented onto - and copy to the SimplePackage folder.

Previewing the package

That's it - you've created your first Popcode package! To see what it looks like, double click on the SceneViewer program, click Open, and select "SimplePackage" from the list. Viewing the Popcode Test Target with the webcam, you should see the a white square (the plane) on top of it.

The next step is to apply a texture...