Pages

Monday, February 20, 2012

ARToolKit MMD tutorial virtual 3D

Good morning all my friend... pagi ini saya pengen bagi-bagi informasi mengenai cara membuat sebuah vitual 3d di dalam komputer. tapi dengan latar kamar kita. Dengan bantuan camera untuk menangkap objek background yang kita inginkan dan selanjutnya di dalam komputer akan dilakukan virtualisasikan ke dalam 3d. Jadi seolah-olah sebuah objek akan muncul di kamar kita tetapi hanya ada di dalam komputer. Oke kita lanjut aka ke tutorialnya aja!



ARToolKit adalah program yang digunakan untuk menampilkan model atau gambar pada video webcam dengan mendeteksi penanda (teknologi yang sama: pengenalan wajah). Dengan menghitung bagaimana gambaran menandai dideformasi, program akan tahu bagaimana penanda berorientasi pada kehidupan nyata. Menggunakan informasi tersebut, program  akan memasukkan model 3D dengan orientasi langsung ke video menggunakan penanda sebagai titik pusat.
Sejak di buatnya MikuMikuDance, adalah perangkat lunak yang bebas dan bagus dalam  pemodelan 3D, dapatdigunakan untuk memasukkan model 3d, data gerak, dan data file gelombang disimpan dalam file biasa .pmm di augmented reality..



TUTORIAL
  1. download MikuMikuDance (mine is directx9 version) from [link] 
  2. to download ARToolkit_MMD, first go to [link]
  3. go to this link [link] Click the obvious button, then on the next screen, click the one that says in english 'download now'
  4. extract the files.
  5. open the ARToolkit/Data folder, then print out the .pdf named pattSample1 on a piece of paper. for best results, you want to attach it to a hard surface.
  6. back in computerland, open the ARToolkit folder, open up the .ini file named setting.
  7. change the #MMDDataFolderName to where you extracted your MikuMikuDance Data folder.
  8. change the PMMFileName to the path where the .pmm file you want to use is located
  9. you can change the scale to get a larger or smaller scaled model.
  10. save and exit the .ini file.
  11. run ARToolkit_MMD.exe
  12. if you have a 64 bit computer, it should be screwing up saying : msvcp71 is missing. If so, copy and paste the msvcp71 and msvcr71 .dll files in the ARToolkit folder into Windows SysWOW64 folder (not system 32). run ARToolkit_MMD.exe to confirm that its fixed.
  13. a windows blackscreen appears with a window named 'Property Sheet Properties.
  14. Frame rate should be as high as you can, check the flip horizontal if youre using a laptop webcam, uncheck if you somehow have your webcam attached to your head. color space, i dont really care. Output size... 640 x 480 have not been giving me problems. larger than that tends to lagg. The default 640 x 400 somehow messes some stuff up a bit
  15. if you run into an error, it means some models arent loading up or you didnt change the path earlier properly. if so, open MikuMikuDance, open up that .pmm file and just delete the models it cant load. 
  16. if you can run it, a webcam output now appears.
  17. bring your printed pattern into full view of the webcam window. The whole pattern should be visible.
  18. the program detects a transformation of the pattern 'matrix' to calculate a viewing orientation.
  19. the files in the .pmm file should appear, but not move just yet.
  20. these buttons on your keyboard have specific functions: a - toggles opacity of the AR model. s - begins/pauses the dance routine. r - resets the dance routine
  21. feel free to move the marker to different orientations to get different views of the whole thing.
  22. if your .pmm file has a .wav sound file loaded, this version will play the .wav file as well, provided that its title is in a simple form (no jap, no special characters. A pure english title works best.
  23. to play other .pmm files, you need to open the .ini file and change the path to where the new .pmm file you want to load is loaded.



extra info:
Jika webcam mengalami kesulitan penginderaan penanda karena penanda tidak terlalu 'hitam', maka buka file setting.ini, dan cari kalimat yang bernama MarkerGrayScaleThreshold. Atur ke nilai tinggi (255 jumlah maksimum) akan membuat penanda Anda terdeteksi bahkan ketika mereka tidak muncul sebagai 'hitam'seperti yang seharusnya.
jika lingkungan sekelilingnya terlalu hitam, maka pengaturan nomor ke nilai yang lebih rendah akan membantu mendeteksi penanda dalam kondisi cahaya rendah.
Pengaturan standar adalah 128.

4 comments: