World Content advice

I am hoping some one can give me some ideas. My designer has created me a 3d world in maya which looks fantastic has anyone one got experience of what to do with this I think I need to export each object to fbx which is easy but then need a file probably xml with all the positions rotations etc. Has anyone got any idea how I can do this.

Exporting them as individual is the way to go also, FBX contains the information about the position and rotation just make sure you add these lines when you going to draw the model.

bonesTransformation = new Matrix[model.Bones.Count];
model.CopyAbsoluteBoneTransformsTo(bonesTransformation);

You can use Maya’s embedded python to write each reference’s source file (if your artist didn’t use references then you’re in for a doozy) along with the transform to a text file describing your scene. Export all of your references to FBX and feed them through the pipeline tool.

This is the sort of thing you’d want to write out from Maya via Python (it’s just an example - add whatever additional data you need, if you have user-fields denoting game-logic, etc):

C:/MyArtists_Bad_Filesystem_Layout_Goes_Here/PalmTree.mb
translation: 32 0 32
rotation: 0 0 0 1
scale: 1 1.5 1

C:/MyArtists_Bad_Filesystem_Layout_Goes_Here/PalmTree.mb
translation: -32 0 32
rotation: 0 0 0 1
scale: 1 1 1

C:/MyArtists_Bad_Filesystem_Layout_Goes_Here/DirtyHut.mb
translation: 0 0 0
rotation: 0.34 0 0 1
scale: 1 1 1

Then load up your text file to rebuild the scene, though you might want to preprocess that text file to clean up paths to the referenced models and turn it into a BLOB instead of text.

Edit: Could probably also just export an Alembic file Maya that’s locators only. Not sure if you can force Alembic to only use 32-bit floats instead of 16-bit though, which is problematic for C# consumption.

Thanks thats a great help I am also writing an exporter to xport from Unity and this will be very useful