Sign in to follow this  
  • entry
    1
  • comments
    3
  • views
    2206

Just some notes taken over the years

Sign in to follow this  
Buckeye

1194 views

Nothing earth-shaking here - just notes to remind myself how to get some things done in Blender. The activities described assume a working familiarity with Blender 2.69, a knowledge of how to install an addon to Blender, links for a DirectX x-file export addon, and a willingness to go through all that to get an X-file with multiple animation sets in it.

Create a mesh.
In object mode, add an armature to the scene (shift-A)
Create the full skeleton.
Set the skeleton as the parent of the mesh: select the skeleton, shift-select the mesh, ctrl-p

Given a skinned mesh and armature:

Editing animation set:

Select frame to edit in the timeline window.
Select bone(s).
Orient bone(s) to desired position.
Select bone(s) modified in this frame.
Press I and save (normally) Rot --> for the first frame select all bones (press A). Press I and save LocRotScale.

To copy and paste frame data:
Select frame to copy.
With mouse over 3D view, press Ctrl-C.
Select frame to paste data into.
With mouse over 3D view, press Ctrl-V.
Press I and select LocRotScale to overwrite the frame data.

To create multiple animationsets in one file:

Create an animation set.
In another window, select DopeSheet.
In the dropdown menu (bottom of window) that probably says "Dope Sheet," select "Action Editor"
Select the action. Rename it if desired. Press F in the dropdown list of actions to create a fake user.

Create another action set by clicking "+" in the action selection dropdown.
The animation editor should show a "clean" timeline.
Edit that new animation set.
In the DopeSheet Action Editor, press F to create a fake user for that action.

Links to the Blender DirectX addon:

http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Import-Export/DirectX_Exporter
https://developer.blender.org/T22795

Exporting to DirectX X file:
In object mode, select the armature and the mesh.
File->Export->DirectX
Export:
Selected Objects Only
Meshes
Normals
UV Coordinates
Materials
Armature Bones
Animations
Include Frame Rate
Export Actions as AnimationSets
Attach Unused Actions to First <-------- required. Probably an error in the directx export script

Note: There will be a "default action" or similar in the DirectX export file, probably at the end of the file. That can be deleted using an ASCII editor.

N.B., please see Ashaman73's comments below for alternate (and possibly better) ways to do things in Blender.
Sign in to follow this  


3 Comments


Recommended Comments

Great idea to show off your workflow. I will contribute some additional steps, maybe you find them useful. It would be a good idea for an article too, I could think of many people who would like to see a short guideline of an animation workflow in blender.

 

Here are some addtional steps (I'm not 100% sure about shortcut-keys):

 

 

Create the full skeleton.

Ensure to use the naming convention for the left/right side (bone.R,bone.L), this helps to change bones concurrently (when mirrored-axis is enabled) and later in the pose-mode to copy bone orientation to the mirrored bones.

 

 

Set the skeleton as the parent of the mesh: select the skeleton, shift-select the mesh, ctrl-p

Clear/reattach mesh (if using auto-weight):

Select mesh->press alt-p to disconnect from parent->go into edit mode->select all vertices-> ctr-g and choose remove from all groups (to avoid weight glitches when reattaching often)

 

 

Press I and save (normally) Rot --> for the first frame select all bones (press A). Press I and save LocRotScale.

Save normally not only the rot but the location too. Once you work with drivers and constrains (eg IK), then rotation is no longer sufficient (only for FK animation).

You can click in the small empty field next to the record button to choose a default set when pressing I, this way you don't need to choose the LocRotScale whatever all the time.

 

 

Create another action set by clicking "+" in the action selection dropdown.
The animation editor should show a "clean" timeline.

The + button makes a copy of the currently selected action. This is very useful to copy animations without the need to start with a clean timeline.

 

 

To copy and paste frame data:
Select frame to copy.
With mouse over 3D view, press Ctrl-C.
Select frame to paste data into.
With mouse over 3D view, press Ctrl-V.

In the 3d-view window are 3 buttons to copy,paste and paste-mirror. Copy/paste works like your description, but the paste-mirrored really useful, because it applies the bone orientation to the mirrored bones when you use the blender naming-convention (arm.L, arm.R, leg.L, leg.R etc.). This is very userful for walk animations.

Share this comment


Link to comment
It would be a good idea for an article too

 

biggrin.png It probably would - but if I were to do it, it might imply I have a clue what I'm doing. I don't go through it often enough to have all the nuances (for which you have provided a very nice list) at hand. Thus my notes. You are correct, however, that there aren't many (if any) tutorials that encompass the full workflow from empty screen to export.

 

Re: the remainder of your comments - wow. Much appreciated. Sounds like you know what you're doing. I'll definitely check through the alternate/better actions you mention my next time doing skinned-mesh/animation work in Blender.

 

Disclaimer: Actually, the blog entry is (obviously) just a cut-and-paste from a text file I have on my desktop. A lot of the x-file export stuff cannot be found elsewhere, and is the result of experimentation and attempts to analyze the Python export script without any knowledge of the innards of Blender's API.

Share this comment


Link to comment

just spent much of the day figuring out how to add a second action to an object. a poorly documented feature in blender 2.7x, i finally remembered you mentioning the f button in as posting that also referred to this blog entry. so i checked it out, and had multiple animation actions made in no time! <g>.  this blog entry and maybe one other place on the web is the only place i've found any relevant info. can't thank you enough!

 

 

>> Attach Unused Actions to First <-------- required. Probably an error in the directx export script

 

apparently, blender keeps a master list of each unique animation in the scene, instead of a list of animations for each object. an object can only have one animation assigned to it at once. so if you have a rigged tankgirl model with walk and run animations, when you export, you have to tell it to export the unassigned animation (walk or run, whichever one is not selected in the dope sheet actions editor) as an additional animation set attached to the first armature (IE tankgirl's skeleton). 

 

i was just testing this myself, only to discover that of you have an object with two animations (say location and rotation), but no armature (such as just the default startup cube), you only get the animation selected in the action editor of the dope sheet, not both animations (IE the cube's currently assigned animation).  so now i''ll have to learn how to animate an armature in Blender 2.7x to test it. not like i wouldn't have to learn that anyway if i end up using blender.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now