Panda3D Manual: Converting from Blender
<<prev | top | next>> |
Currently, there are two ways to get data from Blender into Panda3D. The first option is the currently recommended path. ## Option 1: The "X" File format There exists a free plugin for Blender that can export "X" (DirectX native) file format. Save the file from blender as an X file, then load it directly into Panda3D, which can read X file format. Alternately, if you're concerned about long load times (panda has to translate the file at load time), then pre-convert the model from X to Egg to Bam using the conversion programs supplied with Panda3D (x2egg, egg2bam). Whenever you save a model in a non-native file format, you need to ask yourself: "does this file format support everything I need?" For example, when you save out a model in 3DS file format, you automatically lose all bone and animation data, because the 3DS file format doesn't contain bone and animation data. In the case of the X file format, you're in good shape: it's a fairly powerful file format, supporting vertices and triangles, bones and animation. Note however, when an animated X file is converted to egg, the resulting egg file only plays the keyframes, but not whats supposed to be in between. For example, an animation could exist that should spawn 200 frames, gets sized down to about 40, and playback looks shakey. This shakeyness happens because the X file format supports the concept of keyframes, with implicit frames interpolated between them. The egg file format is explicit. An egg file must give all of the frames of an animation, even the frames that appear between "keyframes". Therefore, a run of x2egg with an X file that omits a lot of frames between keyframes, will product a shakey animation. The only solution is to ensure your X files are generated with all frames. Testing of different X file exporters may be required. Further, panda's native egg file format supports some esoteric things. For example, it supports blend targets (morph animations) and motion path curves, which are not supported by the X file format. Caution: it has recently been discovered that there are two bugs in panda's X-file parser. One, it is case-sensitive and it should not be. Two, it does not handle hyphens in identifiers correctly. These two bugs will be fixed in an upcoming version of Panda3D. For information on temporary workarounds, search the forums. ## Option 2: The Egg export Plugin for Blender One of our users is developing a Panda3D plugin for Blender. At the time of this writing, it is not fully operational, but the author hopes to complete it soon. Perhaps by the time you read this, he will have finished it. Currently, it claims to support static meshes, but not animations. You can download it from http://xoomer.virgilio.it/glabro1/panda.html.
<<prev | top | next>> |