View this PageEdit this PageUploads to this PageVersions of this PageHomeRecent ChangesSearchHelp Guide

Tutorial 1 - Camera Testing

Now that you have successfully set up the camera hardware, it is time to test your installation by feeding live video into Director. The Director Movie for this tutorial contains the configuration explained below: DART-tutorial-1.dir (23 KB)

In this tutorial you will learn how to interact with Director and the DART libraries. You will see the basic DART setup and learn some of the intricacies of working with DART. At the end of this tutorial you should have a live video image in the background of the stage like this:


Uploaded Image: t1-image5.jpg




The 3D World

In every DART application, there must be a Shockwave 3D world as the container for all AR-related behaviors. If you don't have one already, create a blank 3D object, call it "3D World", and place it in your internal cast library. Next drop it on to the score.

Uploaded Image: t1-image1.jpg


The Loop

Now put a loop on the score. This loop is used to keep the play head at a particular frame until the system is told to move to another loop. This is helpful for designing the flow of an application. Make sure to move it to the third or fourth frame on the score so that DART has a few frames to initialize the application.

Uploaded Image: loop.jpg (Loop icon)

Uploaded Image: t1-image2.jpg


3D Camera

Next, you must configure the 3D camera on the 3D World. The 3DCamera is the viewport into the virtual world and determines what part of the 3D world the Stage will actually see. You must first access the DART-Lingo cast libraries. Import the libraries to the movie by going to File -> Import and go to the directory called DART-Lingo. Select all the .cst files here to import all of the scripts.

The 3DCamera behavior is under DART-Framework.

Uploaded Image: t1-image4.jpg

Drag and drop "3DCamera " onto the 3D World sprite. You should be presented with a properties window. For now, just keep the default properties how they are. You will learn how to modify these later.

Live Video

Next, you need to put a container on the score to hold behaviors for the camera. This is a common technique used in DART and most things will start with a container. A container is just a blank text file, but it is needed as a basis to add behaviors. We have provided several specially named containers – in this case, it is called “Cameras”.

Uploaded Image: t1-image3.jpg

Place this container on the score underneath the loop. Modify the length so it only stretches over one frame. Next, find the LiveVideo behavior from the DART-Framework library and place this on top of the container.

Uploaded Image: cameraConfig.jpg (Live Video icon)

You should now see the properties page for the LiveVideo. Choose the type of camera based on what hardware you have. Choose the input and output types for the camera (usually rgb for both) and camera size (most cameras support 640x480, but 320x240 might provide a faster frame rate). Make sure the camera configuration file has the correct name for the local ".cam" file on your machine. Provide the correct path for the Data directory provided in the installation. Click OK to save these settings - these can be changed by going to the properties inspector for the 3D World sprite.

Movie Settings

Also, make sure the Director environment is setup correctly. Under movie settings:

Preferred 3D Renderer: #openGL
Stage Size: 640 x 480
Location: 0 x 0
Check RGB, not Index

Under 3D World sprite properties:

X: 320
Y: 240
L: 0
T: 0
R: 640
B: 480
W: 640
H: 480

Running the Application

Now to test your application, make sure you first save the Director Movie, and then rewind the play head. Every time you play an application in DART, you MUST rewind the play head. There are certain initializations that must happen before the play head stops in the first loop.

When you push play, after a couple of seconds, you should see a live video feed onto the stage. If this doesn’t work, check the message window for error messages. Make sure all the settings in Director are correct. Go back and check the installation procedure and path names. Reinstall DART, if necessary.

Link to this Page

  • DART Tutorials last edited on 5 June 2004 at 5:50 pm by dhcp122.mobile.cc.gt.atl.ga.us