Conversion/viewing error

While converting from maya85 to .egg there were a few errors but the .egg file was created successfully. I have tried to load the egg file & the game runs showing the environment but my model is nowhere to be found - can any 1 suggest something plz…

Thought the model scaling might be out, so I’ve played around with the scaling but still can’t see the model in game


conversion errors:

Initializing Maya.
‘import site’ failed; use -v for traceback
ImportError: No module named maya.app.python
ImportError: No module named maya.app.python
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
ImportError: No module named maya.app.startup.batch
Writing /c/Panda3D-1.4.2/bin/Trob.egg


script:

import direct.directbase.DirectStart
from pandac.PandaModules import *
from direct.interval.IntervalGlobal import *

#Load the first environment model
environ = loader.loadModel(“models/environment”)
environ.reparentTo(render)
environ.setScale(0.25,0.25,0.25)
environ.setPos(-8,42,0)

import sys,os
from pandac.PandaModules import Filename

get the location of the ‘py’ file I’m running:

mydir = os.path.abspath(sys.path[0])

convert that to panda’s unix-style notation

mydir = Filename.fromOsSpecific(mydir).getFullpath()

now load the model

Trob = loader.loadModel(mydir + “/models/Trob.egg”)

Trob.reparentTo(render)
Trob.setScale(0.25,0.25,0.25)
environ.setPos(-8,42,0)
Trob.detachNode()
run()

First examine the egg file to ensure that it contains entries. If it does, use pview to view the egg file and ensure that the model is there. Try pressing “c” to center to view on your model.

If you can see the model in pview, especially after you press “c”, it might have some strange origin or scale, making it off-camera in your world.

David

Yes, I was able to view the models in pview.

I also loaded in ‘skeletons.mb’ one of the maya8.5 tutorial models - it’s quite large & fleshy in colour, so it would be easy to notice in game but I couldnt find it! I zoomed out of the environment but it’s nowhere to be found.

This is what I get when running the game, note: Aux display modules not yet loaded?

I looked on the forum & it seems to be a graphics driver/directx problem? but there are no further warnings for myself unlike others - & loaded environments are viewable, so i don’t think it’s that…

C:\Panda3D-1.4.2\test>ppython t.py
DirectStart: Starting the game.
Warning: DirectNotify: category ‘Interval’ already exists
Known pipe types:
wglGraphicsPipe
(3 aux display modules not yet loaded.)
:util(warning): Adjusting global clock’s real time by 0.881047 seconds.
:util(warning): Adjusting global clock’s real time by -1.42401 seconds.

& here is the code refering to skeletons.egg

import direct.directbase.DirectStart
from pandac.PandaModules import *
from direct.interval.IntervalGlobal import *

#Load the first environment model
environ = loader.loadModel(“models/environment”)
environ.reparentTo(render)
environ.setScale(0.25,0.25,0.25)
environ.setPos(-8,42,0)

import sys,os
from pandac.PandaModules import Filename

get the location of the ‘py’ file I’m running:

mydir = os.path.abspath(sys.path[0])

convert that to panda’s unix-style notation

mydir = Filename.fromOsSpecific(mydir).getFullpath()

now load the model

skeletons = loader.loadModel(mydir + “/models/skeletons.egg”)

skeletons.reparentTo(render)
skeletons.setScale(0.40,0.40,0.25)
environ.setPos(-8,42,0)
skeletons.detachNode()
run()

“Aux display modules not yet loaded” means nothing. It’s a normal message during startup.

If you can see the model in pview, it must be there in-game also. Examine your code carefully to ensure you are parenting the model to render and so on. Also check the bounding volume of the model in pview, I believe it is shift-B; this will give you a clue if it is very large or very small, or not centered on the origin.

David

Thanks again David,

I’ve loaded two different models into pview & here’s what i get…

Model1:

Loading chair2.egg
bsphere, c (-0.889051 0.898362 1.63201), r 4.45642
bsphere, c (-0.889051 0.898362 1.63201), r 4.45642
1056 frames in 21.7813 seconds.
48.4819 fps average (20.6263ms)

Model2:

Loading skeletons.egg
bsphere, c (0 -0.175529 8.99151), r 12.9191
1213 frames in 24.9058 seconds.
48.7034 fps average (20.5324ms)

I believe i’m parenting the model to render with this code…right?
I’ve played with the setscale variables & the setpos variables but no joy…

skeletons.reparentTo(render)
skeletons.setScale(0.40,0.40,0.25)
environ.setPos(-8,42,0)
skeletons.detachNode()
run()

Oooook, I fixed it by removing the .detachnode()

happy days :smiley: