OBJ Export Bug?


#1

OBJ Export is working but the export options do not seem to work. The file format is unchanged regardless of whether you deselect edge or texture export. I would think if you uncheck these the file format should be simplified.


#2

What do you mean by simplified?

Edge export is meant for those rare occasions where you have used single edges to model something like telephone wires or bridge cables. The OBJ format has no such thing as an edge, so this option creates thin face slices to denote them. Most of the time you should uncheck it.

Exporting textures does just that: it creates a folder where it copies the texture image files embedded in your SketchUp model.

Anssi


#3

Here’s an example. Simple 3D solid object. I untick ‘export edges’ and ‘export texture maps’ yet Sketchup creates a .mtl file and the OBJ file looks like this:

Alias OBJ Model File

Exported from SketchUp, © 2000-2012 Trimble Navigation Limited

File units = inches

mtllib BEM.mtl

g Mesh1 Model

usemtl FrontColor
v 41 236 7.75
vt -41 236
vn 4.44089e-017 -6.80056e-018 -1
v 31 170.698 7.75
vt -31 170.698
v 31 236 7.75
vt -31 236
f 1/1/1 2/2/1 3/3/1

v 41 170.698 7.75
vt -41 170.698
f 2/2/1 1/1/1 4/4/1

vt 236 7.75
vn 1 0 0
v 41 170.698 15.5
vt 170.698 15.5
vt 170.698 7.75
f 1/5/2 5/6/2 4/7/2

v 41 236 15.5
vt 236 15.5
f 5/6/2 1/5/2 6/8/2

vt 41 7.75
vn 0 -1 0
v 133 236 15.5
vt 133 15.5
vt 41 15.5
f 1/9/3 7/10/3 6/11/3

v 133 236 7.75
vt 133 7.75
f 7/10/3 1/9/3 8/12/3

vt 31 7.75
f 3/13/3 8/12/3 1/9/3

v 143 236 7.75
vt 143 7.75
f 3/13/3 9/14/3 8/12/3

v 31 236 8.90123e-016
vt 31 8.90123e-016
f 10/15/3 9/14/3 3/13/3

v 143 236 8.90123e-016
vt 143 8.90123e-016
f 9/14/3 10/15/3 11/16/3

vn 0 0 -1
v 174 272 0
vt -174 272
vt -143 236
f 10/3/4 12/17/4 11/18/4

v 0 272 0
vt 0 272
f 10/3/4 13/19/4 12/17/4

v 0 0 0
vt 0 0
f 13/19/4 10/3/4 14/20/4

v 31 170.698 8.90123e-016
f 15/2/4 14/20/4 10/3/4

v 174 0 0
vt -174 0
f 14/20/4 15/2/4 16/21/4

v 143 170.698 2.52128e-015
vt -143 170.698
f 16/21/4 15/2/4 17/22/4

vt -31 7.75
vn 0 1 0
vt -143 2.52128e-015
vt -31 8.90123e-016
f 2/23/5 17/24/5 15/25/5

v 143 170.698 7.75
vt -143 7.75
f 17/24/5 2/23/5 18/26/5

v 133 170.698 7.75
vt -133 7.75
f 18/26/5 2/23/5 19/27/5

vt -41 7.75
f 4/28/5 19/27/5 2/23/5

v 133 170.698 15.5
vt -133 15.5
f 19/27/5 4/28/5 20/29/5

vt -41 15.5
f 20/29/5 4/28/5 5/30/5

vt -133 236
vt -133 170.698
f 5/4/4 7/31/4 20/32/4

f 7/31/4 5/4/4 6/1/4

vt -236 15.5
vn -1 0 0
vt -170.698 7.75
vt -170.698 15.5
f 7/33/6 19/34/6 20/35/6

vt -236 7.75
f 19/34/6 7/33/6 8/36/6

f 9/18/4 19/32/4 8/31/4

f 19/32/4 9/18/4 18/22/4

vt -170.698 2.52128e-015
f 9/36/6 17/37/6 18/34/6

vt -236 8.90123e-016
f 17/37/6 9/36/6 11/38/6

f 11/18/4 12/17/4 17/22/4

