Creating meshes for Vuforia (Java)
java, opengl-es, vuforia
Solution
Well, fear not. You don't have to code from scratch to make a mesh. Instead, you can use Blender/Maya/Unity to create your mesh, using artistic tools. With this, you can export this object into a .obj or .h file.
Although the .obj exporter is inbuilt, the .h exporter isn't. But on the bright side, Vuforia has an exporter for this.
From your question, its clear that you want to code in java and hence you need a .java mesh, but it will be easier to just import the .h and use the NDK to code.
This is because there is no direct export to .java type, and hence if you need to code in Java you will have to move the data manually from the .h file. The teapot.java class is just a wrapper around the buffer data that OpenGL ES 2.0 needs to reconstruct a 3D model. It has the arrays and vertices, textures coords, normals, and indices.
Since the .h file includes this information you could copy the buffer data manually into a .java class similar to teapot.java.
Check out this FAQ as well: https://developer.vuforia.com/forum/faq/technical-what-3d-model-formats-does-vuforia-support
Hope this helps.
Problem
Just today I started learning Vuforia. I am looking at the Image Targets code and see that it pulls from `com.qualcomm.vuforia.samples.SampleApplication.utils.Teapot` to display the teapot. and Teapot.java has: ``` public Teapot() { setVerts(); // has verticies setTexCoords(); // coordinates setNorms(); // normals setIndices(); // and indices } private void setVerts() { double[] TEAPOT_VERTS = { 11.222200, 0.110300, 20.030291, 10.302300, -4.461498, 20.030291, 10.152300, -4.397198, 20.644890, 11.059500, 0.110900, 20.644890, 11.059500, ... } ``` I do not have any experience in OpenGL and I would like to know how to create my own model/mesh to replace the teapot. I created a simple box in Blender but I don't have a good way to export this to a java file which has verts, normals, etc. Most of the stuff is for iPhone and how to create .h files. What I am looking for is either an explanation of verts, coords, norms and indices or a systematic way to create an object in another program and be able to export it for use in Vuforia.