greebo@Posted: Sun May 04, 2008 10:25 am :
Hey folks,

I don't know if anyone of you is using Maya 8.5 to create MD5s for Doom 3, but I thought I'd let you know that I've managed to compile a MayaImportx86.dll module which makes the exportModels command compatible to Maya 8.5.

Here you go: http://208.49.149.118/TheDarkMod/MayaImportx86(Maya85).zip

Ultra-short readme:
Quote:
Drop these three DLL files into your Doom 3 folder (the one next to DOOM3.exe). Then use the "exportModels" console command to export your models.

Be sure to add the C:\Program Files\AutoDesk\Maya\bin folder to your PATH environment variable (and restart D3).

Plus, add MAYA_LOCATION as new environment variable, pointing to your Maya installation root path:

Variable Name: MAYA_LOCATION
Variable Value: C:\Program Files\Autodesk\Maya

If Doom 3 complains about "Maya not installed in Registry", double-click the enclosed file MayaNotInstalledInRegistryFix.reg, which will add a (harmless) key to your registry. The unaltered SDK code expects a Maya key below "Alias|WaveFront", but incidentally, Maya is now produced by "Autodesk" and the regular check fails.



rich_is_bored@Posted: Sun May 04, 2008 11:11 am :
Go ahead and upload it here on the forums. I'm sure someone will find it useful.



greebo@Posted: Sun May 04, 2008 12:01 pm :
Ok, here you are (forum only allows 512 kB attachments, hence a link to our TDM FTP):

MayaImportx86.dll for Maya 8.5

The package also contains a mfc80.dll and msvcr80.dll as I couldn't be bothered to figure out how to remove these dependencies. I assume they are coming from the Maya libraries, but I can't be sure. Let me know if it works.



BNA!@Posted: Sun May 04, 2008 1:37 pm :
Thanks for creating this!

All things supporting Doom3 technology are always very welcome.



parsonsbear@Posted: Mon May 05, 2008 2:29 am :
Awesome, thank you. I heard splash damage may release a new version of the import .dll for 2008, perhaps with the next sdk release?

Can you document the steps taken to compile against the newer version of maya? nothing too detailed, but if there was anything about the process you ran across, let us know.



greebo@Posted: Fri May 09, 2008 4:02 pm :
I've updated the package on the DarkMod FTP and my first post, it contains now a "registry fix" for a common problem. Maya is now produced by "AutoDesk", not "Alias|WaveFront", which causes the SDK to look for the wrong registry key. A stupid way to check for an app anyway, but oh well.

I also included a README.txt in the package, which contains rudimentary installation instructions.



rich_is_bored@Posted: Sat May 10, 2008 7:21 am :
Thanks for the updates on the wiki aswell.



greebo@Posted: Sat May 10, 2008 7:35 am :
rich_is_bored wrote:
Thanks for the updates on the wiki aswell.

You're welcome. :) Hopefully there are any people left who will look for something like this, they are getting fewer and fewer these days, aren't they?

Btw: oDDity has reported some problems with the above package. He had performed all of the necessary steps, but it's still crashing ("pure virtual function call"), which might be related to the Vista x64 environment. I'm not sure whether installing the VC++ redistributable package might help instead of using the ones I included in the package. At any rate, I cannot do much about it here as I neither have Vista nor x64.



simulation@Posted: Fri May 16, 2008 10:31 pm :
greebo wrote:
rich_is_bored wrote:
Btw: oDDity has reported some problems with the above package. He had performed all of the necessary steps, but it's still crashing ("pure virtual function call"), which might be related to the Vista x64 environment. I'm not sure whether installing the VC++ redistributable package might help instead of using the ones I included in the package. At any rate, I cannot do much about it here as I neither have Vista nor x64.


I'm using Vista64. First hurdle is to create correct registry key for the 32-bit subsystem...

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Alias|Wavefront\Maya (wiki updated with this)

Second hurdle...

Code:
exportmodels test
WARNING: file C:\_mods\doom3\test\def\test.def, line 4: Failed to export 'models/test.mb' : Could not load MayaImport dll.


