Problem with Integrating jME and NYARToolket Augmented Reality

Hi,



I'm hoping someone can help me with this frustrating conflict I'm experiencing.



I'm trying to get NYARToolkit working with jMonkeyEngine. I know that some people have had success with this. My project is set up in NetBeans on windows XP.



I've taken the initial steps of placing all the source files into the same project, and adding all the appropriate jars to the library for both NYARToolkit and JME.



These are the instructions I used to set up my working JME project:



http://www.jmonkeyengine.com/wiki/doku.php/setting_up_netbeans_6.7_for_jme_2.0.1



and these are the instructions I used to set up the NYARToolkit:



http://fangel7.tumblr.com/post/340840281/nyartoolkit-for-java-installation-instructions-for



Having merged the two instruction sets the issue I have now is that when I try to run the NYARtoolkit examples I get this error mesage:



java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
        at java.util.Vector.elementAt(Vector.java:427)
        at jp.nyatla.nyartoolkit.jmf.utils.JmfCaptureDeviceList.getDevice(JmfCaptureDeviceList.java:80)
        at jp.nyatla.nyartoolkit.jmf.sample.NyarToolkitLinkTest.<init>(NyarToolkitLinkTest.java:72)
        at jp.nyatla.nyartoolkit.jmf.sample.NyarToolkitLinkTest.main(NyarToolkitLinkTest.java:155)



The problem seems to go away if I remove these VM options from the project settings:


-Djava.library.path="..jME2jME2_0_1-Stablelibliblwjglnativewindows;..jME2jME2_0_1-Stableliblibjoglnativewindows_i586"



But then, of course, the jMonkeyEngine code doesnt compile.

Having google around a bit, it seems that the error message is associated with having no camera plugged in.

The libraries that the NYARToolkit wants are these: j3dcore, j3dutils, vecmath, glugen-rt, jogl, which I think are already present in the jMonkeyEngine setup. Is that right?

Does anyone have any hints on what might be causing this conflict? Any advice on getting this to work would be awsome. I'll take even the slightest hunch...

Thanks

Hi there,



I am currently developing a framework which abstracts away from both NyARToolkit and jME to allow applications to be developed using both. it is on google code at http://code.google.com/p/armonkeykit which may be of some use to you.



As for how I got it working, I used the QuickTime examples in NyARToolkit to use QuickTime to capture the webcam feed. This makes use of QTJava.zip which comes with QuickTime installs and makes it reasonably easy (compared to a lot of the JMF stuff) to get it up and running. If you are just looking for a base to build apps on, you may want to consider using the armonkeykit framework though, as it is under active development, there are some issues at the minute but it may be easier than trying to do the integration from scratch again.



Hope that helps a bit



Adam

Hey, I just wanted to thank you for this. Awsome work. I was having some problems with my project, but now I'm going to switch over to ARMonkeyKit. Lifesaver! We're close to completing a commercial AR installation. I'll send you some footage when it's up and running. Thanks again!