Log in or register to post comments

Convert .obj to .h

February 26, 2013 - 12:43pm #1

Hi,

while creating the .h file i received this lines in cmd

"defined <@array> is deprecated at C:\Perl\bin\obj2opengl.pl line 154

<Maybe you should just omit the defined<>?>"

what it means????????????????/ 

Convert .obj to .h

March 24, 2014 - 9:05am #16

spacemonkey1985 wrote:

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.

AttachmentSize
Image icon cmd.png12 KB

Convert .obj to .h

February 19, 2014 - 5:11am #15

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

Convert .obj to .h

February 19, 2014 - 4:28am #14

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

February 19, 2014 - 4:00am #13

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

AttachmentSize
Image icon perl_warning.jpg90.36 KB

Convert .obj to .h

February 18, 2014 - 7:53am #12

Convert .obj to .h

February 18, 2014 - 7:39am #11

Sabari01 wrote:

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

February 18, 2014 - 7:38am #10

Hi,

 

How did you fix this issue? The link posted is no longer working

 

Cheers,

 

Si

Convert .obj to .h

June 14, 2013 - 6:14am #9

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

March 8, 2013 - 3:10am #8

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;

 

Many users on the forum use the perl script available at this site for turning a .obj file into a header format similar to ours: http://heikobehrens.net/2009/08/27/obj2opengl/
 

Convert .obj to .h

March 8, 2013 - 3:00am #7

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.03029110.302300, -4.461498, 20.03029110.152300, -4.397198, 20.64489011.059500, 0.110900, 20.64489011.059500, 0.110900, 20.64489010.152300, -4.397198, 20.64489010.326300, -4.471797, 20.84989011.248200, 0.110300, 20.84989011.248200, 0.110300, 20.84989010.326300, -4.471797, 20.84989010.679500, -4.623797, 20.64489011.632100, 0.108900, 20.64489011.069200, -4.791098, 20.03029112.054700, 0.107300, 20.0302917.811500, -8.153796, 20.0302917.696500, -8.037796, 20.6448907.696500, -8.037796

}

 

Convert .obj to .h

March 8, 2013 - 12:16am #6

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

March 8, 2013 - 12:04am #5

Hi,

I have a cartoon.obj file. How to convert this .obj file into .h file? For example:- In Image target  teapot.h was created. so i wanna create cartoon.h then what should i do?

 

Thank u

Khushi

Convert .obj to .h

February 27, 2013 - 6:02am #4

Glad to help.

Convert .obj to .h

February 27, 2013 - 5:44am #3

Thank You AlessandroB.......

Now it's Working....

Convert .obj to .h

February 26, 2013 - 1:29pm #2

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

 

Log in or register to post comments