Exporting .X files from Maya 7.0

Started by
22 comments, last by GninjaGnome 11 years, 10 months ago
Not sure how many of you have been faced with the challenge of figuring this out, but I recently have, and I figured that somebody out there might appreciate this tutorial in the relatively near future - Installing the .x exporter for Maya 7.0 - After making sure that both Maya 7.0 and the Microsoft DirectX SDK (February 2006) are installed, the following needs to be done to be able to export .x files from Maya if the SDK does not automatically install the needed files for you (which happened to me and also apparently happened with the computers at school as well): 1) Copy from C:\Program Files\Microsoft DirectX SDK (February 2006)\Utilities\Bin\x86\dxcc.dll to C:\Program Files\x86\dxcc.dll /* The following three files can be found in the zip file found at http://www.quest3d.com/download/Maya_7.0_X_Exporter.zip instead of searching around through the SDK if you prefer */ 2) Copy from C:\Program Files\Microsoft DirectX SDK (February 2006)\Utilities\Bin\PlugIns\Maya\Binary7\Plug-ins\D3DMaya7ExportX.mll to C:\Program Files\Alias\Maya7.0\bin\plug-ins\D3DMaya7ExportX.mll 3) Copy DirectX.mel, DXMUnitTests.mel, and AEDirectXShaderTemplate.mel from C:\Program Files\Microsoft DirectX SDK (February 2006)\Utilities\Bin\PlugIns\Maya\Binary7\Scripts to C:\Documents and Settings\username\My Documents\maya\7.0\scripts 4) Copy DirectX.xpm and render_DirectXShader.xpm from C:\Program Files\Microsoft DirectX SDK (February 2006)\Utilities\Bin\PlugIns\Maya\Binary7\Icons to C:\Documents and Settings\username\My Documents\maya\7.0\prefs\icons /* If for some reason the directory structure on your system is setup differently than mine (like at school), then you can use the commands "internalVar -usd" to see where to put the MEL files and "internalVar -ubd" to see where to put the XPM file. */ 5) Last but not least, you need to load the D3DMaya7ExportX plug-in for Maya by going to Window -> Settings/Preferences -> Plug-in Manager and selecting the box labeled "loaded" to load it then and "autoload" so that it will automatically load whenever Maya starts up. Hopefully this works for everyone. It was a bitch to figure this all out, because Microsoft wasn't exactly kind enough to spell this out. As I learn more about the process of dealing with the DirectX Shaders in Maya and properly rigging and animating for exporting to the X format in Maya, I'll add that info here.
laziness is the foundation of efficiency | www.AdrianWalker.info | Adventures in Game Production | @zer0wolf - Twitter
Advertisement
The x86 folder is the tricky one because its not really mentioned anywhere, had to look online to figure that out.
BTW, as I've said in another thread, the Maya .x exporter BLOWS. Don't expect to be able to use it for skinned objects, it is extremely lacking in features and options. Its pretty much limited to static meshes, I've found. I've heard it has something to do with its OpenGL foundation, while you are exporting to a DirectX format. But good luck if this is your only option. Otherwise I suggest exporting from 3ds Max or Right Hemisphere's Deep Exploration.
-------------www.robg3d.com
Okay, I've been messing with for like two days and I still can't get textures to work. I've (obviously) gotten the exporter installed and I can export geometry just fine, but I'm doing something wrong with where I'm putting the textures/what kinds of textures I'm using/parameters. I'm not sure. I export to a .x file and when I load it up in the DirectX Viewer, the object is there, but there is no texture. I downloaded the Deep Exploration trial and I get the same error, so it has to be a user error. How do you properly texturing for export, export the texture reference, and where does the texture go?
laziness is the foundation of efficiency | www.AdrianWalker.info | Adventures in Game Production | @zer0wolf - Twitter
While I'm somewhat of a .x novice, I don't think you can 'embed' the textures into the .x format. When you export the texture, you are just making a copy of the texture into the same folder as the .x file goes. So in Deep Exploration, you still have to link the material to use the proper textures. In .x viewer, not so sure, but it probably works in a similar way, try configuring the material from Deep Exploration and exporting from there and see if it links correctly. Sorry if this sounds confusing, exporting always is, unfortuately.
-------------www.robg3d.com
And if I've installed dxsdk to d:\program files? dxcc.dll not found if I place it in c:\program files\x86. Tried to place it in d:\program files\x86 - same result.
I've installed maya to d:\program files too. Sorry for spamming.
Sorry, I got pulled away and kinda forgot about this thread.

When exporting a model from Maya with textures, make sure that under Make Relative Paths, set to True. Have the .x file and the texture in either the same directory or make sure that it just plain maintains a relative path, like having the texture already in a sub folder called "texures" and making sure it doesn't go anywhere in relation to the .x file.

Quote:Anonymous Poster
And if I've installed dxsdk to d:\program files?

Dunno. I would recommend that you just install it to its default location, because it works just fine from there.
laziness is the foundation of efficiency | www.AdrianWalker.info | Adventures in Game Production | @zer0wolf - Twitter
Quote:Dunno. I would recommend that you just install it to its default location, because it works just fine from there.

Yeah, I had to reinstall maya, after that it started to work.
BTW I haven't had any problems with textures yet, even without relative paths.
I've experienced problems with textures too. I found out that if you change texture path in maya the old path can be used when exporting (which results in missing texture in directx viewer). The cure for this is to reload the scene in maya. After that everything seems to export correctly both with absolute or relative texture paths.
Just a few more notes of interest for people -

I read this in the DX docs and then promptly forgot - hard binding does not work! You have to use soft binding. I had so many damn problems by forgetting this that it isn't even funny.

Don't load the DX plug-in after you've been working on the model. It'll try to rebuild and possibly crash. Load up the DX plug-in from the start. This isn't a big deal if you simply set it to load up at the start, but if you're on a school computer with Maya that does the whole clean wipe thing, make sure you remember to load it as soon as you start up Maya.

DX doesn't support IK handles. This isn't really all that big of a deal though because of how animations are handled in the .X files, though. For people writing .X loaders, the fact that IK handles are stripped on export could be useful to know.


That being said, I've finally got working animations of textured models working out of Maya in DirectX. It has been a fun ride. ;) Now onto the fun part of getting some solid looking animations - the artistic side of things.
laziness is the foundation of efficiency | www.AdrianWalker.info | Adventures in Game Production | @zer0wolf - Twitter

This topic is closed to new replies.

Advertisement