Can't output blender to egg

I’m new to 3d modeling and am trying to create a simple character that I can use in my game. I created a char following a tutorial on the blender wiki. I created a simple animation wave. When I try to export it to egg it exports it as a static mesh instead of a animated character. I made sure the envelopes button was unselected. I have no clue what is wrong. Here is a link to my blender file if anyone has time to help me out. http://www.allinfunmagic.com/myguy.blend

Thanks in advance for any help.

hehe i strugged with the same thing today … i am also waiting for a resolution.

Yeah. Probably the problem lies with the fact that Chicken currently only supports the “Armature Modifier” to apply armatures to models, not any other way. I’ve had to struggle with that a lot as well.

Oh, make sure you select both the armature and mesh when exporting.

I do beleave I am using the armature modifier, and I made sure I used the vertex option and not envelopes. I selected both armature and the mesh. But it still exports as a static model. By the way I am a completely new to modeling, so I could be doing a million things wrong.

Ok, I think I figured it out. I had a subsurf modifier, that I hadn’t applied. Once I hit Apply on the sub surf it exports as a character. hopefully it will work now. Now to figure out why my guy is white :cry:

Solved :Adding some light fixed the white problem :wink:

I just wanted to clarify, that whatever limitations are in Chicken are quite often actually limitations in Blender’s Python interface. About the only thing that could be done that I did not add to Chicken is support for morph targets.

Support for accessing the effects of other modifiers aside from the Armature is non existent in Blender.
I’d have to do more work on Blender than on Chicken to get that to work… and wait a whole lot for them to approve my patches (I’ve already tried this, to add some experimental support for Nurbs Curves, they took like 2 months to even look at my patch).

As a side note: you don’t need to select the armature before exporting. Chicken detects the Armature by itself via the modifier on the mesh you selected.

Now that i’v made sure my modifiers are applied it seems to work great for me. Now if I could just learn how to make a good character I would be all set. This is a great tool and thank you very much for creating it.

Have a look at the Blender Python API function Mesh.getFromObject(), you can get vertex data from another object with modifiers applied.

Heh, I’m feeling pretty silly right now… Looking into it, that function has been there since at least 2.42. I can’t believe I had missed that.
This might merit adding new features to Chicken and making a new release. Thanks for the heads up.
It’s been pretty long since I’ve touched that code though, so I guess it’ll take a while to find my way around it again.

While you’re at it, psiberpunk, you might also want to check into the Mesh module and if it would be possible to use that instead of NMesh, since it’s deprecated and isn’t really maintained much any more. I also heard Mesh is faster, so it might be worth it overall.

In any case, thanks also from me for your work on this great exporter. :slight_smile:

Hey psiberpunk Do not get down. I just appreciate you writeing your exporter. I did have a couple of question from reading the docs that I posted in the chicken exporter thread here.

I understand that chicken will use Character Export Mode when “all selected mesh objects have an Armature modifier, and all of them use the same Armature object. IMPORTANT: Do not use parenting to armature for animation. It might work, but I won’t support it.” (Chicken help page)

Does this mean when I’ve created a mesh and an armature, I must not make the mesh be parent of the armature?

