Log in or register to post comments

Loading target image and rendering model dynamically from URL

May 27, 2011 - 2:02am #1

Hi,

I am a beginner in AR development.

I need to do an application where 3D models (or images) and trackables (downloaded from QualComm, config.xml, .dat file) are at a specific URL. When the android application is started, it will download the 3D model and trackable and then will match the target and render model.

Is it possible to do this? I mean to dynamically load the 3D model and trackable data without compiling them into the .apk file.

If this can be done, can you please give me some guidance?

Thanks in advance. :)

Re: Loading target image and rendering model dynamically from UR

June 1, 2011 - 9:41pm #7

Thanks for the info.
I'll contact you if I need any help. :)

Re: Loading target image and rendering model dynamically from UR

May 31, 2011 - 11:53am #6

Sorry, the networking logic is outside of my domain. Perhaps other users here can help, or you might try the Android developer forums. I do suggest doing this part in Java using the Android APIs.

Once you work out the networking part, you'll want to integrate it with our sample code. For images (textures), you'll need to update our Texture.java class to load the texture from a different input stream (whatever you receive from the network). For models, you need float/short/byte arrays that you can send to native (via the JNI) and feed to OpenGL. I can help you with this part if you get stuck.

Another option is to send your models in a popular 3D format (e.g. obj) and integrate a parser on the mobile end to extract OpenGL-ready data.

- Kim

Re: Loading target image and rendering model dynamically from UR

May 30, 2011 - 11:11pm #5

Thanks...

Can you provide me some sample code or guidance (if you can)?

Thanks a lot. :)

Re: Loading target image and rendering model dynamically from UR

May 30, 2011 - 6:25am #4

Sure, but this isn't a QCAR-specific problem. If you can write an Android application that can download a model file from a server and render it using OpenGL ES, then you can integrate this with QCAR. Our samples provide one possible pathway for loading 3D models and textures, but will work with any OpenGL ES solution.

- Kim

Re: Loading target image and rendering model dynamically from UR

May 29, 2011 - 10:12pm #3

Thanks for the quick reply.

What about the 3D model (or image) to be rendered? Can I load it dynamically?

Thanks. :)

Re: Loading target image and rendering model dynamically from UR

May 27, 2011 - 6:06am #2

Currently the trackable data files (config.xml and qcar-resources.dat) must be present at compile-time. There is no way to download these and use them at runtime. This is a feature request we are considering, however.

- Kim

Log in or register to post comments