XRef and My Workflow

Sometime ago I wrote two posts on the topic of XRefs (3ds Max Externally Referenced File) in Max. I have come to the ‘near’ end of my current project and thought it was time to share some of the Pro’s and Con’s of the XRef system and my current Workflow. I hope to cover a multitude of topics such as, XRef Materials, XRef Meshes, XRef Groups of Meshes, XRef and the DTS Exporter.

– Allows you to maintain only one resource but let it have a ripple effect into other files.
– Allows for a much simpler cleaner Texture & Material Resource structure.

– Does require a small amount of extra thought and care when saving and working in XRef’d files
– Adds an extra file in your file structure. (This is simply used as a base file)
– Can have material issues with the DTS Exporter
– Meshes have an ID, beyond the Name… and so can create hassles if you completely replace a mesh.

Don’t worry though, the minimal Pro’s outway the Con’s!! 😀

By standard I work using the incremental save, because of this I have many files numbered consecutively. This however presents a problem, when you want to XRef from a Single File and always be XRef’ing the most up to date file. A simple work around (that hasn’t given me any hassles so far) is to simply save an extra file with a ‘_XREF’ in the name. So basically my files are called ‘*_00, *_01, *_02’ and then I have a ‘*_XREF’ this works well for me, because the XREF always sorts itself in Windows to the bottom of the Numbered List, this makes it easy to find when saving over it. So yes, you will need to hit ‘Save’ to save the numbered file and then ‘Save As’ to save over the XRef file.

The next step is to start with a fresh scene, I prefer a full ‘Reset Scene’, it simply, makes sure all materials and any linking is broken.
Go -> File -> XRef Object – Then clicking ‘Add’ will bring up a Browse Window. Find the file you saved earlier with the _XREF in the name. You will then be asked to choose which objects in that file you would like to Import. You are able to import all of them, or just a single object from that file.
Now you need to enable two options, firstly ‘Update File’ must be set to ‘Automatic’ and secondly in the bottom window, click the name of the Object you just XRef’d and enable ‘Update Mtl’.
These automatically check the source file for changes and update this scene for the Mesh and for Material Properties respectively.
You should now find your Object in your new scene. The modifier stack will show that it is an XRef’d object and not a native mesh. Converting to Mesh/Poly or Patch will break the XRef connection and the new mesh will be saved into the new scene. You can effectively work and modify the mesh without severing the connection by simply applying ‘Edit Mesh/Poly’ modifiers, or any modifiers for that matter ontop of the XRef.
Be careful with the Materials though….. a single change on the Material and its material link to the source file will be severed too.

The next step is to save your current work file. I like to save the new file that contains XRef data with a ‘_XRef’d’ in the filename, normally before the consecutive numbering. This lets me keep a track of which files are referencing from an external source file. I have considered placing the name of the XRef file into the XRef’d file but can only see that making file names ridiculously long and hard to manage. You are always able to open up the XRef Dialog and check with files are being XRef’d.

Extras to Remember
XRef Materials – When you XRef a single object, the new scene will receive a link to the entire material collection applied to that Object. Where I use Multi/Sub Object materials, it can create hassles where more than just the single material for that object is referenced into your scene. This can have far reaching effects (see XRef and the DTS Exporter for more details on that)

XRef Meshes – As I pointed out above, a XRef mesh can be modified to your hearts content, as long as you never use the ‘Convert to Mesh/Poly/Patch’ tool. Always modify the XRef’d mesh via new modifiers in the modifier stack. XRef’ing also brings the Objects in at the exact same XYZ position as in the source file. This is especially handy when working in a larger environment, and needing to export a specific mesh that fits perfectly into the rest of the world meshes.

XRef Groups of Meshes – I have often successfully XRef’d a group of meshes from one file to another… however it does create issues (loosing the reference, etc) as soon as you ungroup and regroup the source file. Suggested work arounds for this would be to only ever ‘Open’ the group, or to simple leave them ungrouped and regroup them in the new XRef’d scene.

XRef and the DTS Exporter – Please see my post titled ‘XRef Usage & DTS Export to Torque!!!

The XRef system in Max is an amazingly powerful tool, which has begun saving me loads of time in my production pipeline. I plan to implement it in just about every field of my Game Art pipeline!
Hopefully you can take something from this and implement it into your own pipeline! Enjoy!!


p.s All of the above work was done in Max Version 7, I am not sure of any XRef changes in later Versions.
p.p.s Thanks to www.AiGameDev.com for the cool idea to rotate images of windows or code!! 😀

kick it on GameDevKicks.com

Leave a Reply