I noticed recently some errors in the way wings imports
.3ds files... namely, that it will not make any
polygons with > 4 vertices, and if your scene has a
dummy object in it, then any objects which are children
of some other will be placed in the scene incorrectly.
However, after poking around in the code, I found that
both of these seem to be the result of INTENTIONAL
choices: in the comments for the "make_quads" function
in e3d_mesh.erl, Bjorn states he deliberately chose not
to merge triangles with > 2 invisible sides, and the
e3d_tds.erl file contains a function - ironically named
"fix_transform_0" that is only invoked if the scene
contains a dummy objects, and which then procedes to
screw up the local transforms.
For the first problem, Bjorn states he wishes to avoid
convex polygons and isolated vertices - but convex
polygons are possible even with 4 vertices, and
eliminating or ignoring isolated vertices isn't hard.
I've added some code to my e3d_mesh.erl which will
allow > 4 sided polygons, and it seems to work just fine.
As for the 2nd problem, I'm scratching my head on that.
I basically commented out the call to fix_transform_0,
and it now imports scenes with hierarchies and dummy
objects just fine.
Of course, I don't know all the subtleties of the .3ds
format, so I may be missing something. Anyway, here's
my modified code... parts I changed are marked with "%%
Log in to post a comment.