Log in or register to post comments

how to replace 3d object in extended tracking?

November 13, 2014 - 1:27am #1

Hi

I use vuforia in android (java). I want replace building.txt with other 3d object. I have a 3d cube in a .obj file and i want convert it to .txt file.

my .obj file is like this:

# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
# File Created: 11.11.2014 15:15:21
 
#
# object Box001
#
 
v  -25.9754 0.0000 28.7076
v  -25.9754 0.0000 -18.8244
v  24.6450 0.0000 -18.8244
v  24.6450 0.0000 28.7076
v  -25.9754 31.5608 28.7076
v  24.6450 31.5608 28.7076
v  24.6450 31.5608 -18.8244
v  -25.9754 31.5608 -18.8244
# 8 vertices
 
vn 0.0000 -1.0000 -0.0000
vn 0.0000 1.0000 -0.0000
vn 0.0000 0.0000 1.0000
vn 1.0000 0.0000 -0.0000
vn 0.0000 0.0000 -1.0000
vn -1.0000 0.0000 -0.0000
# 6 vertex normals
 
vt 1.0000 0.0000 0.0000
vt 1.0000 1.0000 0.0000
vt 0.0000 1.0000 0.0000
vt 0.0000 0.0000 0.0000
# 4 texture coords
 
g Box001
s 2
f 1/1/1 2/2/1 3/3/1 4/4/1 
s 4
f 5/4/2 6/1/2 7/2/2 8/3/2 
s 8
f 1/4/3 4/1/3 6/2/3 5/3/3 
s 16
f 4/4/4 3/1/4 7/2/4 6/3/4 
s 32
f 3/4/5 2/1/5 8/2/5 7/3/5 
s 64
f 2/4/6 1/1/6 5/2/6 8/3/6 
# 6 polygons
 

and i converted it to .txt file like this:

24
-25.9754
0.0000
28.7076
-25.9754
0.0000
-18.8244
24.6450
0.0000
-18.8244
24.6450
0.0000
28.7076
-25.9754
31.5608
28.7076
24.6450
31.5608
28.7076
24.6450
31.5608
-18.8244
-25.9754
31.5608
-18.8244
18
0.0000
-1.0000
-0.0000
0.0000
1.0000
-0.0000
0.0000
0.0000
1.0000
1.0000
0.0000
-0.0000
0.0000
0.0000
-1.0000
-1.0000
0.0000
-0.0000
12
1.0000
0.0000
0.0000
1.0000
1.0000
0.0000
0.0000
1.0000
0.0000
0.0000
0.0000
0.0000
 
but when i run application, object that is displayed is not a cube .
 
how can I convert .obj file to .txt? We have faces in .obj file but where are they used in .txt file?

 

 

 

Log in or register to post comments