I've run sysinternals procexp and traced the file i/o. I can see it load MayaImporterx86.dll followed by these Maya DLLs...
Foundation.dll
MayaRes.dll
Base.dll
AppVersion.dll
libguide40.dll

Any clues? Using Maya 8.5 PLE by the way.

I've tried compiling my own version so I can debug but I get a ton of linker errors relating to Maya, like these.
Code:
1>obj.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: float __thiscall MFloatPoint::operator[](unsigned int)const " (__imp_??AMFloatPoint@@QBEMI@Z) referenced in function "class idVec3 __cdecl idVec(class MFloatPoint const &)" (?idVec@@YA?AVidVec3@@ABVMFloatPoint@@@Z)
1>obj.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall MFnDagNode::~MFnDagNode(void)" (__imp_??1MFnDagNode@@UAE@XZ) referenced in function "class MFnDagNode * __cdecl GetParent(class MFnDagNode *)" (?GetParent@@YAPAVMFnDagNode@@PAV1@@Z)
1>obj.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall MFnDagNode::MFnDagNode(class MObject &,class MStatus *)" (__imp_??0MFnDagNode@@QAE@AAVMObject@@PAVMStatus@@@Z) referenced in function "class MFnDagNode * __cdecl GetParent(class MFnDagNode *)" (?GetParent@@YAPAVMFnDagNode@@PAV1@@Z)

Would you mind sending me your updated MayaImporter project files so I can see what I'm missing. I've tried linking in every damn .lib in the Maya folder but no joy so I guess my other project settings are bad.



greebo@Posted: Sat May 17, 2008 5:44 am :
simulation wrote:
greebo wrote:
rich_is_bored wrote:
Btw: oDDity has reported some problems with the above package. He had performed all of the necessary steps, but it's still crashing ("pure virtual function call"), which might be related to the Vista x64 environment. I'm not sure whether installing the VC++ redistributable package might help instead of using the ones I included in the package. At any rate, I cannot do much about it here as I neither have Vista nor x64.


I'm using Vista64. First hurdle is to create correct registry key for the 32-bit subsystem...

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Alias|Wavefront\Maya (wiki updated with this)

Ah, great hint, thanks for that. I never happened to use anything on an x64 OS, that's why I don't know these things.

simulation wrote:
Code:
exportmodels test
WARNING: file C:\_mods\doom3\test\def\test.def, line 4: Failed to export 'models/test.mb' : Could not load MayaImport dll.


I've run sysinternals procexp and traced the file i/o. I can see it load MayaImporterx86.dll followed by these Maya DLLs...
Foundation.dll
MayaRes.dll
Base.dll
AppVersion.dll
libguide40.dll

Any clues? Using Maya 8.5 PLE by the way.

You can use the Dependency Walker application to see what other DLLs want to be loaded by the module. I've uploaded it to our FTP, but you can find it on some Microsoft download sites as well: http://208.49.149.118/TheDarkMod/temp/depends.zip

The other way of debugging this is to catch the DLL load error message in the SDK file anim_import.cpp, to see which error message gets thrown when loading the DLL.

simulation wrote:
I've tried compiling my own version so I can debug but I get a ton of linker errors relating to Maya, like these.
Code:
1>obj.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: float __thiscall MFloatPoint::operator[](unsigned int)const " (__imp_??AMFloatPoint@@QBEMI@Z) referenced in function "class idVec3 __cdecl idVec(class MFloatPoint const &)" (?idVec@@YA?AVidVec3@@ABVMFloatPoint@@@Z)
1>obj.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall MFnDagNode::~MFnDagNode(void)" (__imp_??1MFnDagNode@@UAE@XZ) referenced in function "class MFnDagNode * __cdecl GetParent(class MFnDagNode *)" (?GetParent@@YAPAVMFnDagNode@@PAV1@@Z)
1>obj.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall MFnDagNode::MFnDagNode(class MObject &,class MStatus *)" (__imp_??0MFnDagNode@@QAE@AAVMObject@@PAVMStatus@@@Z) referenced in function "class MFnDagNode * __cdecl GetParent(class MFnDagNode *)" (?GetParent@@YAPAVMFnDagNode@@PAV1@@Z)