f 16/21/4 17/22/4 12/17/4

vt 272 0
v 174 0 80
vt 0 80
f 12/39/2 21/40/2 16/20/2

v 174 272 80
vt 272 80
f 21/40/2 12/39/2 22/41/2

v 0 272 80
vt -174 80
f 12/21/5 23/40/5 22/42/5

f 23/40/5 12/21/5 13/20/5

vt -272 80
vt -272 0
f 14/20/6 23/43/6 13/44/6

v 0 0 80
f 23/43/6 14/20/6 24/40/6

vt 174 80
f 14/20/3 21/45/3 24/40/3

vt 174 0
f 21/45/3 14/20/3 16/46/3

v 162 0 80
vt 162 80
f 24/40/3 21/45/3 25/47/3

vn 0 0 1
v 162 238 80
vt 162 238
vt 162 0
f 21/46/7 26/48/7 25/49/7

vt 174 272
f 22/50/7 26/48/7 21/46/7

v 12 238 80
vt 12 238
f 22/50/7 27/51/7 26/48/7

f 23/19/7 27/51/7 22/50/7

v 12 0 80
vt 12 0
f 23/19/7 28/52/7 27/51/7

f 28/52/7 23/19/7 24/20/7

vt 12 80
f 24/40/3 25/47/3 28/53/3

v 162 0 86
vt 162 86
f 29/54/3 28/53/3 25/47/3

v 12 0 86
vt 12 86
f 28/53/3 29/54/3 30/55/3

v 144 0 86
vt 144 86
f 30/55/3 29/54/3 31/56/3

v 144 238 86
vt 144 238
vt 144 0
f 29/49/7 32/57/7 31/58/7

v 162 238 86
f 32/57/7 29/49/7 33/48/7

vt 0 86
vt 238 80
vt 238 86
f 29/59/2 26/60/2 33/61/2

f 26/60/2 29/59/2 25/40/2

vt -162 80
v 12 238 86
vt -12 86
vt -162 86
f 26/62/5 34/63/5 33/64/5

vt -12 80
f 34/63/5 26/62/5 27/65/5

vt -238 86
vt -238 80
f 28/40/6 34/66/6 27/67/6

f 34/66/6 28/40/6 30/59/6

v 30 0 86
vt 30 0
f 35/68/7 34/51/7 30/52/7

v 30 238 86
vt 30 238
f 34/51/7 35/68/7 36/69/7

v 30 238 92
vt -238 92
f 35/59/6 37/70/6 36/66/6

v 30 0 92
vt 0 92
f 37/70/6 35/59/6 38/71/6

vt 30 86
v 144 0 92
vt 144 92
vt 30 92
f 35/72/3 39/73/3 38/74/3

f 39/73/3 35/72/3 31/56/3

f 30/55/3 31/56/3 35/72/3

f 32/61/2 39/71/2 31/59/2

v 144 238 92
vt 238 92
f 39/71/2 32/61/2 40/75/2

vt -144 86
vt -30 92
vt -144 92
f 32/76/5 37/77/5 40/78/5

vt -30 86
f 37/77/5 32/76/5 36/79/5

f 33/64/5 36/79/5 32/76/5

f 33/64/5 34/63/5 36/79/5

f 37/69/7 39/58/7 40/57/7

f 39/58/7 37/69/7 38/68/7

vt 236 8.90123e-016
vt 170.698 8.90123e-016
f 10/80/2 2/7/2 15/81/2

f 2/7/2 10/80/2 3/5/2


#4

I still really don’t understand what you are expecting to find there.
Yes, the exporter always exports the materials but not the texture maps if you choose not to.

This is a simple cube I exported:

# Alias OBJ Model File
# Exported from SketchUp, (c) 2000-2012 Trimble Navigation Limited
# File units = millimeters

mtllib testi.mtl

g Mesh1 Model

usemtl FrontColor
v 0 0 0
vt 0 0
vn 0 0 -1
v 0 1000 0
vt 0 39.3701
v 1000 1000 0
vt -39.3701 39.3701
v 1000 0 0
vt -39.3701 0
f 1/1/1 2/2/1 3/3/1 4/4/1 

