Computer Graphics and Multimedia Software - Knowledge Sharing

Tuesday, December 14, 2010

How to generate marker

Marker





In order to create your own markers you have to start with a new blank rectangle. To make it simple you can use the blankPatt.gif (Picture 5) located in the patterns folder of the ARToolKit installation.

The next thing you have to do is start the mk_patt.exe file located in the bin folder. The file requires an input for the camera. You can use "data/camera_para.dat". This is the default setting for the camera.

Position the camera right over the marker. You should be able to see a red and green square around the pattern. This means that ARToolKit has found your marker. Rotate the camera until the red corner is in the upper left (Picture 7).

How to create Marker Using ARToolkit

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!

1. The file, mk_patt.exe, can be located in the ARToolKit\bin directory


2. Double click the mk_patt.exe, screen below will appear.


3. Attach the camera to detect your pattern of marker.


4. Enter your pattern name. For example patt.aku


5. Press Enter to saved the pattern.


6. 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.



7. 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.



8. The file required . dat file. Next you will learn how to create .dat file


How to create file .dat

Once you have the file in this directory, you will need to create a .dat file that is required from the toolkit. 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 pasu.dat


In the .dat file you will specify the model file and the translation, rotation, and scale parameters.



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.

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

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

Share:

1 comment:

  1. Hi thanks for the good tutorial,

    I have a question. When I do just the way you told, simplevrml.exe says this: "pre-rendering the VRML object" and gives error. What did I do wrong?

    ReplyDelete

Malaysia Augmented Reality

Its incredibly difficult to discover the undiscovered. Here will see how I can help you. Cheers - Ajune (comp.utm.my/ajune)
ajune@utm.my. Powered by Blogger.