Chicken, an Egg exporter for Blender 2.49 and lower

I read earlier in the thread that support for morph targets was being considered for Chicken. Has that been added?

Thanks!

I’d started work on it, but since no one expressed interest in it and it seemed kind of troublesome I dropped it. Not to mention I haven’t really used Shape Keys in Blender myself, so I didn’t have a sample input I could use to test the code as I went.

If you are interested in this feature I guess I can give it a try, especially if you can provide me with a sample .blend file I can use to test it.

Sure, give me a day or so and I can send you an example. That would be very much appreciated!

I need some help with the chicken exporter. I’m sorry if the following questions have been answered previously or are in the help document (which i’m not sure where to find) it is 3am.

Anyway, first problem is when i try to export an animated model, chicken keeps reading it as a static mesh, now i used parent to bone animation method and i read that doesn’t work… Well i’m really disappointed as that’s the way i’ve been animating and the only way that I know how. So is there any chance of it being supported? If not, what is the correct way? I hope to god it’s easier.

Second problem is when i export any model does that model have to be in C/Panda/Models? How can i change the path? I know this is a panda matter. Anyway i have my model in there and my texture in the maps folder, but still the texture never shows up… What am i doing wrong? What’s the correct way to export with UV mapped textures?

That’s all folks :0. Again sorry if these are answered previously. If someone could help me out that’d be smashing!

Well, the manual is supposed to open up in your web browser when you push the help button on Chicken’s user interface, although depending on your platform and configuration it might not work. The file is in your Blender scripts directory (the directory you decompressed Chicken in) as “bpydata/chicken/doc.html”

As for your question about animations, you have to add an Armature modifier to your mesh, and fill in the Armature field with your armature’s name. You might have to unparent your armature from your mesh otherwise the effect of the animations will be doubled (although it should export properly anyway, but it’ll look horrible in Blender). Clearing your mesh’s parent is done by selecting it and pressing Alt-P.

Regarding your second question I think you have to edit your Config.prc file to add another model path. That should be under the etc subdirectory in your panda directory.

Yeah, as i noticed after posting :.

Ahh i see! I didn’t know you could animate like that, it’s actually quite nice except it does go weird… So first i add an armature modifier to the mesh, then animate then export. What about naming the animations? I see it allows you to select certain keyframes, does that mean it will save those animations in another .egg file? Or just means that i can call the animation in Panda from the same .egg as the model?

What about exporting with UV mapped textures?

The problem:
The script doesnt work on osx, because blender uses python 2.3.

The solution:
Add this code snipplet at the beginning of chicken_export1.0.py (just before “import Blender”)

from sets import Set as set

I have only tested it with textured box…

is there any chance you can make this work? this would save a hell lot of work. especialy if it comes to keeping the feets on the floor not sliding around due to interpolation errors of ipo curves…
pleeeaaase… i tried myself but i’m not all to deep into the blender api

I guess I’d have to give it some thought, but last time I explored that issue it was looking pretty complex. Basically the problem is that I get the matrices that include constraint effects from a function that places the armature in its appropriate pose for each frame, but that doesn’t set the whole scene at its correct state for that frame therefore constraints depending on objects are stuck in the current frame. There is a way to change the scene frame, but it only works when the 3D view is visible, which is usually not the case when you launch a script with a GUI like Chicken. To make things worse, the API doesn’t let me force it to be visible or even query whether it is visible or not so I can warn the user to make it so.

Perhaps the API has improved in the latest releases but I’d have to take a deeper look.
It’s also been really long since I last took a crack at working on Chicken… I’ll probably get an irresistible urge to tear it to shreds and rewrite like half of it.

Well, apparently in Blender 2.45 they fixed that annoying problem with setting the current frame not having effect if the 3D view wasn’t visible so there is hope yet for this feature. Perhaps this weekend I’ll give it a crack.

It’s been brought to my attention by fellow forum member Sanne, that there is (and has been from at least version 2.42) a function in the Blender Python interface to access the raw mesh data generated by modifiers, and object types such as Text, Nurbs, etc. This has motivated me to dedicate some time to a new Chicken release. However, when reviewing the code I realized I am deeply dissatisfied with it. That, and the fact that it was “good enough” caused me to lose interest in it.

