Exporting from Maya to Panda

Hi everyone, I’m new to both Panda and Maya, but I have been reading the Panda manual, and when I create an egg file of a Maya scene and render it in Panda, I get a white model (no texture at all) and sometimes not even the whole model (some parts of it are absent in the Panda version). Of course I have been following the instructions and have been only using Phong in Maya, and a picture texture, just as the guide orders.

I’m using the graphical MayaPandaTool, as the command line version doesn’t work for me.

I’d appreciate any help I can get.

Thanks!

Sometimes people have trouble with the paths to their textures. Take a look in the egg file. The first few lines will normally contain all of the texture references in the egg file. Are your textures listed, and are the paths correct? If they appear to be correct, then when you load the egg file, do you see any error messages about missing or unreadable texture files?

David

Sorry for the noob question, but how do I " take a look in the egg file"? I mean, I can open it with my editor, is that what you mean? If so, everything looks correct in there. Also, no error messages whatsoever when I execute my program. Sometimes I get lucky and half model appears with no textures or colors or whatever. At other times it doesn’t show up at all. Is there an easier way to convert from Maya? Maybe I should try another program?

Yes, you can open it up in an editor–it’s just a text file. I really don’t understand what you mean when you say it works “sometimes”.

The most reliable way to convert Maya to egg is to use the command-line tool, because that gives you full control over all of the options. In what way does that not work for you? It must work, because the graphical plugin is really just invoking the command-line tool in the background.

Can you email me your egg file and textures so I can see what you’re talking about?

David

Well, look under the entry in the .egg file, does it point to the correct path? (The paths must be in Panda-filename-syntax, discussed here:)
panda3d.org/manual/index.php/Loadi … ame_Syntax

Also, make sure that at loading time, that path is still correct. (e.g. either absolute or relative from the dir where you view the model)

EDIT: drwr beat me to it

OK, I’ve received three egg files, thanks. There are different problems in all of them.

In 2.egg, there are no texture references.

In 3.egg, there is a texture reference, but the filename appears to contain international characters, which are not supported by Panda on all platforms (though it might or might not work on your particular platform). Still, please limit the filename to the standard ASCII character set for maximum portability.

In 4.egg, there is an apparently valid texture reference to a file in another directory (I’ll have to assume the texture actually exists).

All three egg files contain NURBS geometry, which is not directly supported by Panda. You can triangulate it within Maya before you convert it. Or, if you use the maya2egg command-line tool, use the -p parameter to triangulate it automatically. (The graphical plugin really should supply this parameter by default, but it doesn’t.) Or, you can use the command-line tool egg-qtess to triangulate it afterward.

David

Thanks. I tried what you say, doesn’t work for me. Maybe I’ll try Blender or something. Thanks again for all the help.

As you wish. It seems like you really are close, though.

David

Ok, when I use the command line for maya2egg2008 I get the following:

Initializing Maya.
‘import site’ failed; use -v for traceback
ImportError: No module named maya.app.python
Invalid Python Environment: Python is unable to find Maya’s Python modules
Python Evironment:
PYTHONHOME not set!
ImportError: No module named site
Python cannot find site module!
Python cannot find sys module!
ImportError: No module named maya.app.python
Invalid Python Environment: Python is unable to find Maya’s Python modules
Python Evironment:
PYTHONHOME not set!
ImportError: No module named site
Python cannot find site module!
Python cannot find sys module!
ImportError: No module named maya
ImportError: No module named maya.cmds
ImportError: No module named maya.utils
ImportError: No module named maya.mel
ImportError: No module named maya.app
Invalid Python Environment: Python is unable to find Maya’s Python modules
Python Evironment:
PYTHONHOME not set!
ImportError: No module named site
Python cannot find site module!
Search path (sys.path):
D:\Program Files\Maya 2008\scripts\fur
D:\Panda3D-1.5.4\bin\python25.zip
.\DLLs
.\lib
.\lib\plat-win
.\lib\lib-tk
D:\Panda3D-1.5.4\bin
ImportError: No module named maya.app.startup.batch
Writing /c/Users/user/Documents/maya/projects/MayaBasics/scenes/5.egg

It does create an egg file. However, when I try to use ‘maya2egg2008 -p filename.egg’, I get the messege from above, minus the last line, plus the following:

5.egg: (kFailure): Unexpected Internal Failure
:maya:mayaegg(error): Unable to read 2.egg
Errors in conversion.

Anyone has any idea what to do? I’m really seperate at the moment, thanks.

The command ‘maya2egg2008 -p filename.egg’ is asking maya to read filename.egg as if it were a Maya file. That’s surely not what you meant.

You want something more like ‘maya2egg2008 -p -o filename.egg input.mb’.

You can issue the command ‘maya2egg2008 -h’ to get a complete list of available command-line options.

David

OK Thanks! That works finally.

There’s a lot of work to be done but at least now I can do something. Thanks for all the help. I really appreciate it!

The future 1.6.1 release will contain a version of MayaPandaTool.mel that sets the -p flag by default (thanks David). If you want it now, go here:
panda3d.cvs.sourceforge.net/view … iew=markup
And hit the Download button to download that file.