Chicken Logo                     SourceForge.net Logo

This is the documentation for Chicken R66. The latest version of the script can be found at http://sourceforge.net/projects/chicken-export/

1.Introduction
2.Basic Features and Usage
3.Advanced Features - Blender settings that affect your output
    3.1 Exporting double-sided faces
    3.2 Exporting groups within geometry
    3.3 Exporting multiple Actions at once
    3.4 Exporting a texture with an alpha channel
    3.5 Exporting vertex colors for a model that also has UV coordinates
    3.6 Exporting ObjectType flags or Tags for your objects
    3.7 Exporting in Background Mode (for batch processing)
    3.8 Using Motion Extraction
    3.9 Curve Support
    3.10 Texture Options
    3.11 Normal map support
    3.12 Empty Objects
    3.13 Instancing
    3.14 Octree Support
5.Further Notes
5.Caveats
6.Version History

1. Introduction
    Chicken is a script for Blender that allows you to export pretty much any kind of mesh-based scene to Panda3D's Egg format. It supports static models whether in a hierarchy or not, with various characteristics such as: vertex colors, UV coordinates, vertex or face normals (smooth or solid shading), materials, textures, including multitexturing. It also supports armature animated meshes. The only limitation is that you're only allowed to export one armature at a time. You can export any number of animations with their own framerate, frame range and name; you can even define an animation to export in reverse by making the start > end.  It also allows you to automatically invoke tools such as egg-optchar to optimize your character and animations, egg2bam to produce binary representations, and pview to preview the in-engine result of your models and animations. Many further features are avaliable.
    In the following sections I'll address all these features and more.

2.Basic Features and Usage
    Using Chicken to export basic scenes is very simple. Here is an overview of  the UI: (An old version, but its mostly the same as the current version.)


    As you can see, the first thing below the title tells you what kind of objects Chicken has detected among your selection. Note that Chicken doesn't provide a selection UI because in my opinion Blender can do that so much better. For this reason I recommend having a side panel  in Outliner mode for the Current Scene. This last detail is important because Chicken will only export selected objects in the Current Scene.
    Remember to press the Update Selection button if you wish the exporter to consider changes you've made to it via the Outliner or other means.

    In the screenshot, the exporter is in Character Export Mode, which is the most complex and displays most possible options. The possible modes and the conditions that define them are as follows:
    Right below the Status/Update Selection bar is an input box where you can type in the path to the file you wish to export or use the Select button for a File Selector window. Don't worry about the extension; Chicken will take care of that for you. By default the Export File will be the same path as your .blend file but with the .egg extension.
    If you are in one of the Character Export modes you'll see the animation section below that. In this section you can add strips that define an fps value, start/end frames, and a name using the Add Animation button which will be at the bottom of the animation list. You can also delete any strip using the Delete button at its right side.



    By default, when you select a character you'll get one strip named 'anim' with the fps value set in your render panel, and the starting and end frames you've set in your sequence editor. When you export the animation the object exported will be updated with a hidden tag in blender that contains the animation details - when you next load the exporter the animation details will be restored. Just remember that this only happens on export so you must save the .blend file after exporting any edited animation if you want the data to persist for when you next open the file.
    Default behaviour is single file mode, and all animations are stored in the mesh file with the name given in the interface. Using a single file rather than panda's more typical multi-file usage is identical, except you don't have to also provide the animation files when loading the mesh, and the animation name is set at export time rather than run time. However, by disabling the single file option you can get multi-file mode. Each one animation will then get its own file named according to the following convention: [name]-[animname].egg, where [name] is your export file without the extension and [animname] is what you specified in the strip. Note that the animations are produced by evaluating the armature's pose for each frame in the range, so the result depends on whether you have an Action linked to your Armature and/or whether NLA(Non Linear Animation) is the active animation system. Armature constraints will not be exported but will be evaluated and their effect included in the animation.
    The Motion Extraction button will only appear if your Armature contains a bone named SyntheticRootBone. This feature will be explained in detail in Advanced Features but, in a nutshell, it enables you to make, for instance, walk-cycles where the feet don't slip as the character walks. See the test model and the included script, which you can obtain from http://downloads.sourceforge.net/chicken-export/test-modelR42.zip.zip
    If single file mode is disabled and you toggle Animation Only on, the .egg file containing the mesh and armature will not be exported. This can speed things up considerably if you've already exported that part.
    At the bottom of the window you'll find the following:



    The PandaPath no longer exists (Must update screen shots.), having been moved to the first run setup interface.
    The three toggle buttons in the middle indicate whether to call the tool they state. There's also an input box for additional parameters in the case of egg-optchar. The option to invoke this last tool obviously does not appear if you are not exporting a character.

3.Advanced Features - Blender settings that affect your output
   
In this section I'll address some not-so-common things you might want to do, and how to accomplish them with Blender settings that Chicken will take into account.
4.Further Notes
5.Caveats
6. Version History