Log in or register to post comments

how to convert .obj to .h

May 23, 2012 - 2:03am #1

i try "https://github.com/HBehrens/obj2opengl/blob/master/obj2opengl.pl" to convert .obj to .h but i don't know how to use
have a detail steps to know how to convert .obj to .h?

how to convert .obj to .h

April 7, 2017 - 2:58am #17

Hi All,

 

I'me using the banana.h example,  where i/m importing the file.

then I have replace:

         glDrawElements(GL_TRIANGLES, NUM_TEAPOT_OBJECT_INDEX, GL_UNSIGNED_SHORT, (const GLvoid*)teapotIndices);

by

glDrawArrays(GL_TRIANGLES, 0, bananaNumVerts);

and

            glVertexAttribPointer(vertexHandle, 3, GL_FLOAT, GL_FALSE, 0, (const GLvoid*)teapotVertices);

            glVertexAttribPointer(normalHandle, 3, GL_FLOAT, GL_FALSE, 0, (const GLvoid*)teapotNormals);

           glVertexAttribPointer(textureCoordHandle, 2, GL_FLOAT, GL_FALSE, 0, (const GLvoid*)teapotTexCoords);

by

            glVertexPointer(3, GL_FLOAT, 0, bananaVerts);

            glNormalPointer(GL_FLOAT, 0, bananaNormals);

            glTexCoordPointer(2, GL_FLOAT, 0, bananaTexCoords);

when my camera start and i pass over a marker, the App quite:



i'm having a ' Thread 1: EXC_BAD_ACCESS (code-1, address=0x0) for that line glDrawArrays(GL_TRIANGLES, 0, bananaNumVerts);

Do you know how can this be fixed ? it is for ios ... 



Thanks a lot for your help guys !

how to convert .obj to .h

March 25, 2013 - 10:17am #16

Great ! You're welcome.

how to convert .obj to .h

March 25, 2013 - 10:11am #15

Thx a lot..now is converted 

 

:D

how to convert .obj to .h

March 25, 2013 - 1:08am #14

AKAIK, once you have installed Perl, the only thing you need to do is to put the .OBJ file in the same directory as the obj2opengl.pl script...

 

how to convert .obj to .h

March 24, 2013 - 8:15pm #13

is there a another setting after download activepearl??...

obj2opengl.pl and myobject.obj is must puted in folder bin..in pearl??

I dont understand clearly..im first in pearl

im using win 8

 

sorry  bothered you..:D

how to convert .obj to .h

March 24, 2013 - 10:22am #12

hi, the first part of the message ("Maybe you just moit the defined...") is expected, as I also observed it in certain cases, but that's just a warning which normally should not prevent you from creating the .h file from the .obj successfully;

so, not sure what goes wrong in your case;

also note that sometimes on Windows a dialog may popup asking you for confirmation before continuing... it could be that the dialog is popped up also in your case but you don't see it as it remains hidden but some other window....

if you don't sort it out, maybe you also want to contact the author of the obj2opengl.pl script for advise...

 

how to convert .obj to .h

March 24, 2013 - 3:37am #11

AlessandroB wrote:

yes, you can download perl from that site

the result like this:  

how to convert .obj to .h

March 24, 2013 - 2:03am #10

yes, you can download perl from that site

how to convert .obj to .h

March 24, 2013 - 1:44am #9

its required perl...ini this link http://www.activestate.com/activeperl/downloads??

 

when i using cmd (windows)  : obj2opengl.pl  mymodel.obj

appeared script obj2openg in notepad

how to convert .obj to .h

March 20, 2013 - 8:35am #8

Hi alhammadi_am,

if you are working on Windows, you can open a cmd console, then you need to cd to the directory where your OBJ file is located and type (assuming that your model is called for instance "mymodel.obj"):

obj2opengl.pl  mymodel.obj

how to convert .obj to .h

March 20, 2013 - 6:21am #7

Hello everyone,

I'm new to vuforia, I installed Perl and obj2openlg.pl .. then I don't know what exactly I should do to convert from obj file to header file.

first of all, which command line I should use?

and What are the commands I should write to do the conversion?

how to convert .obj to .h

August 18, 2012 - 3:04am #6

I am able to create .h files like you say but these files are coming of sizes 230mb while my .obj file is about 30 mb.

Re: how to convert .obj to .h

May 29, 2012 - 10:10pm #5

thanks tarun31,rorlich
i successed!

Re: how to convert .obj to .h

May 28, 2012 - 11:12am #4

go to this link:
http://heikobehrens.net/2009/08/27/obj2opengl/

download the obj2opengl.zip file and extract it and put the .pl file in the bin folder of the Perl folder.Then navigate to the bin folder using command prompt and type obj2opengl.pl thenameofyourobject.obj this will create your .h file.

Re: how to convert .obj to .h

May 28, 2012 - 1:29am #3

i install Perl but i don't know others i should download
i want to know cmd what should i type
and i should how to covert 3DModel .obj to .h

please give me something to work

Re: how to convert .obj to .h

May 24, 2012 - 1:48am #2

Download Perl
after installation go to cmd where the the *.pl script is located and write
obj2opengl.pl your_object.obj
and that's it

Log in or register to post comments