Você está na página 1de 8

Using ARToolkit to develop Augmented Reality application

Tutorial 2

Download latest version ARToolkit 2.7.2.1 www.hitl.washington.edu/artoolkit/download


Rujuk Documentation provided in HitLab website for more information/additional note.
Must know how to configure and setting up ARToolkit set directories Option properties visual studio
pada linker, include dll, path.
Kalau tidak ada error seperti di bawah:

AR menggunakan dua library iaitu GLUT untuk rendering proses dan ARToolkit untuk projection virtual
object ke real world, computer vision teknik yang mengesan penanda untuk aligning object to be existed
in real world. So kena ada ARToolkit dan GLUT, the OpenGL Utility Toolkit.
Compile dan debug dengan menggunakan - Visual Studio 2003, Visual Studio 6.0, Visual Studio 2005
A webcam (install any drivers that is necessary to get the webcam running)
The VRML renderering library and example (libARvrml & simpleVRML)
AR - marker vS markerless
marker - important aspect of the marker is the black border

Using ARToolkit to develop Augmented Reality application

Tutorial 2

Example Marker
Kalau nak Custom Markers
In order to capture the marker, we must run an executable that is included in the software library. Make sure your
camera is plugged in! The file, mk_patt.exe, can be located in the ARToolKit\bin directory.

Using ARToolkit to develop Augmented Reality application

Tutorial 2

Using ARToolkit to develop Augmented Reality application

Tekan Enter marker kita akan saved.

Tutorial 2

Using ARToolkit to develop Augmented Reality application

Tutorial 2

Incorporating Custom Markers into ARToolKit


Once you have created the pattern file using the mk_patt executable, copy the pattern file into the
ARToolKit\bin\Data directory. This is important as the pattern files are accessed in this directory. Once the pattern
file has been copied, you will then need to edit the object_data_vrml file in the ARToolKit\bin\Data directory. Right
click the object_data_vrml file and open it in WordPad.

Using ARToolkit to develop Augmented Reality application

Tutorial 2

To test whether your pattern works, substitute one of the Data/patt files and replace it with your own. In the case
of our example, we will replace it with Data/patt.aku

Model yang support


-

Obj
WRL // untuk VRML

Convert your model kepada WRL atau OBJ jika model itu format .3ds, .stl, .max, .dxf and so on

Using ARToolkit to develop Augmented Reality application

Tutorial 2

Incorporating Custom 3D Models into ARToolKit

Using your favourite 3D modelling program, export the model or animation into a .WRL file. If you are using any
textures for your model, have the path of the texture set to ./textures/nameOfTexture.gif. One thing to note is
that ARToolKit only supports .GIF formats. Make sure your texture file is in gif format before you export the model!
Once you have the 3D model exported, copy it into the ARToolKit\bin\Wrl directory. In our example, we have
copied a fire extinguisher model.
Once you have the file in this directory, you will need to create a .dat file that is required from the toolkit. In the
.dat file you will specify the model file and the translation, rotation, and scale parameters. To create the .dat file,
right click any empty space in the ARToolKit\bin\Wrl directory. Select New Text Document when the menu
appears. Rename this document file to nameOfModel.dat. In our example, we have named it extinguisher.dat.

Rename dengan ape saja nama untuk model kamu kemudian Enter. Contoh pasu.dat seperti di bawah.

Using ARToolkit to develop Augmented Reality application

Tutorial 2

1.name of the model file in the first line


2.the translation coordinates in the second line
3.the rotation coordinates in the third line
4.the scale in the fourth line

Save this file and run the SimpleVRML executable. Your model should now display on your
custom marker!
VRML Demo

Você também pode gostar