5

I am developing ios app in which i have to show object scanned by Augmented Reality. For this i am using Vuforia ios Sdk for rendering my 3D object model.

But issue is i am not aware of how to load .obj and .mtl extension file in ios sdk for 3d model.

Thanks in advance and appreciate all answers.

Kalpesh Panchasara
  • 1,730
  • 2
  • 15
  • 27
Viral Mithani
  • 313
  • 4
  • 17

1 Answers1

3

Rendering 3D model has nothing to do with Vuforia - you draw what you want, probably with OpenGL. In one of their sample they do demonstrate showing a 3D teapot model on the detected target. If you have your own obj model, convert it to a header file (there are tools for that) in order to have the model values in the proper arrays (vertices, texCoords and normals), like in the example (look at the 'Teapot.h" file). I was using this tool some time ago: obj2opengl

yakobom
  • 2,681
  • 1
  • 25
  • 33
  • Can we directly load 3D model by passing .obj and .mtl file without creating header file because my model is some what complex and when I am creating header file at that time some of coordinates are missing so it shows me error in my XCode, creating header file works fine with simple model only so please suggest me for another option. – Viral Mithani Feb 09 '17 at 15:02
  • Perhaps there is a way to pass obj by using some library, but I do not know of such. Basically, the way is what I wrote - and I can tell you that I have used some script I have found long time ago to convert obj to header and it worked great for a complex model – yakobom Feb 10 '17 at 17:06
  • I added the link for the tool I was using. – yakobom Feb 10 '17 at 17:28
  • Link is not working any more do you have any other suggestions? – Rajesh Koshti May 21 '19 at 18:18