vn -1 0 0
v 0 0 1000
v 0 1000 1000
f 2/4/2 1/1/2 5/2/2 6/3/2 

vn 0 -1 0
vt 39.3701 0
v 1000 0 1000
vt 39.3701 39.3701
f 1/1/3 4/5/3 7/6/3 5/2/3 

vn 1 0 0
v 1000 1000 1000
f 4/1/4 3/5/4 8/6/4 7/2/4 

vn 0 1 0
f 3/4/5 2/1/5 6/2/5 8/3/5 

vn 0 0 1
f 6/2/6 5/1/6 7/5/6 8/6/6 

I did not check the “Triangulate all faces” box. In my experience many applications do not read an un-triangulated OBJ mesh correctly. It is years I have used this, though. Together with the 3DS format, OBJ is rather an outdated file type from the DOS era.

Anssi


#5

It would be nice if it looked more like this

OBJ File Generated by Meshlab

Object BEM-Meshlab.obj

Vertices: 40

Faces: 66

v 41.000000 236.000000 7.750000
v 31.000000 170.697998 7.750000
v 31.000000 236.000000 7.750000
v 41.000000 170.697998 7.750000
v 41.000000 170.697998 15.500000
v 41.000000 236.000000 15.500000
v 133.000000 236.000000 15.500000
v 133.000000 236.000000 7.750000
v 143.000000 236.000000 7.750000
v 31.000000 236.000000 0.000000
v 143.000000 236.000000 0.000000
v 174.000000 272.000000 0.000000
v 0.000000 272.000000 0.000000
v 0.000000 0.000000 0.000000
v 31.000000 170.697998 0.000000
v 174.000000 0.000000 0.000000
v 143.000000 170.697998 0.000000
v 143.000000 170.697998 7.750000
v 133.000000 170.697998 7.750000
v 133.000000 170.697998 15.500000
v 174.000000 0.000000 80.000000
v 174.000000 272.000000 80.000000
v 0.000000 272.000000 80.000000
v 0.000000 0.000000 80.000000
v 162.000000 0.000000 80.000000
v 162.000000 238.000000 80.000000
v 12.000000 238.000000 80.000000
v 12.000000 0.000000 80.000000
v 162.000000 0.000000 86.000000
v 12.000000 0.000000 86.000000
v 144.000000 0.000000 86.000000
v 144.000000 238.000000 86.000000
v 162.000000 238.000000 86.000000
v 12.000000 238.000000 86.000000
v 30.000000 0.000000 86.000000
v 30.000000 238.000000 86.000000
v 30.000000 238.000000 92.000000
v 30.000000 0.000000 92.000000
v 144.000000 0.000000 92.000000
v 144.000000 238.000000 92.000000

40 vertices, 0 vertices normals

f 1 2 3
f 2 1 4
f 1 5 4
f 5 1 6
f 1 7 6
f 7 1 8
f 10 9 3
f 9 10 11
f 10 12 11
f 10 13 12
f 13 10 14
f 15 14 10
f 14 15 16
f 16 15 17
f 2 17 15
f 17 2 18
f 19 4 20
f 20 4 5
f 5 7 20
f 7 5 6
f 7 19 20
f 19 7 8
f 9 19 8
f 19 9 18
f 9 17 18
f 17 9 11
f 11 12 17
f 16 17 12
f 12 21 16
f 21 12 22
f 12 23 22
f 23 12 13
f 14 23 13
f 23 14 24
f 14 21 24
f 21 14 16
f 21 26 25
f 22 26 21
f 22 27 26
f 23 27 22
f 23 28 27
f 28 23 24
f 29 28 25
f 28 29 30
f 29 32 31
f 32 29 33
f 29 26 33
f 26 29 25
f 26 34 33
f 34 26 27
f 28 34 27
f 34 28 30
f 35 34 30
f 34 35 36
f 35 37 36
f 37 35 38
f 35 39 38
f 39 35 31
f 32 39 31
f 39 32 40
f 32 37 40
f 37 32 36
f 37 39 40
f 39 37 38
f 10 2 15
f 2 10 3

66 faces, 0 coords texture

End of File