Jump to content
Official BF Editor Forums
[EA]LBrown

How To Install The Maya Tools.

Recommended Posts

Important: The plug-ins currently only work with Maya 6.0.1. Maya 6.5 and 7 are not supported yet!

For those of you having problems getting the Maya tools working, turns out there was a bit of a mixup with some of the files in the Aug02 release of the editor. All the files are there, it's just that some of them are in the wrong folder.

This will be fixed in the next release, but to install the tools correctly, do this:

-Install the editor.

-Inside your Battlefield 2 folder, locate the "Maya" folder and open it.

-Now open the "Maya Tools" folder.

-Run the Cg_1.2.1_Setup.exe program to install the nVidia tools. (Note: if you have any other version of this, you must remove it first. If you don't know what I'm talking about, then you don't have to worry about it.)

-Copy all the icons from the "Icon" folder to "C:Program FilesAliasMaya6.0.1icons". (Not the folder itself, just the files inside it!)

-Copy everything inside the "Plugins" folder to "C:Program FilesAliasMaya6.0.1binplug-ins". (note the hyphen in the name. They do not go in "plugins"!)

Here's the tricky part:

-Open the "Scripts" folder.

-Copy the following files to your "Plug-in" folder. (Not your "Scripts" folder!):

cgfxShader_initUI.mel

cgfxShader_util.mel

AEcgfxShaderTemplate.mel

AEcgfxVectorTemplate.mel

-Copy all remaining files from "Scripts" to "C:Program FilesAliasMaya6.0.1scriptsothers".

If you accidently copied all of the scripts it won't hurt anything, but in order to make the tools work, you must have the 4 scripts listed above in your Plug-ins folder.

-Once you have everything copied to the correct places, start Maya and go to your plug-in Manager. (Window>Settings/Preferences>Plug-in Manager)

-Load the cgfxShader.mll by checking the boxes next to "loaded" and "auto Load". (If you don't check "auto Load", you will have to reload the plug-in every time you start Maya)

You should now be good to go. Sorry for the mixup. Let me know if there are any more problems.

Edited by mschoeldgen[Xww2]
mscho: understressed version compatibility

Share this post


Link to post
Share on other sites

Hmm... followed the instructions to a T.

New XP installation. All security patches updated.

Clean BF2 Install. Patched to 1.02. Ran several maps to generate shaders.

Grabbed the 6.0.1 update from Alias.

Installed from CD Maya Unlimited 6.0

Updated to 6.0.1

Renamed C:Program FilesAliasMaya6.0 to C:Program FilesAliasMaya6.0.1

Set MAYA_LOCATION = C:Program FilesAliasMaya6.0 to C:Program FilesAliasMaya6.0.1

Path includes C:Program FilesAliasMaya6.0 to C:Program FilesAliasMaya6.0.1bin

Installed BF2Editor.

Ran Cg_1.2.1_Setup.exe. Verified the information was added to the path.

Copied the contents of C:Program FilesEA GAMESBattlefield 2mayaMaya ToolsIcons to C:Program FilesAliasMaya6.0.1icons

Copied the contents of C:Program FilesEA GAMESBattlefield 2mayaMaya ToolsPlugins to C:Program FilesAliasMaya6.0.1binplug-ins

Copied C:Program FilesEA GAMESBattlefield 2mayaMaya ToolsScriptscgfxShader_initUI.mel, ..cgfxShader_util.mel, ..AEcgfxShaderTemplate.mel, ..AEcgfxVectorTemplate.mel to C:Program FilesAliasMaya6.0.1binplug-ins

Copied the remaining contents of C:Program FilesEA GAMESBattlefield 2mayaMaya ToolsScripts to C:Program FilesAliasMaya6.0.1scriptsothers

Changed the properties of my desktop icon to point to :Program FilesAliasMaya6.0.1binmaya.exe as by default it keeps Maya in Maya6.0 if you upgrade, it does NOT create a Maya6.0.1 folder.

Ran Maya, opened the plugin manager. Clicked on cgfxShader --- BAM

The specified procedure could not be found.

Open up the Script Editor and the error is simply:

// Error: The specified procedure could not be found.

(cgfxShader) //

This rig:

Windows XP Professional. SP2 Clean Install.

AMD 64 4000

2GB Corsair pc3200 RAM

ATI X800 latest drivers

Creative SB

2x Maxtor 200 GB Sata Drives Raided

No other software installed.

Share this post


Link to post
Share on other sites

dokks

it may be a problem with ATI card. CGFX shader uses a specific nvidia oriented format... I think so cause i have changed my ATI to nvidia 6600 and problem dissapears... i am not sure at 100%

Share this post


Link to post
Share on other sites
probka]dokks

it may be a problem with ATI card. CGFX shader uses a specific nvidia oriented format... I think so cause i have changed my ATI to nvidia 6600 and problem dissapears... i am not sure at 100%

Hmmm, not that I am ungrateful for the advice, but I do hope you are wrong lol. Anywho, I'll throw a Nvidia 7800 in and see if it makes a difference.

I'll post the results here.

Share this post


Link to post
Share on other sites

OK, I tried on the same box with a Nvidia 6800 and got the same result. So I tried on a co-workers machine and got the exact same message too. Looks like there is definately something odd going on here with their shader.

Seeing as this is EA (cough) ....

Share this post


Link to post
Share on other sites

Ok well EmperorChuck helped me get things working properly.

Here is what I did to get through the tutorials.

-------------------------------------------------------------------------

Installed maya 6.0 (I installed this in a custom location)

Installed maya 6.0.1 (did not change anything after installing 6.0.1)

Installed BF2 in the default location

Installed BF2 Editor in the default location

Installed cgfx in the defualt location

-------------------------------------------------------------------------

Then I copied the "contents"! of

C:Program FilesEA GAMESBattlefield 2mayaMaya ToolsScripts

To

C:Documents and SettingsYourUserNameMy Documentsmaya6.0scripts

Then I copied the Plugin "folder"! from

C:Program FilesEA GAMESBattlefield 2mayaMaya Tools

To

C:Documents and SettingsYourUserNameMy Documentsmaya6.0

<<(Be sure you replace "YourUserName" with the correct name)!>>

-------------------------------------------------------------------------

Then I copied the "Contents"! of

C:Program FilesEA GAMESBattlefield 2mayaMaya ToolsIcons

To

C:Documents and SettingsYourUserNameMy Documentsmaya6.0prefsicons

<<(Be sure you replace "YourUserName" with the correct name)!>>

-------------------------------------------------------------------------

Then I copied the "Contents"! of

C:Program FilesEA GAMESBattlefield 2mayaMaya ToolsScripts

To

C:Documents and SettingsYourUserNameMy Documentsmaya6.0Plugin

<<(Be sure you replace "YourUserName" with the correct name)!>>

----------------------------------------

Then I copied the following 3 .mel files

AErscMeshShaderTemplate.mel

AEcgfxVectorTemplate.mel

AEcgfxShaderTemplate.mel

To

C:GraphicsMaya6.0scriptsAETemplates

---------------------------------------

Then I opened up C:Documents and SettingsYourUserNameMy Documentsmaya6.0Maya.env

in a text editor. I added the following 2 lines to the file and saved it.

MAYA_SCRIPT_PATH = C:Documents and SettingsYourUserNameMy Documentsmaya6.0scripts

MAYA_PLUG_IN_PATH = C:Documents and SettingsYourUserNameMy Documentsmaya6.0Plugin

<<(Be sure you replace "YourUserName" with the correct name)!>>

---------------------------------------------------------------

Next copy

C:Documents and SettingsYourUserNameMy Documentsmaya6.0scriptsuserSetup.mel

To

C:Documents and SettingsYourUserNameMy Documentsmaya6.0prefs

Opened userSetup.mel up in a text editor and made the contents exactly like this

source DICE;

source createPrefWndUI.mel;

then saved this

(Note: If you have relevant things in this file just add the 2 lines to it and save,

don't copy over your userSetup.mel file, you should know if you do)

<<(Be sure you replace "YourUserName" with the correct name)!>>

----------------------------------------------------------------

Ok next I opened up the properties for my computer

Go to the Advanced tab

Go to the Environment Variables tab

Then click on path add this line to it if not there already

C:GraphicsMaya6.0bin;

Then create a User Variable by clicking on new

Fill in the 2 fields with the following

Variable name: MAYA_LOCATION

Variable value: C:GraphicsMaya6.0

click ok, ok

--------------------------------------------------------

Loaded up Maya then proceded to Window>Settings/Preferences>Plug-in Manager)

You will see 3 plugins listed at the top.

Click on autoload and load for cgfxshader.mll only

Ingore the other 2 plugins becuase they are used in a batch mode from within the editor!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

---------------------------------------------

Next I setup my working directory structure for maya.

This is important that this is set all the time. Or your texture paths in maya will suck.

I set my Maya project to point at C:Program FilesEA GAMESBattlefield 2bf2editorRawData

Then I copied part of the directory structure out of the tutorial zip files

Example

Out Of

Battlefield 2 Modding Tutorial 4 - Building The Bunker.zip

Copy

/Objects and all of its contents/directories

To

C:Program FilesEA GAMESBattlefield 2bf2editorRawData

------------------------------------------------------------------------

At this point if you have done all these things correctly you should be all set to start the tutorials.

And follow them implicitly.

Now you have to make sure that the texture paths are pointed correctly in the cgfxShader nodes in maya.

If you have your project set correctly then you should be set to finish the tutorials.

Now as a side note I don't see the cgfx shaders drawing correctly in the gl viewport in maya.

I see them fine in the Dice UV window.

Share this post


Link to post
Share on other sites
Ok well EmperorChuck helped me get things working properly.

Here is what I did to get through the tutorials.

.

Hey thanks for the info. Could you possibly do this. Hit Control + escape. Go to run and type cmd.

In the command window type SET and hit enter. Then go up to the upper left corner of the command prompt window and right click. Not in the wndow but up on the title bar to the far upper left. Where it shows a little icon of a command window with C: in it. Then go to edit - mark in the menu. Copy the output of your set command here so we can see what your environment variables are.

Thanks a ton!

Share this post


Link to post
Share on other sites
Ok well EmperorChuck helped me get things working properly.

Here is what I did to get through the tutorials.

.

Hey thanks for the info. Could you possibly do this. Hit Control + escape. Go to run and type cmd.

In the command window type SET and hit enter. Then go up to the upper left corner of the command prompt window and right click. Not in the wndow but up on the title bar to the far upper left. Where it shows a little icon of a command window with C: in it. Then go to edit - mark in the menu. Copy the output of your set command here so we can see what your environment variables are.

Thanks a ton!

edited the names out

ALIAS_TRANSLATION_SERVICE_LOCATION=C:Program FilesAliasDirectConnect 1.0

ALLUSERSPROFILE=C:Documents and SettingsAll Users

APPDATA=C:Documents and SettingsusernameApplication Data

CG_BIN_PATH=C:Program FilesNVIDIA CorporationCgbin

CG_INC_PATH=C:Program FilesNVIDIA CorporationCginclude

CG_LIB_PATH=C:Program FilesNVIDIA CorporationCglib

CLIENTNAME=Console

CommonProgramFiles=C:Program FilesCommon Files

COMPUTERNAME=Computername

ComSpec=C:WINDOWSsystem32cmd.exe

FP_NO_HOST_CHECK=NO

HOMEDRIVE=C:

HOMEPATH=Documents and SettingsUser

LOGONSERVER=ComputerName

MAYA_LOCATION=C:GraphicsMaya6.0

NUMBER_OF_PROCESSORS=1

OS=Windows_NT

Path=C:GraphicsMaya6.0bin;C:GraphicsMaya6.5bin;C:WINDOWSsystem32;C:WINDOWS;C:WIN

OWSSystem32Wbem;C:Program FilesATI TechnologiesATI Control Panel;C:GraphicsMaya6.0bin;C:Program FilesEA GAMESBattlefield 2mayaMaya ToolsScripts;C:Program FilesNVIDIA CorporationCgbin;

PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH

PROCESSOR_ARCHITECTURE=x86

PROCESSOR_IDENTIFIER=x86 Family 15 Model 7 Stepping 10, AuthenticAMD

PROCESSOR_LEVEL=15

PROCESSOR_REVISION=070a

ProgramFiles=C:Program Files

PROMPT=$P$G

SESSIONNAME=Console

SystemDrive=C:

SystemRoot=C:WINDOWS

TEMP=C:DOCUME~1usernameLOCALS~1Temp

TMP=C:DOCUME~1usernameLOCALS~1Temp

USERDOMAIN=ComputerName

USERNAME=threed

USERPROFILE=C:Documents and Settings

windir=C:WINDOWS

about the plugins, you only install load and autoload the cgfxshader.mll. not the other 2 .. those are used by the editor. you can't becuase you should not.

Share this post


Link to post
Share on other sites

Thanks Bro!

Couple of interesting things in there....

Like this in your path statement :

C:Program FilesEA GAMESBattlefield 2mayaMaya ToolsScripts;

Also looks like you tried the other guy's tutorial too with this:

MAYA_LOCATION=C:GraphicsMaya6.0

And this looks the same...

CG_BIN_PATH=C:Program FilesNVIDIA CorporationCgbin 



CG_INC_PATH=C:Program FilesNVIDIA CorporationCginclude 



CG_LIB_PATH=C:Program FilesNVIDIA CorporationCglib

Ok, I'll start with a fresh install and post my results ... thanks!

Share this post


Link to post
Share on other sites
polska]is this so you can install the actual maya... because i dont own maya? so do i need to buy maya or max in order to mod?

