Log in or register to post comments

Convert .OBJ to my own .java MeshObject

May 6, 2014 - 1:09pm #1

Hi, 

I have my own .obj file and texture to display my own model instead of Teapot. I need to convert this .obj file to my own .java file just like teapot.java(MeshObject).

Is there any software that is used to make different models(.java files) like teapot, CylinderModel and BowlandSpoon models? What is required to retrieve indices, vertices, normals and texturecoordinates from an .obj file that I can use just like Teapot model. 

I used objtoopengl script that generated .h file from .obj file. But the converted .h file does not have indices. So I can not use it like the models used in samples.

 

Any kind of help will be appreciated.

Many thanks,

Munazza

Convert .OBJ to my own .java MeshObject

January 17, 2018 - 10:52am #16

How you resolved that, i need to do the same. Please help me.

 

Convert .OBJ to my own .java MeshObject

October 6, 2017 - 2:19am #15

Hi,

If you have got the solution , please send me the steps for this problem please.Thanks in advance.

yashaswini060294@gmail.com

Convert .OBJ to my own .java MeshObject

September 24, 2017 - 2:36pm #14

you can use a 3rd party renderer that get the coordinates from vuforia and render the .obj object and lie it on the given position, there are many tools for rendering .obj or antother 3D extentions like Rajawali and JME.

Convert .OBJ to my own .java MeshObject

August 23, 2017 - 9:50am #13

hey i have a problem that the .h file is too large .. do you have any idea how to solve that ? 

Convert .OBJ to my own .java MeshObject

August 1, 2017 - 6:08am #12

Hello,

Have you solve the construction of the .java (MeshObject) from an .obj?

I have the same problem and I could´t find anything of this in the vuforia tutorials.

 

Thanks!

Convert .OBJ to my own .java MeshObject

April 13, 2017 - 3:54am #11

 

Hi, 

I have my own .obj file and texture to display my own model instead of Teapot. I need to convert this .obj file to my own .java file just like teapot.java(MeshObject).

Is there any software that is used to make different models(.java files) like teapot, CylinderModel and BowlandSpoon models? What is required to retrieve indices, vertices, normals and texturecoordinates from an .obj file that I can use just like Teapot model. 

I used objtoopengl script that generated .h file from .obj file. But the converted .h file does not have indices. So I can not use it like the models used in samples.

 

Any kind of help will be appreciated.

Many thanks,

 

Convert .OBJ to my own .java MeshObject

March 24, 2015 - 11:49pm #10

hello ,are you solve this problem ?

please help me 

Convert .OBJ to my own .java MeshObject

March 12, 2015 - 11:53pm #9

If your .h file does not have indices, then replace this line

glDrawElements(GL_TRIANGLES, NUM_TEAPOT_OBJECT_INDEX, GL_UNSIGNED_SHORT, 
                     (const GLvoid*) &teapotIndices[0]);

with 

glDrawArrays(GL_TRIANGLES, 0, numVertices);

 
If after this your object still not visivle, then try to increase "model scale values"  (kObjectScale/kObjectScaleNormal)
e.g. for ImageTargets in ImageTargetsEAGLView.mm file

    const float kObjectScaleNormal = ...;

    const float kObjectScaleOffTargetTracking = ...;

 

Convert .OBJ to my own .java MeshObject

December 22, 2014 - 7:28am #8

I have been trying to figure out how to build the Vuforia NDK sample, but all the documentation is geared towards Eclipse, which I do not use (and a lot of other people also use Android Studio like myself these days)

So I have imported the sample project into Android Studio, but there is no documentation on how to make it work, as I get errors due to some librarys etc not being linked properly.

The official documentation is shockingly bad and really needs updating to help people use Android Studio.

Convert .OBJ to my own .java MeshObject

December 22, 2014 - 7:11am #7

pabmeister if you need to use .h file in your java project you need use jni(Java native interface) SDK. that you can download here https://developer.android.com/tools/sdk/ndk/index.html and i strongly advice you to build your project on top vuforia jni sample. tha's how i solved my problem. Or alternatively you like alexandroB said "Bacially it's a matter of reading out the vertex coordinates from your OBJ file or from your .h header file and feeding them as  a vertex array in OpenGL."  here it is all up to you how you will read the coordinates you can even read them from a text file at runtime (i tried and it worked but i didnt like because it was slow) 

Good Luck!!!!!

Convert .OBJ to my own .java MeshObject

December 22, 2014 - 5:55am #6

The problem is Alessandro, the link you keep posting, is for the NDK (C++) and the OP asked about using the .h data in JAVA.

Please take time to read the users questions, and instead of spamming us with that link, how about you help us work out how to use the C++ .h file in our JAVA projects?

Convert .OBJ to my own .java MeshObject

November 14, 2014 - 6:03am #5

You may want to check this:

https://developer.vuforia.com/resources/dev-guide/replacing-teapot

Bacially it's a matter of reading out the vertex coordinates from your OBJ file or from your .h header file and feeding them as  a vertex array in OpenGL.

 

Convert .OBJ to my own .java MeshObject

November 14, 2014 - 1:40am #4

(同样的问题困扰着我) means The same problem plagued me !!!

Convert .OBJ to my own .java MeshObject

May 28, 2014 - 11:58am #3

hey can you please translate your answer in english?

Convert .OBJ to my own .java MeshObject

May 24, 2014 - 7:32pm #2

同样的问题困扰着我

Log in or register to post comments