Chicken, an Egg exporter for Blender 2.49 and lower

well i would need to force it to static mode only and i need to set vertex-colors (the alpha value to 255). so i need to change the exporter anyway. since it’s only a custom solution for my project i dont need more than a working code (and so i’ll stick with the modified 1.0c)
but thanks for the offer :slight_smile:

Well, as I said in my edit this is already implemented in the SVN trunk, and I insist that it will be much cleaner this way. If all you need is the vertex color alpha capped at 255 changing a line on that is not going to set you back much. And I don’t see why you need to force static mode when that is determined by whether or not your selection has armature modifiers.

I also simplified the installation procedure a whole lot. I made a script called build-release, that makes a .zip file out of an SVN checkout. You just call ‘python build-release.py [version]’ and it’ll make a chicken_export[version].zip for you (e.g. version = SVN ==> chicken_exportSVN.zip), then you just unzip this in your scripts directory like you would any other Chicken release and it doesn’t disturb other versions you have (except maybe the PandaPath in Windows).

If you don’t want to use it, no problem. But I’m pretty sure it would be really simple to make your code work correctly with it. And you’ll gain the benefit of abstraction and easy integration with future Chicken versions.

abstraction … easy integration… … well if i could programm a little bit better… than maybe^^ and since it already works correctly =) no way to make it working easyer :stuck_out_tongue:. well if others wanna use it i might switch over to the newer version but for now it’s ok =)

well well another nice thing is coming our way :slight_smile:
blender.org/cms/Multiple_UV_ … 837.0.html
multiple uv-set’s per material in the upcoming blender version.
since egg&panda supports them to it would be quite nice to make them export-able,too.
aside from smaller things this would allow nice,lightmapped levels when used with blenders new render to texture function :slight_smile:
would be a big step towards high-quality grafics.
so psiberpunk, please have a look at it =)
note:python api should be up-to-date already.

Thanks for the heads-up, I’ll definitely look into that.

Also I’ll take this opportunity to mention the new features that are already in SVN.
-Added support for saving and loading export settings inside a .blend file.
-Modified Background export mode accordingly, so now it’s simpler to use.
-Updated chicken_interface module so it completely supports the new implementation.
Note: all these features require the pprint Python module which is not included in the bundled Python in Windows, but you can use them if you have a separate Python 2.4 install (no such problems in Linux). If you don’t have the module installed you won’t see a save button in the GUI and importing the chicken_interface module will raise an ImportError and print a message.

Also I’m currently working on:
-Adding support for exporting Shape Keys (a.k.a. Morph Targets) and animations that use them.
-Improving scene analysis and reporting of possible issues before export so users won’t have to refer to the manual to figure out what went wrong with their model.

I added support for multiple UV channels in the latest SVN revision. It’s disabled by default because the latest Blender release candidates wrongly report their version as 242 so I can’t discriminate automatically. To enable it, edit the script so it sets the MULTI_UV_SUPPORT variable to True instead of False (line 67).
Also there are some slight details: The Python API doesn’t have access to the field that indicates which UV channel a texture is mapped to, so Chicken exports all textures as using the default UV channel. Chicken considers the default to be the one named ‘UVTex’ (because that’s the Blender default). This channel gets exported without a name, because that’s the default for egg files.
If you want a texture to use a specific uv set, you’ll have to add this to the definition by hand:

<Scalar> uv-name { <my-uv-name> }

without the angle brackets around the name obviously

I’ve put this version as a packaged zip file in the sourceforge download section if you wish to try it out [link].

Greetings all!

I’ve started using Chicken for all my blender export needs. It’s very cool!

I’ve run into one difficulty with it, as far as I can tell. I’m running blender on Mac OSX, and I don’t see how to export textures on my model. My Chicken interface doesn’t look like the one shown in the help file:

Does anyone have any insight as to what might be wrong?

-Mark

As far as I know Chicken supports UV textures.
Just apply UV textures to it and export. The textures are automatically included.

Ah, I see it now. Thank you!

I had been using image textures via the “Links and Materials” system, not the UV textures. A quick modification solved that problem.

I am still confused, however, as to why my interface doesn’t look like the one in the documentation. Any ideas?

-Mark

the interface it ok. it automatically adapts to what you want to export. seems like you exported a static models. if you export one with armature and animations the interface will automatically change and provide fields for animation-specific exporting.

A couple of questions about the chicken exporter.

#1 Does it support contraints on the armatures it exports with the mesh from blender.

#2 What exactly is an ObjectType? I read the part about how to export ObjectType in the chicken manual using the properties box in the real time engine screen in blender. ObjectTypes are mentioned in the panda manual but the manual never actually says what they are.

#1 Yes it does, but obviously the constraints only work if the constraint target is a bone in the armature. If the target is an external object, the effect is not exported even if the object is also selected for export.

#2 An ObjectType is a shortcut or alias for an arbitrary block of .egg syntax. These aliases are defined in your Confauto.prc and Config.prc files. For example, one of the aliases is “sphere” which takes the geometry and replaces it with a collision volume defined by its bounding sphere. You can also define your own aliases and use them with Chicken.

Great program!
But uehrm… would it be hard to create a function to export modifiers?
I have a wave modifier, and i want to export it, and pview says i don’t have an animation.

wave modifiers modifies the verticex position. so you would have to use pandas morph animations things. i dont think the current chicken version supports this animation already.
… i think… if you know what to do… it’s not that hard :stuck_out_tongue:
it is possible, that’s for sure=)

@ThomasEgi: and even if it wasn’t possible to export that, you can script something in chicken that converts the wave animation to a normal animation before exporting.

If I could query the effects that a modifier produces on a mesh via Blender’s Python interface it would be possible, but unfortunately it’s not. So, I’m afraid that it’s not a feature that Chicken will have any time soon; not until Blender’s Python interface is much improved.

Is this a bug:
discourse.panda3d.org/viewtopic.php?t=2415
(last post)

bump

Sorry for taking so long to respond. I’ve been busy with other stuff, but these last few days I’ve gotten back to working on Chicken.
I looked into this bug, and I’m pretty baffled by it. As you said in the thread, the models look fine in pview but inanimate parts disappear when loading through the actor interface. This makes me think that it actually is a bug in the Actor class, but maybe I’m doing something wrong and pview “fixes” it for me.
Anyway, David’s theory on why it could be failing isn’t what’s happening because the inanimate parts aren’t assigned any pseudo-joints by Chicken. That is, Chicken only exports joints that exist in Blender and doesn’t create any of its own.

I suppose the solution I could offer is to make it so inanimate objects that are exported with animated ones are assigned fake joints that remain static.
However, right now I’m working on pretty large changes like switching to using Panda’s own Egg library to construct the Egg files; which will bring Chicken more in line with the exporters for other tools, and possibly speed it up a bit more. I’m afraid it’ll have to wait until after that.

Or maybe we can get David to explain what the problem might be. Perhaps you could send him your egg files so he can check out why the Actor class dismisses the inanimate object.

Blender 2.44 is out!

The bad news (for Windows users only): Blender 2.44 is compiled against Python 2.5. For Linux there are Python 2.4 and 2.5 binaries.

This means if you are on Windows and don’t have a standard Python 2.5 installation some scripts won’t work. One of these scripts seems to be chicken :frowning:

Hmm… perhaps it is time to upgrade to Python 2.5.1.
enn0x

@drwr or yosh: any chance than one of the next Panda3D releases will use Python 2.5 too?