Question

I do not know anything in 3D modeling, for that I have person who works with 3D and modeling. I have started to work with Vuforia, and this is just awesome. I am trying to replace the teapot with my own 3D model. I have tried to stansform obj file with

http://www.rendoncepeda.com/home/projects/mtl2opengl/

but I did't got Indices in the new .h file. I dont know that this is and if I need it but in the Teapot.h file it have it. What is the simplest way to replace the teapot? I can ask from my 3D designer to export any format.

Was it helpful?

Solution

Since you do not have Indices,

instead of using this code to draw your object:

glDrawElements(GL_TRIANGLES, NUM_TEAPOT_OBJECT_INDEX, GL_UNSIGNED_SHORT, 
                     (const GLvoid*) &teapotIndices[0]);

use the following code:

glDrawArrays(GL_TRIANGLES, 0, numVertices);

Where numVertices is the number of vertices in your object.

Check here for a more detailed explanation

OTHER TIPS

What is the simplest way to replace the teapot?

Simplest way is using Unity extension. Unity is free and supports mobile platforms. If your scene doesn't have much objects and polygons (I think object culling needs pro version) Unity provides you a WYSWYG editor in realtime. You can find supported file formats here http://docs.unity3d.com/Manual/HOWTO-importObject.html

Good luck on your journey.

You can find your answer at Vuforia developer portal itself. Here is link

App related documents and tutorials

Replacing Teapot.h

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top