Starting an Android AR Project with QCAR

Qualcomm LogoIn my previous post, Augmented Reality on Android, I listed several AR libraries for Android. After reading and trying some of them, I finally decided to go with Qualcomm’s QCAR. By great coincidence, QCAR’s first production-ready release happened this week with version 1.0.0.

My reasons for choosing QCAR

  1. Official support for a great list of devices, old and recent
  2. Their demos, tested on my Samsung Galaxy S, are way snappier than other libraries I tried
  3. It recognizes partial markers (when partly in the camera’s sight)
  4. Great developer guide and API documentation
  5. Great developer community (forums)

Loading a 3D model

As stated in my previous post, I need to load a 3D model over a marker when it comes in the camera’s sight. The model I have to load is a .obj file, but QCAR only “works” with .h files (the usual way of doing things in OpenGL). I found two ways of solving this problem:

  1. Converting .obj file to .h file using this script: OBJ2OPENGL
  2. Using a second library to load .obj files

Right now, I’m trying both options. I’ve had success with the min3d library, but I’m experiencing some image distortion. I still have a lot of work to do. Like I said before, I’m no Android expert, and I’m still learning the basics. I’ll be back soon with more on this subject. In the meantime, feel free to post any comment or question.

—- EDIT (September 9, 2011) —-

