"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

Normal, Texture, and Index

Hello, I'm using Blender to make my 3D models and exporting them as .obj files. Then, I'm using the .pl code given [URL=http://heikobehrens.net/2009/08/27/obj2opengl/]here[/URL] to convert the .obj to a .h, but when I do, all I get is the objectVerts array. I'm missing all the other ones. I tried commenting out the lines for the normal array and texture array in the ImageTargets.cpp but the cube would come out missing bits and pieces. I tried using the cube that is given to us in the zip file that only has the verts and normal and this one comes out fine, albeit in pure black. So, question is, why am I missing the normal and texture arrays on my .h file when I convert it through the .pl code. Am I forgetting to do something in Blender to get the normals or is there anything else? I've read this [URL=https://ar.qualcomm.at/arforums/showthread.php?t=302&highlight=normal]thread[/URL] but there doesn't seem to be anything on how to obtain the missing arrays.

We don't provide support for external scripts. That said, you should be able to open your .obj file with a text editor and make sure the texcoords and normals are in there.

praetoriax

Thu, 12/22/2011 - 06:48

Hello. Check your export options in Blender. When exporting the model in Blender at the left side in "Export OBJ" section must be checked: Apply Modifiers, Edges, Normals, UVs, Triangulate, Keep Vertex Order, Objects as OBJ Objects. Something like that.

Thanks praetoriax, I found the check marks on in blender and those gave me the necessary arrays. Another question though, what size should my models be in blender for them to match the teapots with out having to change the kObjectScale.

Hi, @Natzely The size which your model will be rendered depends on the trackable size and the model size itself. When you create your trackable, you need to define a size for it (e.g. in centimeters or inches). Then you need to use the same measurement unit on Blender.

Thanks Infaust, I found the option to change the up and forward directions on Blender before you export it to a .obj file. The rotation is perfect now. But the size doesn't seem to be doing anything.

Hi Natzely, This size problem sounds strange to me... Looking in the config.xml of the default trackables, the size of the "stones" tracker is 270. I did never used that script to convert .obj to .h, but could it be the cause of your problem? You can look at the vertices value inside the .obj AND .

Is there a modeling program that would be better to use other than Blender for this? What software was used to make the teapot and the dominoes cube?