"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

The Banana... that sodding banana!

Hi guys, I am trying to display the banana model. I have imported the model and changed the code relevant code to: [PHP] glVertexPointer(3, GL_FLOAT, 0, bananaVerts); glNormalPointer(GL_FLOAT, 0, bananaNormals); glTexCoordPointer(2, GL_FLOAT, 0, bananaTexCoords); glDrawArrays(GL_TRIANGLES, 0, bananaNumVerts); [/PHP] I have change the texture so banana.jpg. When I do my image recognition I see just crazy flashes of yellow, it's displaying [I]something[/I] but it's sure as hell not a banana. Any ideas?

garyriches

Tue, 11/22/2011 - 16:01

Ok, so I managed to display the banana using: [PHP" /> glVertexAttribPointer(vertexHandle, 3, GL_FLOAT, GL_FALSE, 0, (const GLvoid*) &bananaVerts[0" />); glVertexAttribPointer(normalHandle, 3, GL_FLOAT, GL_FALSE, 0, (const GLvoid*) &bananaNormals[0" />); glVertexAttribPoi

garyriches

Wed, 11/23/2011 - 13:38

Thanks I tried that and whilst the opposite half looked better the other half (that used to look ok-ish) looked worse. I have also loaded a 3d castle model and the texture doesn't seem to it correctly on that either. It's a flat texture, 1024 x 1024.

garyriches

Thu, 11/24/2011 - 10:30

Thanks MoSR, having broken down the texture in to coloured quads everything seems to be ok. I had already flipped the banana skin and it didn't look perfect. I then tried loading my castle model and flipped that texture and low and behold...

Hi, garyriches:) I have a same problem with you like a banana. So I just use one colored texture. How to do the mapping of the castle, it's awesome for me. Can you give me a hint, plz~

garyriches

Thu, 11/24/2011 - 12:58

As I said. Once I had the banana showing I tried to load my castle model. The texture was incorrect but was fixed by flipping the texture vertically.

I don't know if this will help you guys, but I resized my texture to 256x256 and it worked perfectly, the dimensions probably need to be multiple of 2, like: 32x32, 64x64, 128x128... I'm just guessing, can anyone confirm it?

pedromujica

Mon, 01/09/2012 - 23:32

HI, Please, can you send me the castle .obj and its flat texture .jpg to test my app. My email is [email]creative@mudska.com[/email]. Thanks in advance. :)