No matter which content creation tools our artists are using, we can be sure that these programs have different ways of displaying models than the Panda3D engine. This can be quite annoying for artists to work with, as they would have to export their work and wait for the game assets to be repackaged. Then they would have to start the game and load the model, just to check what it looks like in the game. This is not what we want to happen.
Instead, we want to have a little application that allows artists to quickly load a model so they can preview how Panda3D displays their work. Luckily, we do not need to write this program ourselves, as the Panda3D developers already implemented a little tool called Pview
for this situation. This recipe will give you a short introduction to this tool.
Let's explore the features of the Pview
tool:
pview l panda panda-walk
While operating, the tool does not need any further explanation; we should take a quick look at the command line parameters that we used to start the program. The -l
option makes Pview
load the model data asynchronously, which means that the window appears immediately, and the model will be visible after a short loading delay. The first argument after this option is the model or actor to preview, which is mandatory. Optionally, as we do in this recipe, the second argument is the name of an .egg
or .bam
file containing animation data. Pview
will load the first animation it finds contained within that .egg or .bam
file and then begin playing the animation in a continuous loop.