I finally animated in Blender and Exported with Chicken

Return to Pipeline

I finally animated in Blender and Exported with Chicken

Postby BrianInSuwon » Sun Jun 22, 2008 10:37 am

I finally figured out how to make a skeletal animation in Blender and export it with Chicken.

I made a real simple mesh. In top view, I made a cyclinder. In edit mode, with vertex selection, from side view, using 'B' to box select, I extended multiple times to make a longer 'flexible' tube.

I made a real simple skeleton. In side view object mode, I then made an armature (space bar), starting at the base of the mesh. In edit mode, grab (G) to move the tip (scale the bone) to the joint zone. 'E', to extend (which makes another bone). Back to Object Mode. Finished with the skeleton.

Attaching the mesh and skeleton. Click on the mesh to select it and only it. In the editing panel (F9) find the Modifiers tab, next to Shape tab, right side of panel. Click Add Modifier. Choose Armature. In the Obj box type Armature This is the default name of the skeleton you created. Also uncheck/unhighlight Envelope (only Vert.Groups should be depressed) The Vert.Groups and Envelope buttons are side by side. DON'T click apply. In Object Mode, click on the mesh, then shift click on the skeleton, then 'Ctrl' + 'P' to parent them. Choose Armature. Choose Create from Bone Heat.

Animating. Set up your viewport so that you have the Action Editor Window Type on the left and the 3D side view on the right. Switch over to your User Preference Window Type and click on the Edit Methods button. Click on Auto-Keying Enabled. Switch back to your 3d View Window Type. Go to Pose Mode. Select both bones, "I" (to insert a keyframe), choose LocRotScale. Two yellow dot should appear in the left viewport (Action Editor). Move to frame 6. Select the top bone only, "R" to rotate, LMB to set. You will notice a yellow dot next to that bone in the left viewport. Repeat this for frames 12, 18, and 24, rotating the bone slightly for each of these frames. In the Action Editor Window, you can use the mousewheel to stretch it (zoom in). LMB drag to scrub, you will see the animation in your right view port.

Exporting. Right click on the mesh. File. Export. Chicken. You should see the status as Character Export Mode. You should see an animations area. Click delete. We want to export just the mesh first. Chose the location and name for your .egg file. (TubeAnimation.egg). Press the pview button. Click Export. In the PVIEW window, "L", to turn on the lights. Close PVIEW. Take a moment to open your new .egg with notepad. It should be a nice clean file. Back to Blender, click the Add Animation button. Check your start and end frame numbers. For the name type Bend (or come up with your own name for the animation) Don't change the Export File name (which is still TubeAnimation.egg for me) Press the Animation Only button down (it might take a click or two before its highlighted) We DON'T want to mix the mesh and animation data into one egg. You should now see the animation playing in Pview. Take a minute to open the file (TubeAnimation-Bend.egg) with notepad. It should be a nice clean file. Move these two eggs to your model folder.

Importing. Add this to your py file.

Code: Select all
from direct.actor.Actor import Actor

self.tube = Actor("models/TubeAnimation",
self.tube.setPos(0,0,0) # or where ever you want to test it at

I'm not sure how to export multiple/different animations. So I just delete the keyframes in the Action Editor (after saving the blend file). Make my new animation and export that with a different name.
Posts: 98
Joined: Wed Jun 18, 2008 1:25 am

Postby psiberpunk » Mon Jun 23, 2008 8:57 pm

That's pretty good, but if I may just object to a small detail, Chicken never mixes animation with the model. It always produces an egg file with just the mesh and one additional file for each animation exported. I don't recall even the first version of Chicken doing that, although I know other exporters did.
Posts: 134
Joined: Mon Jul 24, 2006 7:57 pm
Location: Santiago, Chile

Postby mleveill » Sun Jul 06, 2008 11:02 pm

hey i just finished a simple animation in blender.
i've been able to export the mesh but not the animation.

whenever i try to export the animation chicken always is in the Static Scene Export Mode, can't get it to Character Export Mode.

i've never used chicken before and i just started using blender, any suggestions?

i'm using chicken v1.0 btw, should i be using the unstable version???

EDIT: oops, figured out what was wrong, didn't do the add modifier part, i was following an older tutorial on animation. now it works :P
Posts: 4
Joined: Sun Jun 22, 2008 12:44 am

Postby birukoff » Mon Jul 07, 2008 7:19 am

Stable version is outdated. Use unstable instead: https://sourceforge.net/project/showfil ... _id=589796
User avatar
Posts: 424
Joined: Thu Nov 08, 2007 7:03 am
Location: Russia, Moscow

Postby psiberpunk » Mon Jul 07, 2008 11:46 pm

Yeah, I should really get around to giving the "unstable" version a proper release. As it is I'm sure many people don't download it cause they get scared off by the name :)
Posts: 134
Joined: Mon Jul 24, 2006 7:57 pm
Location: Santiago, Chile

Return to Pipeline

Who is online

Users browsing this forum: No registered users and 0 guests