Log in or register to post comments

Rendering engine to use with QCAR.

October 31, 2010 - 7:08am #1

Hello.

I don't have any idea about 3D model, OpenGL and rendering engine.

My questions are:
- May I have to use a rendering engine to show superimposes 3D objects?
- A java rendering engine or a C++ engine?
- Which one do you recomend me?

Thanks.

Rendering engine to use with QCAR.

August 3, 2017 - 2:03am #59

Hi. Would somebody please send me a copy of the min3d-QCAR code?

sudhir6yadav@gmail.com



I really appreciate it. Thanks a lot

Rendering engine to use with QCAR.

September 19, 2012 - 5:58am #58

Hi. Would somebody please send me a copy of the min3d-QCAR code?

I really appreciate it. Thanks. Smile

Rendering engine to use with QCAR.

September 6, 2012 - 12:49am #57

Or what changes needed to do for min3d + vuforia is working?

Rendering engine to use with QCAR.

September 6, 2012 - 12:34am #56

Can anyone send me the imagetarget-example code with min3d?

My email is m31wayfarer@gmail.com

Thank you very much

Rendering engine to use with QCAR.

August 17, 2012 - 3:12am #55

Sorry, All

I am interested in Qcar sdk with min3d,

please,Can anyone send me the imagetarget-example code with min3d? ,too.

My email is t8590338@gmail.com

Thank you very much

Rendering engine to use with QCAR.

August 10, 2012 - 5:43am #54

Hi All,

Can anyone please send me the imagetarget-example code with min3d?

My email is

Thank you very much

Re: Rendering engine to use with QCAR.

April 24, 2012 - 6:22pm #53

Try using the Eclipse debugger to track down the null pointer. Take a look at line 85 of ImageTargetsRenderer.java, as the error suggests.

We don't have any tutorials for merging QCAR with 3rd party rendering engines at this time. I suggest looking into Unity and our Unity extension if you want a quick and easy way to get started with 3D content.

- Kim

Re: Rendering engine to use with QCAR.

April 23, 2012 - 9:49pm #52

hey anyone ........plz help me....

Re: Rendering engine to use with QCAR.

April 20, 2012 - 10:50pm #51
ksiva wrote:

min3D only supports OpenGL ES 1.1. The QCAR samples use OpenGL ES 2.0 by default. You can change this by opening up the jni/Android.mk file and setting the USE_OPENGL_ES_1_1 flag to true.

- Kim

thanks for reply kim,
i had already done that,now after all rendering in ImageTarget.cpp i commented this
glDrawElements(GL_TRIANGLES, NUM_TEAPOT_OBJECT_INDEX, GL_UNSIGNED_SHORT,(const GLvoid*) &teapotIndices[0]);
so that i can draw with min3d drawScene method.
but now i got this

04-21 11:11:48.135: E/AndroidRuntime(21338): FATAL EXCEPTION: GLThread 11
04-21 11:11:48.135: E/AndroidRuntime(21338): java.lang.NullPointerException
04-21 11:11:48.135: E/AndroidRuntime(21338): 	at com.qualcomm.QCARSamples.ImageTargets.ImageTargetsRenderer.onDrawFrame(ImageTargetsRenderer.java:85)
04-21 11:11:48.135: E/AndroidRuntime(21338): 	at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1388)
04-21 11:11:48.135: E/AndroidRuntime(21338): 	at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1138)

my question is that how can can simply draw with min3d drawScene on top of qcar drawVideobackground... then on next step i like to pass pose matrix info to min3d so that model can be drawn relative to marker....
is it possible what i am trying ?
thanks in advance..

Re: Rendering engine to use with QCAR.

April 20, 2012 - 8:48am #50

min3D only supports OpenGL ES 1.1. The QCAR samples use OpenGL ES 2.0 by default. You can change this by opening up the jni/Android.mk file and setting the USE_OPENGL_ES_1_1 flag to true.

- Kim

Re: Rendering engine to use with QCAR.

April 20, 2012 - 12:36am #49

hi ,,
when i try to draw with 3dmin function, qcar gives this error...
called unimplemented OpenGL ES API.

what should i follow to do this...i am stuck at this .plz help me

Re: Rendering engine to use with QCAR.

April 19, 2012 - 11:16pm #48
ksiva wrote:

See this thread for help with passing the matrix from the native code to Java:

http://ar.qualcomm.at/node/2001930

- Kim

hi Kim,
thanks for replying.

is it possible to let qcar do all rendering and draw functionality is done by another renderer engine?
i am trying this but there is gl conflict between qcar and minb3d. as far as i understand .
how can i do this ?

Re: Rendering engine to use with QCAR.

April 19, 2012 - 12:04pm #47

See this thread for help with passing the matrix from the native code to Java:

http://ar.qualcomm.at/node/2001930

- Kim

Re: Rendering engine to use with QCAR.

April 19, 2012 - 1:25am #46
ksiva wrote:

Make sure you are using both the modelview (pose) and projection matrices provided by QCAR. Have you gotten that far?

- Kim

hi kim,
i had no luck i getting these values and passing them to another render engine(currently min3d),can you guide me to where i have to take these values and how to pass them to java code as min3d is in java....
thanks in advance

Re: Rendering engine to use with QCAR.

April 16, 2012 - 2:42pm #45

Make sure you are using both the modelview (pose) and projection matrices provided by QCAR. Have you gotten that far?

- Kim

Re: Rendering engine to use with QCAR.

April 16, 2012 - 4:34am #44
ksiva wrote:

You can certainly use a rendering engine with the SDK. You will need to find one that works with OpenGL ES 1.1 or 2.0, and that can be compiled for the Android platform.

I believe Android OS 2.2 has Java bindings for much (but not all) of the OpenGL ES 2.0 spec, and perhaps better support for OpenGL ES 1.1. So it might be possible to find a Java rendering library that uses these calls, but it would probably need to be tailored against the Android SDK.

You will probably find a better selection of C++ OpenGL ES rendering libraries. Try finding one that already has an Android target, or one that you can easily cross-compile with the Android ndk-build system.

- Kim

hi kshiva;
it is good to see some people here trying to integrate min3d with qcar,i am also on my way but i am stuck with getting md2 model position with respect to tracking image..plz help me
thanks in advance.

Re: Rendering engine to use with QCAR.

April 16, 2012 - 4:29am #43

is anyone having the code?plz give me some snippet.

Re: Rendering engine to use with QCAR.

April 16, 2012 - 4:27am #42
martarodriguez wrote:

Finally, with Kim's help I make it to work :D. So, it is possible to use min3d framework with AR SDK.
Thus, the files exported from Blender (.obj, .md2 (with animations) and .3DS) are directly loaded in the Java code instead of C, so no script is needed.

Note: With previous version of AR SDK my sample app gives some problems, but with the new version (v0.10) it works perfect in my HTC Desire.

With ImageTargets as starting point, I import the min3d framework to my Android project and then I merge some Java classes that were in both framewoks/SDKs.
- QCARSampleActivity (from AR SDK) and RendererActivity (from min3d) are now a single class for me.
- Then some changes in Renderer.java and Scene.java.

Finally I replace the code from ImageTargets.cpp that calls the OpenGL methods to draw geometry with some matrix update operations and ImageTargets.java inherits from the new class (the result of QCARSampleActivity and RendererActivity) and implements the code to import my md2 file.

Result: When the "chips" trackable is recognized my company logo is shown in motion over the trackable.:)

Therefore, my limitation right now is my poor knowledge of Blender.

hi martarodriguez ,
for my project i am doing an app with qcar...it is very interesting to see that what you are doing with min3d...can i get some code?

thanks in advance

Re: Rendering engine to use with QCAR.

March 17, 2012 - 8:10am #41

Hi,

anyone still have that source code? My address is pban.dev at gmail dot com I could really use it.. I'm horrible at c++/opengl. Thanks!

Re: Rendering engine to use with QCAR.

January 30, 2012 - 3:30am #40

I think the people here know that Unity 3D exists. Unity 3D also has its limits. Especially in terms of integration of an existing app in Eclipse.

Re: Rendering engine to use with QCAR.

January 29, 2012 - 8:31pm #39

Amazing.
A four page thread about "Rendering engine to use with QCAR" and nobody mentions the Unity3d game engine. QCAR officially supports this, and it is very easy to use. Any newbie to OpenGL shouldn't even bother not to use Unity3d. It is a waste of time and effort trying to re-invent the wheel.

Re: Rendering engine to use with QCAR.

January 20, 2012 - 6:15am #38

Hello recastrodiaz,
Could you resolve the min3d issue? QCAR is changing some OpenGL states I think.
Can you post your min3d example to public? I am interested in min3d to use it as renderer with QCAR.

Re: Rendering engine to use with QCAR.

November 21, 2011 - 12:43am #37

nobody? :(

Re: Rendering engine to use with QCAR.

November 18, 2011 - 5:27am #36

Hey!

Can anyone please send me the imagetarget-example code with min3d? I'll be very grateful :)!

My email is oliverebert1googlemail.com

Thank you, Oli

Re: Rendering engine to use with QCAR.

July 5, 2011 - 9:56am #35

I've been trying to use Min3d with QCAR, but I'm stuck when trying to display the camera background and a 3D object ( the 3d car from the min3d example).

To accomplish this task, I've created a new Android project based on the sources of ImageTargets, I then removed all opengl code from the .cpp files and replaced some code in Render.java from the Ming3D source. The relevant lines I changed are the following :

        // Render.java
        /** Called to draw the current frame. */
  	@Override
	public void onDrawFrame(GL10 gl)
	{
		// Update 'model'
		_scene.update();
		
		// Update 'view'
		drawSetup();
		
		HomeActivity.renderInstanceBeginHelper();		
		drawScene();
                HomeActivity.renderInstanceEndHelper();

		if (_logFps) doFps();

	}

        // HomeActivity.java ( instead of ImageTargets.java )
        /** The native render function. */    
	private static native void renderInstanceBegin();
	private static native void renderInstanceEnd();
	
	public static void renderInstanceBeginHelper()
	{
		renderInstanceBegin();
                // this calls currentState = QCAR::Renderer::getInstance().begin();
	}

	public static void renderInstanceEndHelper()
	{
		renderInstanceEnd();
                // this calls QCAR::Renderer::getInstance().end();
	}

The problem is that the render image gets corrupted after the camera tries to draw on screen, and so the 3d object I want to display is not properly shown. The first time onDrawFrame is called, the whole car is correctly seen. the second time it is called, it seems the camera wants to display something in the background and the car is seen from a wrong perspective and the next calls, there is no more camera background and the car is still and seen like in 2D.



If I comment the line drawScene(); the backgound gets what the camera sees. If I comment the lines renderInstanceBeginHelper() and renderInstanceEndHelper() We can see the camaro turn in 3D as in the Min3d example, but without the camera background.

I'm wondering if the opengl state gets corrupted when calling renderInstanceBeginHelper() and so Ming3D won't properly work after that. Has anyone faced this problem ? Or do you have a hint on how to save the opengl state between calls of qcar and min3d ?

Re: Rendering engine to use with QCAR.

June 12, 2011 - 11:10am #34

I would also love to see how this project was accomplished.
It sounds like some excellent work done by all involved.

My email is lmac34hotmail.com

Thanks in advance
Best Regards,
lmac

Re: Rendering engine to use with QCAR.

June 3, 2011 - 5:42am #33

please send me the code to lucsilverberg[at]gmail[dot]com...i will like this project..thanks..

Re: Rendering engine to use with QCAR.

June 1, 2011 - 8:55am #32

Hi, I'm also really interested in the min3d solution and perhaps an example of how to integrate it with QCAR?
My email is james at morley-web dot co dot uk.
Thanks, James

Re: Rendering engine to use with QCAR.

May 27, 2011 - 5:08pm #31

hey

Is the min3d solution still available? was hoping to use it as part of my university project.

can contact me on totalaj15 at hotmail dot com

thanks

Re: Rendering engine to use with QCAR.

May 12, 2011 - 4:19pm #30

hi all!

is it possible for someone to send me the code mentioned before??
mail is petar.ducicfer.hr

thank you very much!!

Re: Rendering engine to use with QCAR.

April 8, 2011 - 7:05am #29

Hi,
can anyone please send me the code?
thanks you very much!!!
my email is ddfire gmail dot com
thanks!!!

Re: Rendering engine to use with QCAR.

February 14, 2011 - 4:06am #28

Hi all,

The file is to big to upload it to the forum, so if any one wants it send me an email and I will share it.

Regards,

Marta Rodriguez

Re: Rendering engine to use with QCAR.

February 2, 2011 - 9:03am #27
martarodriguez wrote:

Finally, with Kim's help I make it to work :D. So, it is possible to use min3d framework with AR SDK.
Thus, the files exported from Blender (.obj, .md2 (with animations) and .3DS) are directly loaded in the Java code instead of C, so no script is needed.

Note: With previous version of AR SDK my sample app gives some problems, but with the new version (v0.10) it works perfect in my HTC Desire.

With ImageTargets as starting point, I import the min3d framework to my Android project and then I merge some Java classes that were in both framewoks/SDKs.
- QCARSampleActivity (from AR SDK) and RendererActivity (from min3d) are now a single class for me.
- Then some changes in Renderer.java and Scene.java.

Finally I replace the code from ImageTargets.cpp that calls the OpenGL methods to draw geometry with some matrix update operations and ImageTargets.java inherits from the new class (the result of QCARSampleActivity and RendererActivity) and implements the code to import my md2 file.

Result: When the "chips" trackable is recognized my company logo is shown in motion over the trackable.:)

Therefore, my limitation right now is my poor knowledge of Blender.

Do you want to share your source code with us?

Re: Rendering engine to use with QCAR.

January 10, 2011 - 2:37am #26

Hi Marta, i'm really happy to now about another 3d engine/framework compatible with QCAR. Few months ago I tested JPCT-AE (http://www.jpct.net/jpct-ae/) java 3D engine with QCAR and I positioned complex 3D scene on top of "chips" imagemarker. The problem was the low frame rate, I had to create 2 glsurfaces, the original glsurface on imagetarget sample (to render the camera), and another one to render my scene with jpct-ae. At the end of the day i had a poor frame rate handled by 2 rendering threads trying to have priority on the processor.
Could you please tell me about the performance of your implementation? and if you found a way to merge qcar with min3D, not using various glsurfaces, could you explain in more detail how you did it?
definately min3d could be my solution... :-D

Thank you!
Paula.

PD: mi email es

, por si te interesa que pongamos nuestra experiencia en común con los motores 3d y qcar! ;)

Re: Rendering engine to use with QCAR.

January 10, 2011 - 2:34am #25

Hi Marta, i'm really happy to now about another 3d engine/framework compatible with QCAR. Few months ago I tested JPCT-AE (http://www.jpct.net/jpct-ae/) java 3D engine with QCAR and I positioned complex 3D scene on top of "chips" imagemarker. The problem was the low frame rate, I had to create 2 glsurfaces, the original glsurface on imagetarget sample (to render the camera), and another one to render my scene with jpct-ae. At the end of the day i had a poor frame rate handled by 2 rendering threads trying to have priority on the processor.
Could you please tell me about the performance of your implementation? and if you found a way to merge qcar with min3D, not using various glsurfaces, could you explain in more detail how you did it?
definately min3d could be my solution... :-D

Thank you!
Paula.

Re: Rendering engine to use with QCAR.

January 4, 2011 - 3:26am #24

Finally, with Kim's help I make it to work :D. So, it is possible to use min3d framework with AR SDK.
Thus, the files exported from Blender (.obj, .md2 (with animations) and .3DS) are directly loaded in the Java code instead of C, so no script is needed.

Note: With previous version of AR SDK my sample app gives some problems, but with the new version (v0.10) it works perfect in my HTC Desire.

With ImageTargets as starting point, I import the min3d framework to my Android project and then I merge some Java classes that were in both framewoks/SDKs.
- QCARSampleActivity (from AR SDK) and RendererActivity (from min3d) are now a single class for me.
- Then some changes in Renderer.java and Scene.java.

Finally I replace the code from ImageTargets.cpp that calls the OpenGL methods to draw geometry with some matrix update operations and ImageTargets.java inherits from the new class (the result of QCARSampleActivity and RendererActivity) and implements the code to import my md2 file.

Result: When the "chips" trackable is recognized my company logo is shown in motion over the trackable.:)

Therefore, my limitation right now is my poor knowledge of Blender.

Re: Rendering engine to use with QCAR.

December 16, 2010 - 6:41am #23

This is exciting, I'd love to see this work. It sounds like there is an issue with the merging of the two Activities. QCAR wants to be responsible for creating the OpenGL context, perhaps there is a conflict there. Or it might also be a problem with initialization. QCAR's initialization procedure is asynchronous, so perhaps it isn't matching up well with min3d's initialization process.

Would it be possible to send your work-in-progess to me at

? I can take a look, and we can report back here with our findings :)

Thanks!

- Kim

Re: Rendering engine to use with QCAR.

December 16, 2010 - 3:18am #22

I'm back. Now with a new target.
I have found googling a Android library "min3d" to load .obj files directly, without parsing. It only uses Java.
I have done some tests and it works great, further you can load animations with md2 files.
So, is it possible to use QCAR with this library? I mean, use QCAR to detect the trackable and then send a message to Java and Java will draw the geometry with min3d.

I have created a new project with Image Targets and Shared (both in one project) and included the library min3d. My problem is that both libraries (QCAR and min3d) have a class that inherits from Activity, but only I need one, so I did that QCARSampleActivity inherits from RendererActivity class from min3d.

I execute the project and I see the geometry drawn by min3d but not the camera view.
Any help will be aprecciated (I know that it's a bit difficult to understand the problem).

Thanks in advanced,

Re: Rendering engine to use with QCAR.

December 2, 2010 - 12:15am #21

Finally, with Kims help I get it to work. It works great in HTC Desire.

[B" />Initial target[/B" />: Replace teapot in ImagetTargets project with my own geometry for "chips" target.

Starting from ImageTargets changes I did:
[=1" />
[*" />Design geometry in blender (without textures)
[*" />Convert blender geometry to OPENGL arrays with this script
[*" />Set USE_OPENGL_ES_1_1 to true in the Android.mk file (in the jni folder). I only use OPENGL ES 1.1 version.
[*" />Change the size of the target in the config.xml file (in the assets folder).
[*" />Change the near/far values of the projection matrix to work with the new target size.
[*" />Disable GL_TEXTURE_2D
[*" />Added a light to test out the normals.
[/LIST" />

Regards[/list]

Re: Rendering engine to use with QCAR.

December 1, 2010 - 3:31pm #20

When you draw an object in OpenGL, you start with a list of vertices (points in 3D space). You may also have a list of normals, used for lighting, and a list of texture coordinates, used for mapping a texture on the object. These three lists can then be used to render the object in two basic ways:

1) Using glDrawArrays. This will draw primitives (typically triangles) in the order they appear in the lists.

2) Using glDrawElements. This takes an additional array of indices, which points into your other lists to draw the primitives.

Your model format will either contain indices or not, which should tell you which method to use. Read up on glDrawArrays and glDrawElements for more info.

- Kim

Re: Rendering engine to use with QCAR.

December 1, 2010 - 10:50am #19

Kim.

Are you saying that we need indices to draw an object with a texture?

Sorry, I don't understand what is the relation between glDrawElements, indices and texture coordinates.

Thanks.

Re: Rendering engine to use with QCAR.

November 30, 2010 - 6:20am #18

Ok. Thanks, I will try.

Re: Rendering engine to use with QCAR.

November 30, 2010 - 6:11am #17

You are correct that if you don't have indices you need to use glDrawArrays instead of glDrawElements. The problem is that you are working with the OpenGL ES 2.0 code, which depends on shaders, and those shaders are expecting texture coordinates right now. Have you changed the shaders in samples/Shared/jni/CubeShaders.h to render with a solid color rather than looking up a texture color?

It might be easier to start with the OpenGL ES 1.1 code, which doesn't depend on shaders. In the ImageTargets project, you would work with the code surrounded by #ifdef USE_OPENGL_ES_1_1. You will need to open the ImageTargets/jni/Android.mk file and set the USE_OPENGL_ES_1_1 flag to true. Now you can safely comment out the texture lines, and you could apply a color using glColor4f instead.

If you are still having trouble, feel free to send me your model file and I will try it on my end.

- Kim

Re: Rendering engine to use with QCAR.

November 30, 2010 - 3:26am #16

Please tell me if you get it works with the script of the link.

I will continue desesperating.

Thanks,

Marta

Re: Rendering engine to use with QCAR.

November 30, 2010 - 2:46am #15

Sorry, I've not worked with 3D objects for a while now.
I'm sure you could calculate the indices yourself and manually type them out?
When I was doing 3D graphics we did everything manually. It took forever but you got the exact results you were wanting.

Thanks for the link.

Rob.

Re: Rendering engine to use with QCAR.

November 30, 2010 - 1:35am #14

Of course.
http://heikobehrens.net/2009/08/27/obj2opengl/

It was developed for iPhone but I think it doesn't matter.

Can you help me with my problem?

Thanks!

Marta

Re: Rendering engine to use with QCAR.

November 30, 2010 - 1:21am #13

Could you share with us the name of the script you found to parse the obj file? Or a link would be great.

Thanks.
Rob.

Re: Rendering engine to use with QCAR.

November 30, 2010 - 12:27am #12

Hi,

Finally, I have exported a .obj file from blender (where I designed my 3D object) and I have found in Internet a script that parses the obj file.

Now I have a header file with two arrays: vertex and normals.
However, it doesn't work. :confused:
I started with ImageTargets and after some changes here is my code.

...

glVertexAttribPointer(vertexHandle, 3, GL_FLOAT, GL_FALSE, 0, (const GLvoid*) &akting2Verts[0]);
glVertexAttribPointer(normalHandle, 3, GL_FLOAT, GL_FALSE, 0, (const GLvoid*) &akting2Normals[0]);
			
glEnableVertexAttribArray(vertexHandle);
glEnableVertexAttribArray(normalHandle);
			
glDrawArrays(GL_TRIANGLES, 0, akting2NumVerts);

...

I can't use "glDrawElements" because I haven't got indices. How can I get it works?

Thanks in advanced,

Marta

Re: Rendering engine to use with QCAR.

November 29, 2010 - 6:35am #11

You should be able to open the .x file in a text editor and pull out the appropriate arrays. If you can send the .x file to

, I'll take a look and let you know what data to copy out of the file.

- Kim

Re: Rendering engine to use with QCAR.

November 29, 2010 - 5:48am #10

Hi all,

I have exported a .x file with Deep Exploration, but now I don't now how to get the coordinates. I need vertices, normals, texCoords and indices as is in teapot.h file.
Can someone explain me how to get the information from the .x file?

Thanks in advanced,

Marta

Log in or register to post comments