But I don’t know any other way to make the armature control the mesh. Indeed the Blender manual (http://wiki.blender.org/index.php/Manual/Mesh_Skin_Weighting) says “it is necessary to parent the character ‘skin’ to [the armature].”

Based on some posts in this forum, I’ve tried to connect the armature to the mesh in this way:

  1. Create a mesh and an armature.
  2. Select the mesh; editing buttons (F9), and in the “Modifiers” tab, click on “Add modifier” and select “Armature.”
  3. Then in the armature tab which this creates, type the name of my armature after the “Ob:”, un-select “Envelopes”, leaving “Vertex groups” selected.

The problem is, that going into pose mode, moving the bones does not move the mesh. There are no vertex groups. And if I create vertex groups manually, I don’t see how to connect them to the bones.

I am feeling very, very confused!

gdweber:

You are apply the armature modifier in the the “backward way”.

Set up(create,size,scale rotate e.t.c) your armature to fit the mesh you want it to deform.

Then:
Set up the mesh it it’s “rest” position. That is the position that you want the mesh to be in when the armature is not deforming it or no other forces are effecting it.

Then:

Right mouse click to select the armature. Press the G key in a 3d window to begin to move it so that it is within the mesh that is is supposed to control. When you have it in the correct posititon press Ctrl-A to clear all the transformations on the armature.

Now where is where you are going wrong.

Select the MESH object, go to the editing buttons,modifier panel then select the armature modifier type. From the way you described what you were doing you had the ARMATURE selected and you applied an armature modifier to that instead of the mesh you wanted the armature to control.

Actually, if I read the post correctly, that is what gdweber is doing. To quote that post:

gdweber, I think that the step that you’re missing is weight painting. Simply put, this involves telling Blender which vertices are to be affected by which bones, and to what degree.

The three steps that you posted look correct to me, as far as they go. (I presume that the mesh and armature are created for each other, or at least modified to fit, so that the armature fits the mesh at least more-or-less appropriately.) Once all of that is done, select the armature and enter Pose Mode. Then select the mesh and enter Weight Paint Mode. You should then be able to select bones with one mouse button, telling Blender that changes made apply to that bone, and paint on the mesh with the other. This painting should not affect the texture of the mesh, but instead defines weight values for the affected vertices.

You might be well-served by looking at this tutorial. :slight_smile:

(I’ve found the wikibook of which that is a part to be quite useful at times, as I recall.)

Thank you, Shaba1! You’ve said something that helped me – I am not sure exactly what it was – but things started working after I read your post.

Here is the procedure which I am now using, which is working:

  1. Create mesh and put it in rest position
  2. Create armature
  3. RMB select armature
    G move it into the mesh
    Edit mode
    Ctl-A to clear all transformations on the armature
    (I still do not understand the effect of this)
  4. Select mesh object
    Editing buttons
    Modifier panel
    Add modifier and select “armature” as the modifier type
    Type the name of the armature after “Ob:”
    (Otherwise you will get an error when exporting:
    in getArmatureName: ‘NoneType’ object has no attribute ‘name’)

And now I can use chicken to export in “character export mode.”

  1. But I still need to make the mesh be parent to the armature:
    a. select mesh first, then armature
    b. Ctl-P, Make parent to armature, make from bone heat (is this best?)

Now when I select the armature and go into editing mode,
it does not say the mesh is parent of any bone.

  1. Edit vertex groups if needed
    a. Select mesh in object mode
    b. switch to edit mode
    c. Link and materials panel – select each bone, use “select”
    to see what vertices it controls; to make corrections,
    select vertices to be changed and click “assign” to add it
    to the group or “remove”

  2. Ctl-TAB to enter pose mode, pose the model.

– I think now there were two mistakes I was making:
a. By using Ctl-P to make the mesh be parent of the armature,
i.e., step 5 before or without step 4, I was making a relationship
between mesh and armature which worked in Blender, but
chicken would not export.
b. After realizing that error, creating the armature modifier as in step 4,
but without doing step 5, and wasn’t getting any vertex groups
so could not use the armature to pose the mesh.

It feels very strange, but I am happy to now be able to export in character mode!


I’ve also noticed:

  • By selecting the mesh (alone) and pressing Shift-D, you can duplicate it, producing another mesh with the same armature modifier. (But if the armature is also selected, you get a copy of it as the modifier.)

*. By creating another mesh and going through this process again,
with the same armature, it is possible to have the one armature
control both meshes (by making both of them its parents).

-- So we are in a graph, not a tree -- a thing can have more than
one parent.  That corrects another misconception that I had.

huh?why would you?? you can asign the vertex weights otherwise,too. wheight painting, groups etc.

btw the mesh wont be parent of any bone, but to the armature which contains bones. still… dont use armature-parenting if you want to use chicken.

Ok guys… my turn to be stuck on exporting animations from Blender to EGG files.

I created a simple object–just two spheres connected with an armature.

First I created two mesh spheres.
I then created two armatures and placed one in each of the spheres, overlaying the two ends to provide a connection between them.
Now I select the sphere -> Edit mode -> add an armature modifier to each sphere.

What steps do I take from here? I’ve follow everyone’s suggestions here and it still doesn’t work for me. Chicken exports the EGG files as static mesh.

There are multiple opinions on whether or not you need to set the mesh as the parent of the armature. Several tutorials contridict each other on this point. So, does anyone know for certain if we must complete this step?

Also, is “vertex group” the only option I should have enabled in the modifier? The group name should be the sane name in all armatures, or armatures and meshes?

Thanks for any quick tips… I’m making good progress in learning Panda but I’m stuck on the basics of animation…

First of all, why are you creating two armatures, instead of a single armature with two bones? The latter sounds to me, given the “connection” that you mention, like what you want…

Otherwise, so far, so good, I think.

In each sphere’s armature modifier, there should be a field asking for an armature name, labelled “Ob”; copy the name of the relevant armature for that sphere and paste it into the armature field of the modifier.

This shouldn’t be called for, I don’t believe, given the approach that I find works with Chicken.

I believe so, yes; you might as well disable the “Envelopes” option in both the modifier and the armature itself, so that you don’t accidentally end up with some degree of envelope transformation that isn’t carried over.

If you mean the field in the modifier labelled “VGroup”, then I think that you can just leave this blank for now.

Instead, set your armature into “Pose Mode”, select a sphere, and enter “Weight Paint” mode (in both cases these can be found in the little list that should be found beside the “Object” menu in a 3D view).

In “Weight Paint” mode you basically tell Blender to what degree each vertex is affected by each bone by first selecting a bone, then “painting” the relevant vertices to indicate the degree of effect.

I recommend taking a look here for more information, specifically in the sections “Connection between Armature and Mesh” and “Vertex Groups & Weight Paint”. It appears to refer to an older version of Blender than the one that I use, based on the items shown (and not shown), but it also appears to remain informative.

Good luck. :slight_smile:

Thanks for your help! I’m able to make and export my characters now. However, there is a new problem, so maybe someone can point me in the right direction for thi sone.

I created my character in blender, added the armatures and textures, and exported to an EGG file. It works without issue. However, when I open the EGG file in pview or load it in to my Panda3D application the character and textures are there, but all of the “depth” (such as fractals) is gone and the texture looks “flat” on the character. It looks NOTHING like what I see in Blender. The shapes are there and correct, but there is no depth to the texture…

Is there special export settings required to maintain the fractals and contours in the EGG file, or is it a setting in my Panda app that is preventing the fine detail from showing up?

Thanks,

Mike

Nevermind…I’m an idiot. L-I-G-H-T-I-N-G

See, I do RTFM! I just forget some of what I read! lol