Jump to content
Official BF Editor Forums
[EA]LBrown

How To Install The Maya Tools.

Recommended Posts

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.

But no, when you press assign, and that comes up, you cannot edit a certain part of the shader that is edited in the tutorial, where can I change the directory to the right one? StaticMesh.fx that is.

And now it is the right one, after a long reinstallation. No difference at all... what's the problem with this shit? After one problem comes another... :cry:

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

What I was getting at if you read what I Wrote carefully is this.

Those 2 lines are the only 2 lines you need in your userSetup.mel

that are relevant to BF2. The other stuff should not even be in this file

if you don't have the bonus games installed. In other words if you have

stuff you put in this file for other things leave them, if not all you need

is these 2 lines.

The comment about changing the path is related to the fact that in a path I did not list my personal user profile name but replaced it with an example showing that you need to change this portion of the path string.

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.

But no, when you press assign, and that comes up, you cannot edit a certain part of the shader that is edited in the tutorial, where can I change the directory to the right one? StaticMesh.fx that is.

And now it is the right one, after a long reinstallation. No difference at all... what's the problem with this shit? After one problem comes another... :cry:

Correct I cannot edit this either. I have a couple posts about this in the Maya dir with no answers presented by anyone.

see: http://bfeditor.org/forums/index.php?showt...er=asc&start=15 about the middle

is what is depicted in "Mine" the same as yours? If so then you can continue, if not then something is not set correctly.

This however does not prevent you from doing the tutorials. Because i have imported objects into the editor

with this difference from the tutorial persisting.

Share this post


Link to post
Share on other sites

No, DethPod means it's not necessary to edit userSetup.mel, just as long as you have those 2 lines in them.

staticmesh.fx is definitely needed, but I still cannot get it to load.

There are actually 2 staticmesh.fx files:

c:Program FilesEA GamesBattlefield 2mayaCGFX6.0StaticMesh.fx

and

c:Program FilesEA GamesBattlefield 2BF2EditorShadersStaticMesh.fx

I've tried both, but neither of them seem to want to load.

I get either:

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

or:

Error: cgfxShader internal error 134 with args: -e -fx C:/Program Files/EA GAMES/Battlefield 2/maya/CGFX6.0/StaticMesh.fx cgfxShader2 //

(I forget which one causes which error, but either way they both refuse to load)

Share this post


Link to post
Share on other sites
No, DethPod means it's not necessary to edit userSetup.mel, just as long as you have those 2 lines in them.

staticmesh.fx is definitely needed, but I still cannot get it to load.

There are actually 2 staticmesh.fx files:

c:Program FilesEA GamesBattlefield 2mayaCGFX6.0StaticMesh.fx

and

c:Program FilesEA GamesBattlefield 2BF2EditorShadersStaticMesh.fx

I've tried both, but neither of them seem to want to load.

I get either:

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

or:

Error: cgfxShader internal error 134 with args: -e -fx C:/Program Files/EA GAMES/Battlefield 2/maya/CGFX6.0/StaticMesh.fx cgfxShader2 //

(I forget which one causes which error, but either way they both refuse to load)

Same for me, EA, please tell us why. Everything is so much nicer when it works :P

Share this post


Link to post
Share on other sites

There seem to be several problems with the Maya tools that I'm trying to figure out right now. I have no answers other than what I've posted here or in the Maya forum.

you should definitely be using this path:

c:Program FilesEA GamesBattlefield 2mayaCGFX6.0StaticMesh.fx

The other one is named the same, but is not the same thing. It's for the editor to use.

Sorry this is causing so many problems. I'm trying to get the devs to straighten it out.

Share this post


Link to post
Share on other sites

Here's something I don't think anyone has mentioned yet, but in the Maya script editor, these are the lines that show up on error, if it helps dev any:

cgfxShader -e -fx "C:/Program Files/EA GAMES/Battlefield 2/maya/CGFX6.0/StaticMesh.fx" cgfxShader1;

// Error: CgFXSetDevice failed. //

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

Looks like the shader is failing at CgFXSetDevice

Share this post


Link to post
Share on other sites
LBrown]There seem to be several problems with the Maya tools that I'm trying to figure out right now. I have no answers other than what I've posted here or in the Maya forum.

you should definitely be using this path:

c:Program FilesEA GamesBattlefield 2mayaCGFX6.0StaticMesh.fx

The other one is named the same, but is not the same thing. It's for the editor to use.

Sorry this is causing so many problems. I'm trying to get the devs to straighten it out.

Thanks for that, hope they fix it right away, hmmm, wonder how DICE managed all this..

Share this post


Link to post
Share on other sites

So, after picking myself up from the initial shock that ATI cards aren't currently supported (per [EA]pixelat3d) I attempted carrying out the tutorial on a laptop that had an nVidia card on it.

staticmesh.fx successfully loads on the laptop. However, where users were experiencing trouble getting the Technique radio button group to appear, I'm having trouble with the Static Mesh Parameters to appear. I've played around with the drop down button for Static Mesh Parameters, but nothing appears.

So this is where I'm currently stuck, and I wouldn't be able to setup the shaders for the scene without being able to specify the dds textures.

Is this a problem with my configuration in one way or another?

SETUP:

Maya, BF2, BF2Editor installed to default locations

cg1.2.1 installed.

<bf2>/maya/maya tools/scripts and /plugins copied to <maya>/scripts and <maya>/bin/plug-ins, with the ae*templates and cgfxshader* scripts also copied to <maya>/bin/plug-ins, and also /icons to <maya>/icons

Maya projects set to <bf2editor>/RawData

cgfxshader Maya node points to <bf2>/maya/cgfx6.0/staticmesh.fx

Share this post


Link to post
Share on other sites

To clarify what I was talking about in my previous post, see the screenshot below:

cgfxshader_staticmesh_marked.jpg

For some reason, the fields that I would enter the DDS textures in is not appearing.

Share this post


Link to post
Share on other sites

Is there any idea if / when the plugins will support Maya 7? I do not have access to Maya 6.01, and I am forced to use 3ds Max, which isn't bad just prefer Maya.

Share this post


Link to post
Share on other sites

Okay, so I've resorted to purchasing a Geforce card, and it works fine.

I'm sorry to confirm this for those that cannot afford to get a new card, and I hope EA will resolve this issue by the final release of the editor.

For those of you considering do the same thing as I have, I would recommend getting a Geforce 6800 card. It is a slight step up from my ATI Radeon 9800 Pro. I can run games with an increase in antialiasing, and some other features enabled as well.

I got an EVGA Geforce 6800 GT 256 mb AGP for 325 bones at Monarch Computer. You can get a decent Geforce 6800 256 for around 200-250, but even a 6800 128 mb should work with the bf2 editor, at less than 200 bucks. Look at www.pricewatch.com to find some good deals. I found newegg.com and Monarch Computer had the best deals.

Good luck all, and happy editing.

Share this post


Link to post
Share on other sites

So I've gone through the whole hassle of istalling the tools for maya and they won't work with my graphics card!!?!??!

Ooh I'm *SO* angry!

Are there any plans to make them ATI compatible?

Share this post


Link to post
Share on other sites

I still hope so :/

Cause I wont have a new graphicscard in like 12 months or so and then I've already bought a new one this year...tight

Share this post


Link to post
Share on other sites

I know they're working on it, but I don't know if it's possible. The problem is driver issues between Nvidia and ATI. They are Nvidia shaders, so it's as much a turf war between the two card manufacturers as it is anything else.

But still, like I said, they are trying.

Share this post


Link to post
Share on other sites

okay so i got that plugin to load in maya , now when i try to load the bunker.mb or that bunker03.mb (just to try if i can finaly load something in the editor)

i get this error

******* Import Error *******

******* C:Archivos de programaEA GAMESBattlefield 2bf2editor/rawdataObjectsStaticObjects_MyBase01My_BunkerMy_Bunker_03.log *******

export type not found, possible missing root_XXXXXXXX node in Maya scene

******* Import Completed *******

[Console] : Couldn't open console script "objects/staticobjects/_mybase01/my_bunker/my_bunker_03.con"

i tryed to load something i made in it and i get that same missing node error.

so cuz i just start out with all this i dont have any idea what to do right now.

Share this post


Link to post
Share on other sites

sounds like you don't have your root_StaticMesh node set up for the bunker. Read the tutorials again. It'll clarify stuff.

Or if you are so daring, try this:

In the Maya command line, type "DICE"

In the tool rack, click on Model

In the second part, there is a button called "Setup Heirarchy". You may want to check "Dummy Collision" this copies your visible geo and makes collision geo from it.

Before you do this though, make sure the geometry node name matches the filename, else this will not work.

Share this post


Link to post
Share on other sites
sounds like you don't have your root_StaticMesh node set up for the bunker.  Read the tutorials again. It'll clarify stuff.

Or if you are so daring, try this:

In the Maya command line, type "DICE"

In the tool rack, click on Model

In the second part, there is a button called "Setup Heirarchy". You may want to check "Dummy Collision" this copies your visible geo and makes collision geo from it.

Before you do this though, make sure the geometry node name matches the filename, else this will not work.

okay thanks, ive been reading those (will do them later when i have the time) and yeah it looks like i need to do some extra stuff.

aha looks like a great way to make those geos then, ill try that out also.

thanks

weard thing is that the bunker.mb file should be the finished file so it should import correctly but it gives me the not triangulated error ,looks like its not so finished if i read those tuts it will be those how you call those, cods? that should be triangulated.

so ive been trying to import this just for the sake of seeing the import work.

ill make sure to answer here when it does. :)

thanks for answering .

as im new to this i most likely will have some more questions lateron :)

Share this post


Link to post
Share on other sites

okay for the ones that where not able to install it i made this explanation on how i did it ,i dont say it will work for everyone but it did for me.

the lines wit the ***something*** are the ones i edited in the rest is just

copied from the ones allraidy in this thread.

***first uninstall all other versions of maya first i also deleted thru regedit the registers from maya also its dirs

like this you get a total clean install***

reinstall maya 6.0 default location.

install maya upgrade 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

***used my defauld install dir not the one below***

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

***edit, here i had some extra lines and allraidy had these 2 in there as well

so i left it as it was***

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

*** here i had more then one maya lines allraidy because of the other versions i deleted those first (make sure you only delete the maya strings)

then i added the ones below (you should change this directorys to the directorys youve installed maya so i used the defaults C:program filesAliasMaya6.0 ).***

C:GraphicsMaya6.0bin;

Then create a User Variable by clicking on new

Fill in the 2 fields with the following

Variable name: MAYA_LOCATION

***again used the defauld install dirs instaid of the ones below***

Variable value: C:GraphicsMaya6.0

click ok, ok

***Now i tryed to loadup maya and the plugin but hey it wasnt even there (the plugin) sooooo i did 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)

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

***okay so after combining the 2 tutorials i got it to work.***

Click on autoload and load for cgfxshader.mll only

Ingore the other 2 plugins because 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.

***now on a side note i had to reinstall bf2 and the editor after this but i think its something i did before trying all this as bf2 didnt load anymore.so if bf2 doesnt work just reinstall it and the 1.03 patch***

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

×