- Sort Posts
- 15 replies
- Last post
Convert .obj to .h
Convert .obj to .h
Convert .obj to .h
Convert .obj to .h
Hi khushi,
if you search the Forum, this has been discussed in many threads already;
here is a step-by-step tutorial as well:
https://developer.vuforia.com/resources/dev-guide/replacing-teapot
Convert .obj to .h
hi,
I am new be in xcode dev. Thnnk's for reply, I check out document ,but i dont get how to define my cartoon vertex, Indices like teapotVertices and Indices.
for example:-
static const float teapotVertices[NUM_TEAPOT_OBJECT_VERTEX * 3] =
{
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, 0.110900, 20.644890, 10.152300, -4.397198, 20.644890, 10.326300, -4.471797, 20.849890, 11.248200, 0.110300, 20.849890, 11.248200, 0.110300, 20.849890, 10.326300, -4.471797, 20.849890, 10.679500, -4.623797, 20.644890, 11.632100, 0.108900, 20.644890, 11.069200, -4.791098, 20.030291, 12.054700, 0.107300, 20.030291, 7.811500, -8.153796, 20.030291, 7.696500, -8.037796, 20.644890, 7.696500, -8.037796
}
Convert .obj to .h
You need to use a tool that can convert a 3D model from OBJ file format (which is a popular format for 3D models) to a header file .h;
Convert .obj to .h
Hi, all, correct me if i'm wrong
maybe i have a missing point of understanding "how to convert obj to h"
1. putting all file together in one folder (including obj2opengl.pl file)
ex : C:\perl64\bin\
2. use cmd pointing to the file and call "obj2opengl.pl my_file.obj"
done..
but only notepad opened when i access obj2opengl.pl
and i followed all instruction from : https://developer.vuforia.com/forum/android/how-convert-obj-h
Please heelp me..
thanks,
Convert .obj to .h
Thank You AlessandroB.......
Now it's Working....
Hi, how did you get this working and the issue fixed? Having the same problem but the link posted by AlessandroB is now broken
Cheers,
Si
Convert .obj to .h
Both these links work for me:
https://developer.vuforia.com/forum/android/how-convert-obj-h
http://heikobehrens.net/2009/08/27/obj2opengl/
Convert .obj to .h
I've tried this a few times now, it used to work for me but no longer is. Could this be a Perl version issue?
I have my obj in the same folder as the perl script but when I run it I just get the error attached
Attachment | Size |
---|---|
![]() | 90.36 KB |
Convert .obj to .h
You can ignore that warning message; the tool should still be able to produce the output file (I sometime get the same warning message, but the output .h file is generated).
Also, maybe try running the tool from its own directory (i.e. from the directory where you have installed the obj2opengl script), by copying your obj file into that directory.
If nothing works, maybe try resintalling Perl or contacting the author of the obj2opengl.pl script.
Convert .obj to .h
Thank you for help.
Using your advice I'm still getting the same warning and no .h file is being created. Checked around on the net and there isn't much around on this unfortunately
Hey there, i was having troubles with this yesterday and after some research i finally got it working
First you have to download perl and install it:
http://www.activestate.com/activeperl/downloads
Then i created a folder in C: named "objtoh" where i put both the "obj2opengl.pl" and ".obj" file
so the adress of both files is C:\objtoh\, now all you have to do is open a cmd window and type:
(for my own example)
perl C:\objtoh\obj2opengl.pl C:\objtoh\heart.obj
replace the address and the ".obj" file name with what you have
The attachment shows how it looked for me on the cmd window.
That worked for me, i hope it helps.
Attachment | Size |
---|---|
![]() | 12 KB |
Hi, does that message prevents you from building the .h file ?
if it is just a warning and the header file is generated, you could safely ignore it.
Otherwise, you may want to search the internet, as this is a Perl-specific issue; for instance, here is a thread discussing it:
https://github.com/openwebwork/pg-dev/issues/17