In light of this, I’m planning a rewrite of Chicken which would probably only contain bits and pieces of the current code.Anyway the features I’ve come up with for Chicken 2.0 are the following:
-All the features of 1.0 of course, however some features may change in how they are implemented and used.
-Support for exporting shape keys into morph targets
-Support for baking an animation into morph targets (vertex animation)
-Support for modifiers other than Armature.
-Support for exporting objects that are not meshes, such as NURBS, Text, etc.
-Support for IPO animations
-Increased modularity for easier extensibility, and partial use by other scripts.
-Redesigned user interface: prettier, less cluttered, more informative, more functional.

If any of you want a feature that’s not listed there now is the time to ask for it :slight_smile:

I would very much welcome having these features

feature unit tests :slight_smile:

I can see how feature unit tests are good software practice, but why would a user want them? Do you mean as examples of what can be exported?

hey that would help too! I am still at a loss how to export existing mesh with bones. I dont want animations i just want to move the bones around.

Have you seen the test model that can be downloaded from the Sourceforge site? Here’s the link: http://downloads.sourceforge.net/chicken-export/test-model.zip?modtime=1161456557&big_mirror=0

That might help you figure things out.

Congrats on the Exporter V1, I hope V2 lives up to your hopes. Seeing how the first one worked, you clearly have the skills to get the V2 done and done well.

Good luck and support from me! :smiley:

hm… i talked with the guys at #blendercoders a little. cause using external targets for ik-solvers where not reported correctly to the python-api.
if you can look at this too. so one can use externaltargets for ik-solvers in animations :slight_smile:
this would be my N1 feature request since it helps a LOT when animate characters.

I have had the chicken exporter on my machine for years now but just have never used it. I tend to go back and forth with using panda then stop for a while then start using it again. In any case, here are three questionst that occured to me when I first downloaded it years ago.

#1 What is a “tag”
#2 What is a “type”
#3 What is a “group”

These questions come from reading the documentation that comes with the chicken exporter. I tried to deduce what these were by then reading that .pdf file of the panda3d docs that I printed out a couple of years ago. But even that docuement really did not explain these terms very well.

Can anyone help me.

I also have a question that came up when I read the chicken documentation about “StrideRootBone” But I need to read it again to see if maybe the answer will occure to me if i read it just one more time.

Thanks in Advance.

@dustbin1_uk: Thanks for the vote of confidence :slight_smile: I’ll definitely do my best.

@ThomasEgi: I think this will come naturally from the way I’ll be doing things with 2.0 which is now possible thanks to some bugs that have been corrected in recent Blender versions.

@Shaba1:
Groups, if I remember correctly, get translated quite directly into PandaNodes inside Panda. As the name implies they contain a group of polygons. They can be processed with egg-optchar to make them accessible from within Panda so you can, for instance, change the group’s material at runtime.

A tag is a string attached to a group. You can later retrieve this string from within Panda and do with it what you will.

By type, you probably mean object type. Object types are aliases for arbitrary egg file syntax. The default object types are defined in your Confauto.prc file or you can define your own in your Config.prc. With object types you can flag an object so that they are processed in special ways, e.g. as a collision mesh.

You probably mean SyntheticRootBone there instead of StrideRootBone. When Chicken detects a bone with that name it offers you the option to do motion extraction. What this does is that it exports the animation relative to the position of this bone instead of relative to the object’s origin (normal mode). It also exports the frame by frame displacements of this special root bone in its animation channel. What this allows is for animations such as walking to be created inside Blender with real displacement (not walking in place) and then extracting this displacement and applying it to the object within Panda. This can help remove the artifact of sliding feet by allowing the frame by frame displacement to be variable instead of constant (your character will not move at a constant speed).
To see an example of how to process this information in Panda and apply it to an object see the Test Model link I posted a couple of posts up. The script was written a long time ago so it might not work with current versions of Panda without some minor changes but it should be sufficiently helpful I think.
NOTE: If you run egg-optchar on a character that has a SyntheticRootBone it will get culled, and you will lose its special information, unless you specify to keep it.

PS: I don’t think you’ve had Chicken for years since it’s only slightly more than a year old. Unless you have some mysterious time-traveling version of it :smiley: