"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

Really strange problem with textures

Hello, I have a really strange problem with textures. I using image markers to attach my 3d scene, and sometimes, the last object that I render have mixed their texture with the image of the video background!!!. I don't understand this behavior. The problem is fixed when I turn off - turn on the screen (is executed the onPause() method). Can someone explain this behavior???

Thanks in advanced:

elFerZur

AlessandroB

Wed, 11/21/2012 - 15:03

Hi,

it looks like there is some issue with the OpenGL texture binding (as the QCAR background also is a texture);

could you post the relevant code snippet of your _renderFrame() method ?

 

My render code is not on "C++" code, I rendering the objects from java code. I recopile the code and I will send you.

You can view the problem if you install the android application at https://play.google.com/store/apps/details?id=com.modela3d

Problem occurs when:

Hi, I make the changes, but nothing is changed, it still not works fine.

I'm using opengl 1.1, maybe I must include glClientActiveTexture sentences?.

¿Why the only object that mixing their texture with background is the last that it render?. I don't understand this....

AlessandroB

Thu, 11/22/2012 - 10:04

How many objects do you render from Java ? if you reduce the number of objects rendered (e.g. only render the first 3 and skip the rest, or so),

do you still see the problem (and always ont he last one) ?

AlessandroB

Thu, 11/22/2012 - 13:09

Yeah, that's really weird; I see that you use a special Java API there; is that your own API or does it come from an external library ?

My guess is that there is some issu/bug in the way that custom/external API handles the OpenGL state;

One question, my textureId's always start at number 1. If background paint happens first at every frame, why my textureId not start with 2???. TextureId number 1 must be the background quad texture???. How is binding the background texture ?

AlessandroB

Thu, 11/22/2012 - 16:24

This is probably due to the fact that the video background texture is laily initialized and probably it gets created AFTER your application textures are created;

so for instance your textures will get IDs 1,2,3,4,5  and the background will get texture ID = 6.

I really do not understand this behavior, the texture that is next to the background texture is mixing, and only when the number of textures is even.

AlessandroB

Fri, 11/23/2012 - 15:08

What looks suspicious in your Java code is also the shadow / reflection rendering; those features certianly use texturing in some ways (probably on multiple texture units) and might as well cause some troubles; have you tried rendering the objects with no shadows/reflection enabled ?

Hi, currently I not using refection in AR View, only shadows is showing, and I not use multiple texture units in my code. Shadows are painting rendering the objects triangles another time applying proyection matrix and without textures.

AlessandroB

Mon, 11/26/2012 - 18:17

I see.

Good that you can at least solve it with the "extra object" trick; did you try this on different devices ? I'm wondering if this is maybe an OpenGL driver bug on some phones, as it sounds really strange.

AlessandroB

Mon, 12/03/2012 - 11:45

If I understand, you have succesfully submitted you App, but nobody answered to you yet with feedback;

or did you get any error/problem during the submission itself..?

 

AlessandroB

Tue, 12/04/2012 - 08:54

Hi, I verified that your App submission has been received; there is no issue with that, you App is listed for review, but this may take some time, as there are many other submissions under review as well.

When we have some news, you will be notified, don't worry.

 

masonhsiung

Thu, 12/13/2012 - 13:50

Hi, I found this texture issue is kind of similar to mine, and it also happens on my Samsung Galaxy S2.

If I try to render video on the texture with SurfaceTexture(java), the SurfaceTexture failed to updateTexImage ( if I catch the exception, the video plays upside down).