Sign in to follow this  

Exporting .X files from Maya 7.0

This topic is 2028 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I've installed maya to d:\program files too. Sorry for spamming.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
It seems this plug-in is extremely unstable. My Maya crashed several times because of it.

Did Microsoft add any improvement to their plug-in in DX SDK April 2006?

Share this post


Link to post
Share on other sites
I figured that I should revisit this thread after talking to some classmates of mine who were trying to use this thread to get the Maya DirectX exporter working. I made a .zip file of all of the files you need and a batch file to put them where they need to go. You can find that here. Make sure to read the readme file and make the necessary edits to the batch file. Also, I'm creating a web page that will contain the information I've found in a better arranged format. It can be found at tools.anomicworld.net.

Something I neglected to specify is that step 5 in the directions in the first post is within the Maya menu set.

Quote:
It seems this plug-in is extremely unstable. My Maya crashed several times because of it.

I feel your pain.

Quote:
Did Microsoft add any improvement to their plug-in in DX SDK April 2006?

Nope, I've taken a gander at it and it is exactly the same.

[Edited by - zer0wolf on June 17, 2006 9:19:42 AM]

Share this post


Link to post
Share on other sites
It's very kind of you, thank you very much!

I'd like to add a few notes to your batch file:
1. Remember to revise directories in the batch file, they r critical. For an example, many ppl's "My Documents" or Maya is not located in C:
2. Pay attention to where dxcc.dll is put, coz it's location is a little tricky...in my case, my Maya is installed in D:\Maya7, so I have to put dxcc.dll into D:\x86\ instead of C:\Program Files\x86
3. As mentioned before, this plug-in is unstable, make sure u load it right the moment before u export your work.

Share this post


Link to post
Share on other sites
hy, i`ve downloaded the plug`in from http://www.quest3d.com/download/ and i`m getting this error every time i try 2 load it "Error: The operation completed successfully.". then i`ve installed the plug`in with the bat file suplied on this site, but the error remains...
pls can u tell me how can i fix this, how can i get the plug`in 2 work?
thank you

Share this post


Link to post
Share on other sites
Did you install Maya to the default directory? Did you follow the instructions in the readme file included with the batch file on what you need to change in the batch file to make it work? Are you using a legal copy of Maya. Have you tried installing the file and then loading up Maya (as opposed to while Maya is running)?

Share this post


Link to post
Share on other sites
BTW, the DirectX exporter plugin really f'ed up my Maya really bad. I had it autoloading, and it was causing constant Fatal Errors, and serious batch rendering problems/crashes. I finally had the bright idea to unload the plugin unless I needed it (hopefully never), but just a note to anyone that has it installed and sees that D3D window when they batch render, and wonder why they have to restart their comp every time they exit Maya because their comp becomes a slug.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Thank you very much ZeroWolf for your instrution. With your instruction, now I can export my object to .X now ^^. But can I ask few more questions....I'm really new with Maya so I don't know that soft binding and hard binding are the same one with rigid and smooth ? because binding help tool in Maya I can only find rigid and smooth so I don't have any conclusion to prove that these are the same things...and I have heard that IK is using for moving bones if have to aviod it...which tool should I use to handle it instade? and last one is that can I use ExportX tool to export the exsist Objects(the one that I have already finished it up before finding exportX tool)I have tested the polygon with no moving and it still work...but how about moving thing(because the exportX tool make my Maya 3 times slower than before...it is great if you don't have to turn it on immediatly when you doing your job)... thanks a lot for listening to all of my questions ^^.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Thank you for all your support and it worked for me.


Share this post


Link to post
Share on other sites
Guest Anonymous Poster
well, the X Exporter really pisses me off
It worked fine when i started my project
now, that i have a skeleton, ik handles, constraints, char sets and over 800 frames of animation, the whole thing isn't working anymore!

ok, not completely
I'm trying for my game to seperate arms, torso, legs and head
together as one combined polygon and with smooth bind applied to the bones, all works fine

but wenn i detach skin, seperate polygon and delete all except (for example) the head, bind again and THEN try to export, I always get the "Fatal Error: Attempting to save C:/..../user/temp/Orkze.somenumbers.ma

but when I after that try to export ONLY the skeleton, it again works fine

any ideas?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
SOLVED! =)

The problem is, that every joint of the skeleton needs a skin/vertex binded on.
I just added small invisible faces to the joints where there's no skin, and it worked perfectly (polycount was rasied by 12).

greets

Share this post


Link to post
Share on other sites

This topic is 2028 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this