3dsMax .obj export not including object name

末鹿安然 提交于 2020-01-06 07:43:12

问题


I seem to be having a problem exporting .obj files from 3dsMax. In the exported file, each object name should be prefixed with o at the start of the line as outlined here.
Here is a sample of an exported .obj of a couple of boxes:

# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
# File Created: 10.01.2016 23:52:41

mtllib test2_selected.mtl

#
# object test2
#

v  48.9796 0.0000 -5.8002
v  48.9796 0.0000 -33.2975
v  82.0623 0.0000 -33.2975
v  82.0623 0.0000 -5.8002
v  48.9796 28.3566 -5.8002
v  82.0623 28.3566 -5.8002
v  82.0623 28.3566 -33.2975
v  48.9796 28.3566 -33.2975
# 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 test2
usemtl wire_153228153
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

#
# object test1
#

v  -30.0752 0.0000 30.2900
v  -30.0752 0.0000 -32.0086
v  28.7863 0.0000 -32.0086
v  28.7863 0.0000 30.2900
v  -30.0752 36.0902 30.2900
v  28.7863 36.0902 30.2900
v  28.7863 36.0902 -32.0086
v  -30.0752 36.0902 -32.0086
# 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 test1
usemtl 01___Default
s 2
f 9/5/7 10/6/7 11/7/7 12/8/7 
s 4
f 13/8/8 14/5/8 15/6/8 16/7/8 
s 8
f 9/8/9 12/5/9 14/6/9 13/7/9 
s 16
f 12/8/10 11/5/10 15/6/10 14/7/10 
s 32
f 11/8/11 10/5/11 16/6/11 15/7/11 
s 64
f 10/8/12 9/5/12 13/6/12 16/7/12 
# 6 polygons

As you can see, the export does not contain the object names in a line beginning with o.
Basically, I would like to know if there is something I need to do or am missing that will have the exported .obj file include the object name in a line prefixed with o?
Maybe someone could help me out by doing a quick .obj export from 3dsmax and report if they see the same behaviour.


回答1:


I can confirm that the 3dsmax OBJ exporter, or actually, the Guruware OBJ exporter which Autodesk incorporated some years ago does not seem to export o prefixed lines for objects.

Instead, it uses comment blocks to denote a beginning of a new object:

#
# object <OBJECTNAME>
#

These should be trivially parseable.



来源:https://stackoverflow.com/questions/34705690/3dsmax-obj-export-not-including-object-name

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!