I am not working on this project anymore, but I’d like to let everyone know I didn’t use min3d. I converted my 3D model to OpenGL ES .h file. Read this post for more information.


  1. AnneClaude Tregouet

    May 9, 2011 at 10:57 am


    I’m trying to use QCAR. I installed everyhting, even the unity extension.
    My problem is that the .apk file of the ImageTargets does not install on my HTC Desire (I do it via HTCSync). Maybe I do it wrong…

    Do you have an idea to solve the problem?


    • Matt

      May 9, 2011 at 12:46 pm

      I use the USB cable with phone in debug mode. I’m gonna post more tonight on the way to deploy applications directly from Eclipse.

      Have you tried using the USB cable before? Are you on Windows or Linux? If you are new to this, I suggest you start with this link: Introduction | Android Developers.

      • AnneClaude Tregouet

        May 12, 2011 at 5:09 am

        Thanks for your reply. I solved my problem (it was a problem with my phone), and the apps work!

        Now, I’ll try to vreate my own one!

    • AlejandroFraenkel

      November 21, 2011 at 11:52 pm

      Try to follow the steps at QCAR SDK site (Dev Guide). Be sure that you are compiling with ndk-builder command the project sources before you put them into an eclipse project. You will need to download de ndk from android developer site.

  2. AnneClaude Tregouet

    May 12, 2011 at 7:45 am

    I have just few questions (again)! Do you use the Unity extension?
    Because I just don’t know if to make app, the not-free-version of Unity is required?
    I mean, do you create the .apk file from Eclipse or from Unity?

    Whatever, I’d like first to use use QCAR without Unity.
    But I don’t know how is the structure of the project (ImageTarget for example). Do you have any links to help me?


    • Matt

      May 12, 2011 at 8:28 am

      Hello again.

      I don’t use Unity because I found there was a lack of documentation for Android and it costs a lot. I use .obj 3D models that I export to .h (C++ header files for OpenGL). That is a lot of job though…

      I compile everything in Eclipse (as I don’t use Unity). You can create a new project, but specify as source files folder a demo QCAR project. It’s all very well explained here: Their Getting Started guide is very helpful.

      I hope this helps you start your own project.

  3. Hi.

    Really works in Samsung Galaxy S?

    I try it and I cannot do something with the mobile.


    • Matt

      May 16, 2011 at 10:07 pm

      Hi. Yes it does. I’ve been working on this project for three weeks now, always using my Galaxy S. My partner uses a Motorola Atrix on which it works great as well.

      Can you describe the problem you are experiencing? Are you trying the demo apps? Are you using Eclipse?

      Thanks for reading!

  4. Hi Matt,

    do have, by accident, an idea how to overcome using Qualcomm’s Target Management System (when using ImageTargets)? QCAR seems to be really good but it would be even better if I could dynamically load ImageTargets … maybe even from my own server, where I’d have the full control.


    • Matt

      June 26, 2011 at 9:46 am

      Hi Brian,

      I’m not sure I totally understand what you’d like to achieve. Do you simply want to get rid of ImageTargets’ “rock bed” marker? Or you want to replace the whole image recognition system and dynamically load other markers?

      If you want to use a different marker than the kind of rock bed that comes with the ImageTargets demo project, you need to open an account on QDevNet (, go to “My Trackables” to create a new marker (trackable), then download the trackable (this will give you a zip file containing config.xml and qcar-resources.dat) and replace the ones that already exist in your project (if I’m right, it goes in the jni or media folder, but I don’t have my project with me right now).

      I’m sorry if I did not answer your question. In that case, please be a bit more precise, and I’ll do my best to help!

      • Hi Matt,

        Well, what you described is what I’d like to avoid 😉

        My goal would be to have my application which I compile only once. During runtime I would want to load “Trackables” and work with them accordingly.

        So what is getting into my way of doing so is, that QCAR requires that the config.xml and the .dat file is compiled into the application. I guess I could work around that somehow, if I knew what format qcar-resources.dat is. I guess it is some serialization of some object — but not a Java object (I figured that out already 🙂 ). If I knew that, I guess I could create my own qcar-resources.dat on my server and let the application load it (even though the .dat file looks quite fat it is probably not the best choice for transmitting it to a smartphone which has not always the best connectivity, but that wouldn’t be a big problem for the start).

        I’d love to use QCAR because it just runs so smoothly, compared to other projects and frameworks I tried so far. Unfortunately, I don’t see a good way of using it with my requirements.

        If you have some ideas… 🙂

        • Hi Brian,

          I am not sure if you have achieved this or not.

          One suggestion is to create the resources.dat each time from the QCAR website and replace the file on the server.
          Next time the application runs on the smartphone, it can check if the dat file on the server is the latest version. If so then download it, else use the older version.
          Note: for the first time the file would be downloaded from the server path provided.

          If you are able to achieve this, please let me know more details…

  5. I have read your post about ‘Loading a 3D model’, but I don’t know how to use min3dlibrary. Can you make more detail tutorial for Loading a 3D model. Sorry to bother you.


    • Matt

      July 5, 2011 at 7:51 am

      Hi Dian. I hope I will find time to post about that subject soon, but I finally never used min3d. Maybe it can be used, but I never managed to make min3d and QCAR work together. I finally got help from a friend who’s a C++ OpenGL programmer working in the video games industry, and we used standard OpenGL to show .obj 3D models converted to .h (C++ arrays of vertices, texture coordinates, etc.). This was a lot of work though. If I had to do it again, I would probably give a try to the Unity framework. But there ain’t a lot of documentation for Android, and it costs a lot if my memory is good. It’s an excellent framework though. Thanks for reading and feel free to send other questions you might have!

      • Sorry to bother you again. I want to know how to convert .obj 3D models to .h with OpenGL. Can you give me some tutorial or link about that.


  6. Hey,

    Actually Im starting a new project with QCAR and Android.

    Ill be visiting your site to see your progress and maybe we can share our knowledge.

    See you.

    • Matt

      August 31, 2011 at 10:17 am

      Hi. I’m not working with QCAR at the moment. I’m working on a Flex/iPad application. Please read my last post (written yesterday). I give some simple recommendations and talk about my experience. Thank you for reading!

  7. Hey I’m trying to use QCAR with the min3Dlibrary, too. I would really appriciate this, if you could tell us how you implemented the library to QCAR to load models.

    Thank you very much,


    • Matt

      September 6, 2011 at 9:10 am

      Hi Dimitri. I also tried very hard to make QCAR and min3D together, but in the end I had very little success. It was a real pain to make both communicate, so I finally converted my .obj to an OpenGL ES .h file. If I had to do it again, I would DEFINITELY go with Unity framework for $400. It’ll make you save weeks of development and you’ll get much better results. I wish you all the best with your project.

  8. Hi,

    I am also analysing QCAR SDK to be used for some image recognition solutions. I have seen the samples provided with QCAR SDK.
    They use the Android part and also native part.

    Is it possible to have all the functionality in native part inside the Android?

    Ex QCAR.CameraDevice.getInstance().init(),

    How can I use these API’s in Android?


  9. hi..
    I’am dannish i need a tutorial on making games using the vuforia sdk, if you can helpme ? I learned about tower defense game whether the unity + vuforia can make the game with constraints:
    a)the clash between his object ?
    b)then whether it can make the animated sprite ?

    please help me so thank you in advance

Leave a Reply

Your email address will not be published.


© 2019 Evil Coding Monkey

Theme by Anders NorenUp ↑