DreamlandModels opened this issue on Jul 13, 2010 · 185 posts
adp001 posted Wed, 14 July 2010 at 7:24 AM
Because Max can export smooth-groups to an obj-file and Poser is able to understand this, I've tried to find something about smoothing groups in this document: http://local.wasp.uwa.edu.au/~pbourke/dataformats/obj/
Seems that having a group tagged with "s 0" stops smothing this group (e.g. anything following until "s 1" occurs). I don't have Max, so I'm not able to explore an obj-file written by Max.
But if this is correct, a python-script can alter an obj-file while identifying named groups ("g noSmoth") while adding "s 0" right under this "g"-entry. All other group definitions needs a following "s 1" if I understand the document correctly.
(untested hack to get the point):
fh=open("original.obj")
fhout=open("copy.obj","w")<br></br>for line in fh:
print >> fhout, line<br></br> l=line.strip().split(None,1)
if l[0]=="g" :
if l[1] == "noSmooth":
print >> fhout, "s 1"
else:
print >> fhout, "s 0" <br></br>close(fhout)
close(fh)<br></br>