Yes you will need to buy Max or Maya. This is a discussion to install the plugins for Maya.

If you are new to 3D, I would suggest you download the Maya Personal Learning additon available for free at http://www.alias.com Play with it to get a feel for weather 3D is right for your talent :wink:

Share this post


Link to post
Share on other sites

Where can i download the update of maya 6.0.1? Because i can not find it on www.alias.com:)

(I got Personal Learning Edition)

Admin you can delete this post because i have found the update, sorry :D

Share this post


Link to post
Share on other sites
Nope' date=' followed your examples step by step on a new install. Still get

[b']The specified procedure could not be found

Me too man, we are the same :wink: although it isn't good this time..

Share this post


Link to post
Share on other sites
Nope' date=' followed your examples step by step on a new install. Still get

[b']The specified procedure could not be found

At one point in time I as well got this error. This error comes from a script not being found.

The procedure is related to the plugin scripts. When maya loads it should be reading and

sourcing these scripts. So you could manually source them try again. That is all I can guess at

this point with so little information surrounding the error other than its the cgfxShader plugin

not loading.

Another thought is this. Do you have multiple version of maya installed? On my dev machine at home I have

maya 6.5 and 6.0 installed,. I have a problem with the maya path and maya location variables not being happy.

As a result maya 6.5 plugins like the obj exporter would not load because maya 65 was looking at the 60 directories.

Do you have maya 6.5 in your path? or env variable? if so remove them temporarily.

Share this post


Link to post
Share on other sites

THOUGHT that fixed it, now I can get the plugin to load, but when I try to assign it to an object I get:

Error: cgfxShader "cgfxShader1" unable to load effect "C:/Program Files/EA GAMES/Battlefield 2/maya/CGFX6.0/StaticMesh.fx"

I set my project in Maya to be Rawdata, blah blah blah ... I know this is beta, but guys you should REALLY think about what you give out to the public, pretty shoddy fellas.

Share this post


Link to post
Share on other sites
THOUGHT that fixed it, now I can get the plugin to load, but when I try to assign it to an object I get:

Error: cgfxShader "cgfxShader1" unable to load effect "C:/Program Files/EA GAMES/Battlefield 2/maya/CGFX6.0/StaticMesh.fx"

I set my project in Maya to be Rawdata, blah blah blah ... I know this is beta, but guys you should REALLY think about what you give out to the public, pretty shoddy fellas.

You should be ready to start the bunker tutorials then.

Share this post


Link to post
Share on other sites

Dethpod77 Wrote

Opened userSetup.mel up in a text editor and made the contents exactly like this

source DICE;

source createPrefWndUI.mel;

then saved this

(Note: If you have relevant things in this file just add the 2 lines to it and save,

don't copy over your userSetup.mel file, you should know if you do)

<<(Be sure you replace "YourUserName" with the correct name)!>>

Dethpod77 , I need a little clarification here, please. You've stated to add the two lines:

source DICE;

source createPrefWndUI.mel;

to the file ... userSetup.mel and you said to enter those two line entries into the file

exactly like this

My confusion arises when I look at the entries already in my "userSetup.mel" when I open it.

Here's what my file looks like:

source DICE;

//int $jobNum = `scriptJob -event "SceneOpened" "dice_SetupScript"`;

source createPrefWndUI.mel;

source DICE;

source createPrefWndUI.mel;

string $additionalProcs[] = {"bonusGameMenu", "MJPolyTools"};

for ($proc in $additionalProcs)

{

if (exists($proc))

eval($proc);

}

I guess my question is, Do I add the two lines you give in your instructions to the beginning of the file? or end of the file? or do I delete everything and leave only the two line entries? or can I just delete the line

//int $jobNum = `scriptJob -event "SceneOpened" "dice_SetupScript"`;

from inbetween the two existing line entries already there in my file so it becomes like yours yet still contains the remaining following line entries?

and then save it?

And one last thing about:

<<(Be sure you replace "YourUserName" with the correct name)

I'm assuming you did'nt mean to actually enter this comment here, perhaps it was done accidently, I can't make sense as to where I would change "MyUserName" in the context of this example.

Thanks, I've been reading all your posts. And really want to thank you for all the hard work, and everyone else whose beat thier head against the wall trying to figure this mess out, you guys are awsome !

PrawdigalSun

Share this post


Link to post
Share on other sites

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

×