I've written some code in Director that generates some very large and
complex 3D mesh resources (to act as terrain). It works great but it
takes about 30 seconds on a reasonably fast Pentium 1.8 GHz.

Worse, I notice that if I save the cast containing the Shockwave 3D
member, all the resources get cleared out of it (and I checked
carefully to make sure I'm not accidentally calling "resetWorld"
somewhere).

So, I'm wondering if there's any way to save the model resources or the
entire Shockwave 3D castmember. There seems to be a fileName property
for the member, but I can't figure out how to export the data into a
file in the first place. Am I missing something?

If not, Is there some way to optimize my code? I've done an analysis of
which pieces of the generation process are eating up the most time. I
might be able to shave 10 seconds off the calculation time by
pre-saving all the lists I'm using to generate the mesh resources
(using the propSave xtra), but the real time sink seems to be the
following loop:

-- LocPosLL is a list of lists containing all the vertex traids for
the faces
repeat with FaceIdx = 1 to FaceCnt
LocPosL = LocPosLL[FaceIdx]
SceneRsrc.face[FaceIdx].vertices = LocPosL
end repeat

Perhaps there's some way to assign all the faces at once that would be
more time efficient? Anything else I might do?

Thanks,

-Dan