Would you mind sending me your updated MayaImporter project files so I can see what I'm missing. I've tried linking in every damn .lib in the Maya folder but no joy so I guess my other project settings are bad.

Sounds like some Maya libraries cannot be resolved. I used these:
Quote:
Foundation.lib OpenMaya.lib OpenMayaUI.lib OpenMayaAnim.lib OpenMayaFX.lib OpenMayaRender.lib Image.lib

You should find these files in your Program Files\Autodesk\Maya8.5\lib folder. I don't know what the difference for Maya 8.5 PLE is, maybe there are some import libraries or API DLLs missing? At any rate, I'm happy to upload my vcproj file, although I think you need to embed this into an existing D3 SDK environment, as there are references to idlib.



simulation@Posted: Sat May 17, 2008 5:29 pm :
Thanks greebo. Your vcproj file was identical to mine. I just read in the following in the PLE docs...
Code:
API and Plug-ins

    * The API developer's kit is not included with Maya Personal Learning Edition.
    * It is not possible to load third party plug-ins, or plug-ins from Maya Complete or other versions of Maya Personal Learning Edition.

Weird because the "include" and "lib" folders exists with all the right stuff in there. Compiles but just wont link.

I guess the stuff shipped with PLE is there for interfacing with PLE only!



JCH321@Posted: Sat Jul 12, 2008 10:07 am :
Is it just me or are all the links posted down, except the depends and vcproj file?



greebo@Posted: Sat Jul 12, 2008 10:34 am :
JCH321 wrote:
Is it just me or are all the links posted down, except the depends and vcproj file?

Yes, it seems our FTP has been wiped a bit recently. I've re-uploaded the file, let me know if it works for you:

http://208.49.149.118/TheDarkMod/MayaImportx86(Maya85).zip



Zombie13@Posted: Fri Aug 15, 2008 9:33 am :
greebo wrote:
JCH321 wrote:
Is it just me or are all the links posted down, except the depends and vcproj file?

Yes, it seems our FTP has been wiped a bit recently. I've re-uploaded the file, let me know if it works for you:

http://208.49.149.118/TheDarkMod/MayaImportx86(Maya85).zip


I am unable to access this, is it possible to upload it somewhere else, or that it can be stored in multiple places for ease of access?



greebo@Posted: Fri Aug 15, 2008 11:56 am :
Zombie13 wrote:
I am unable to access this, is it possible to upload it somewhere else, or that it can be stored in multiple places for ease of access?

Yes, our FTP has been going down fairly often recently, and due to some server outage at TTLG it's been offline for weeks now.

Take this: http://www.megaupload.com/de/?d=0EAK067Y



Zombie13@Posted: Fri Aug 15, 2008 10:19 pm :
greebo wrote:
Zombie13 wrote:
I am unable to access this, is it possible to upload it somewhere else, or that it can be stored in multiple places for ease of access?

Yes, our FTP has been going down fairly often recently, and due to some server outage at TTLG it's been offline for weeks now.

Take this: http://www.megaupload.com/de/?d=0EAK067Y


Fantastic, got it. Thanks a bunch :)



greebo@Posted: Sat Aug 16, 2008 7:46 am :
Zombie13 wrote:
Fantastic, got it. Thanks a bunch :)

You're welcome. I'm curious whether it works for you at all?

Our FTP seems to be back up, but with a different IP: http://72.8.59.188/TheDarkMod/MayaImportx86(Maya85).zip



Zombie13@Posted: Sat Aug 16, 2008 7:17 pm :
This crashed Doom 3 here for (but I am using the steam version as I am not at home at the moment). I've used this maya dll before at home when I exported some anims for myself, it worked perfectly, I guess the steam version of Doom 3 doesn't like it :)

Oh well will have to wait till I go home at the end of the month.