Panda FAQ
Note: Many of these issues came up as a result of issues that popped up in the Building Virtual Worlds class. The class uses Maya 6.0 for modelling.
Q: I have a bunch of Maya Animations of one model in different mb files. I used maya2egg6 to port them into panda, but only one of the animations work.
A: The key is to use the -cn <character's name> flag in maya2egg6 for every file. This ensures that the files work together.
Lets say you are making an animated dog.
You have the following animations:
dog-walk.mb
dog-sit.mb
dog-run.mb
To convert these into panda, you would call
maya2egg6 dog-walk.mb -a model -cn dog -o dog-model.egg
Note, we can grab the model from any of the animations, as long as they are all using the exact same rig
maya2egg6 dog-walk.mb -a chan -cn dog -o dog-walk.egg
maya2egg6 dog-sit.mb -a chan -cn dog -o dog-sit.egg
maya2egg6 dog-run.mb -a chan -cn dog -o dog-run.egg
Q: I'm using the lookAt function on a nodepath to point it at another object. It works fine until I point upwards, and then it starts to spin my object around randomly
A: lookAt works as long as you aren't telling it to look in the direction of its up vector. Luckily, you can specify the up vector as the second argument.
lookAt(object,Vec3(0,0,1))
Q: I'm building a 3d game, and I have a huge world. When my world starts up, the program hangs for a few seconds the first time I look around. Is there any way to avoid this?
A: The problem is that panda can a while to prepare objects to be rendered. Ideally, you don't want this to happen the first time you see an object. You can offload the wait time to the beginning by calling:
#self.myWorld is a nodepath that contains a ton of objects
self.myWorld.prepareScene(base.win.getGsg())
#This will walk through the scene graph, starting at
#self.myWorld, and prepare each object for rendering.
Q: Is there a way to hide the mouse pointer so that it doesn't show up on my screen?
A: You can change to properties of the panda window so that it doesn't show the cursor:
props = WindowProperties()
props.setCursorHidden(True)
base.win.requestProperties(props)
|