I'm looking into using 3ds max as a game level editor, and am examining the particular task of laying out a very long trench level. It'll be made out of a library of instanced trench segment pieces, snapped into place by hand, and populated with instanced NPCs.
I'm imagining that at some point the scene is going to get messy... file size will balloon, navigating the viewport will get slow, etc.
So I'm looking into using Xrefs to reduce the overhead, by using simplified proxy meshes to help arrange the actual trenches/NPCs. Our engine allows replacing one object with an object in another file, so I figure I might as well use Xrefs at the same time.
Is anyone actually using Xrefs right now, or has used them in the past, and could shed some light on possible pitfalls?
Replies
Now, I'm simply merging stuff in, and instancing from there.
I never messed around with Proxy objects though, so that's a grey area for me.
As far as file sizes getting huge, there is a trick I learned that helps size it down pretty damn well. If you notice your scene file is sitting at 26MB or something crazy, do the following to cut it down in size (in order):
open file > Xref Objects
- Close the window
open file > Xref Scene
- Close the Window
In the listener window in the bottom of 3dsmax, type "gc()" minus the quotes, then hit enter. Resave the file.
On average, I saw a huge file size drop. One scene in particular dropped from 25.5MB, down to 4.6MB.
This apparently has something to do with the way max handles merged/xrefed materials and objs. The "gc()" command is simply a legacy MS command for "garbage cleanup".
Hopefully this helps ya a bit.
I searched around the Discreet forum and noted the file size bug is still around in v7. There also seem to be some other issues people are having, like illogical circular dependency errors, duplicate xref listings, file corruption, etc.
Hmm. Well, I still think I might need to Xref to keep complexity low. If it bites me in the ass later, I guess we could just write a script to convert them into regular instances.
Or maybe I'll just use our engine's ability to Xref on its own... I could use low-detail proxies in Max, without Xref-ing, and have the game replace them. Hmmm, food for thought.
Thanks again!
It's a pretty good engine for the price. It has it's shortcomings, though. I'm not using Xrefs in Gamebryo though. I'm just merging the objects in.
Thanks for the insights.