R
R
researcher11112018-01-14 17:37:24
3D
researcher1111, 2018-01-14 17:37:24

Structure of .obj and .mtl file?

There are two files generated by SweetHome 3D. Here they are:
obj

# 
# Generated by Sweet Home 3D - Sun Jan 14 16:00:50 EET 2018
# http://www.sweethome3d.com/
# 
mtllib 5mwall.mtl
g ground_1
usemtl ground_1
v 0.19136047 0.0 -3.861855
v 0.19136047 0.0 3.7581449
v 152.59135 0.0 3.7581449
v 152.59135 0.0 -3.861855
vn 0.0 1.0 0.0
vn 0.0 0.0 0.0
f 1//1 2//1 3//1
f 1//1 3//1 4//1
g wall_1_2
usemtl wall_1_2
v 0.19136047 0.0 -0.051855087
v 152.59135 0.0 -0.051855087
vn 0.0 -1.0 0.0
f 4//3 6//3 5//3
f 4//3 5//3 1//3
g wall_1_3
usemtl wall_1_2
v 0.19136047 243.84 -0.051855087
v 0.19136047 243.84 -3.861855
v 152.59135 243.84 -3.861855
v 152.59135 243.84 -0.051855087
vn -1.0 0.0 0.0
vn 1.0 0.0 0.0
vn 0.0 0.0 -1.0
f 1//4 5//4 7//4 8//4
f 6//5 4//5 9//5 10//5
f 4//6 1//6 8//6 9//6
g wall_1_4
usemtl wall_1_2
f 8//1 7//1 10//1
f 8//1 10//1 9//1
g wall_1_5
usemtl wall_1_2
f 6//3 3//3 2//3
f 6//3 2//3 5//3
g wall_1_6
usemtl wall_1_2
v 0.19136047 243.84 3.7581449
v 152.59135 243.84 3.7581449
vn 0.0 0.0 1.0
f 5//4 2//4 11//4 7//4
f 2//7 3//7 12//7 11//7
f 3//5 6//5 10//5 12//5
g wall_1_7
usemtl wall_1_2
f 7//1 11//1 12//1
f 7//1 12//1 10//1

mtl
# 
# Generated by Sweet Home 3D - Sun Jan 14 16:00:50 EET 2018
# http://www.sweethome3d.com/
# 

newmtl ground_1
illum 1
Ka 0.65882355 0.65882355 0.65882355
Kd 0.65882355 0.65882355 0.65882355
Ks 0.0 0.0 0.0
Ns 0.0
Ni 1
d 1.0

newmtl wall_1_2
illum 1
Ka 0.2 0.2 0.2
Kd 1.0 1.0 1.0
Ks 0.0 0.0 0.0
Ns 0.0
Ni 1
d 1.0

Who can explain their structure and how they are related?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Pavlyuk, 2018-01-14
@pav5000

In principle, about the structure of the obj and mtl format is quite clearly described here https://ru.wikipedia.org/wiki/Obj

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question