Is it possible to fetch the .dat and .xml files from a web url? What files should be worked with?
Hi, you cannot load them directly into Vuforia from a web |URL,
however, what you could do is:
- first download the .dat and.xml from the web and store them into your device esternal storage (i.e. the SD card)
- then load them from the SD card where you have stored them in the previous step
I got a code for doing this from the url: http://stackoverflow.com/questions/3551821/android-write-to-sd-card-folder
What should be done for loading the dat and xml files from the SD card location?
Nothing special, just use the QCAR::DataSet::load() method with the QCAR::DataSet::STORAGE_ABSOLUTE flag, somehtinglike:
I was able to pull the xml file from SD card. But, how can I pull the code and files for the 3D object from web? Is it possible to dynamically update the 3D object from web by setting new .h files and the value arrays?
Yes, you can download the files (3D model or other files ) to the SD card (how to dowload to SD card is not relevant to Vuforia SDK);
concerning the possiblity to dynamically use .h files (with 3D models vertex arrays), this would require you to read them with an ad-hoc parser (which you would have to implement on your own);
usually, .h files are just compiled with the code, so they cannot be used as a "dynamic" resource; however, what you could do is to write a simple text parser in C++ that reads and interprets the vertex arrays in the .h file and dynamically allocate the arrays (which you can then use in the renderFrame() function).
1. Will the 3D video work if I export to OBJ format? Or will have to use the video player if I need to show a 3D animation?
2. Also, what all files should I get from the 3D designer for using my own 3D model instead of teapot model?
3D animations need to be rendered with some OpenGL-base code that supports animations; note that the Vuforia samples rely on OpenGL but there is no API provided to support 3D animations, so these need to be coded at application level, or you can otherwise integrate some third-party 3D engine that supports animations. Also, the OBJ format is probably not a good candidate; the FBX format would work better.
Also, note that handling/rendering 3D animations in native code is farily involved and can be a quite challenging coding task if you don't use some third party libraries that support that. A very nice alternative would be to use the Unity extension instead of programming natively.
Thanks for confirming. So, if a simple 3D object is required, we can go for the image target concept and when a complex 3D animation.movie is required, we will have to go for Unity based implementation.
I will check the unity plugin. This is going to be a tough job for me since I am not a good designer.
One note: you mention "3D animation" and "movie" as if they were the same thing;
actually, a 3D animation is a rendered 3D model which is animated in 3D space, while a movie is something that can be played on a flat surface (like a video);
for movies, you can also have a look at the VideoPlayback sample, which renders movies (videos) on top of image targets.
Also, you mention the "simple image target concept" as opposed to Unity;
actually, both in Unity and Native Android (or iOS) programming, the "image target concept" is exactly the same; the only difference is that when you want to render an augmentation on top of an image target, in native programming you are a bit limited to use simple 3D models (unless you are a very good OpenGL programmer or have integrated 3rd party engines), while in Unity you can integrate farily sophisticated 3D models quite easily, ans also animated ones.
I was able to create some 3D models using Unity quickly. This is much faster and easy than with native coding. But, I think the native one will be more powerful and efficient.
Are you sure you want to delete this message?
Are you sure you want to delete this conversation?