Age | Commit message (Collapse) | Author |
|
|
|
bones to closer match keyframes on either side.
|
|
Added a new function which specially caters for auto-recalculation of paths after updates (such as keyframing).
Currently, all that differs between this and pose_calculate_path, is that it only recalculates for bones with paths. Also, it only updates what it needs to (minimum frame range affected).
Warning: WIP commit (hopefully it compiles ok)
|
|
===================
This is a new automatic vertex weighting method, next to the existing
envelope based method. The details are here:
http://www.blender.org/development/current-projects/changes-since-244/skinning/
This is based on section 4 of the paper:
"Automatic Rigging and Animation of 3D Characters"
Ilya Baran and Jovan Popovic, SIGGRAPH 2007
Implementation Notes:
- Generic code for making mesh laplacian matrices has been added, which
is only used by bone heat weighting at the moment.
- Bone to vertex visibility checking is done with the raytracing code.
- Fixed an issue in the subsurf limit calculation function, where the
position of vertices on boundary edges was wrong. It is still not the
correct position, but at least it's in the neighbourhood now.
|
|
Works like for Object layers, but local within Armature itself. Each Bone
can be in (16 now) any layer, and the Armature layer defines what is
visible or not. Also note that hiding will still work too.
Since the Blender code is *stuffed* with Bone options now, this commit
requires a good test if all tools we got now comply to layers...
(I counted 130 cases for checking for selected Bones in code!)
In PoseMode; hotkey M will show 'movetolayer' menu. Not in editmode...
then its the mirror menu.
Todo: make action/nla drawing comply to Armature layer settings.
|
|
In PoseMode, press Wkey or use the Pose pulldown menu. It calculates the
positions of all selected Bone end points, over the time as indicated with
the Scene start/end frame. This then is drawn as a path, with little black
dots on every frame, and a white dot on every 10 frames.
Paths are not saved in files, and not calculated automatic yet on changes.
To make this relative fast, but also reliable, I had to add a new method
in the Dependency graph system, to find exactly (and only) these parents
of an Object that influence its position. This is needed because the path
should show the actual global coordinates of the entire animation system.
|
|
- Set the button in Paint Panel, Edit buttons context
- It assumes the mesh to be near-perfectly mirrored. Current threshold is
set to 0.0001 (maximum difference allowed).
In order to evaluate proper mirroring, a new option will be added in
Mesh editmode later.
- When the flipped group doesn't exist yet, it creates the group
- Of course this doesn't work for mirror modifier!
New: Select/activate flipped bone or vertex group
- Press SHIFT+F in PoseMode or WeightPaint mode to get the flipped bone.
Is especially to see while painting if the mirror copying works OK.
New: "Apply Envelope to VertexGroup" uses X-mirror option too.
Todo; check on mirror vertex painting, and mirror Mesh editmode....
The implementation is based on a 8x8x8 Octree, where vertex locations are
stored. Vertices on the threshold boundary of an Octree node are filled in
the neighbour nodes as well, ensuring that the lookup works with threshold.
The current size of the Octree gives good speedup, even for 128k vertices
it only needs 256 lookup cycles per checked vertex.
Same code could be used for the bevel tool for example.
src/meshtools.c:
int mesh_octree_table(Object *ob, float *co, char mode)
- mode 's' or 'e' is "start octree" or "end octree"
- mode 'u' is "use", it then returns an index nr of the found vertex.
(return -1 if not found)
|
|
now only draws the limits for X and Z rotations (Y is bone axis itself).
Quick snaphsots (links will disappear):
http://www.blender.org/bf/rt6.jpg
http://www.blender.org/bf/rt7.jpg
It only draws for selected Bones that are part of IK, and have limits set.
Most work was getting code OK to setup drawing this 'DoF space', so now
experiments can be done with more drawing types.
ALso; Buttons for DoFs now only draw if the pose-bones are part of an IK
chain.
|
|
Main target was cleanup of editconstraint.c and removal of the ugly
ob->activecon (active constraint channel), which was set by the "Show"
button in the Constraint Panel.
Better is to introduce an 'Active Constraint' itself, which stores in
the Constraint itself. By using this setting, and by checking the active
Bone, the UI can update reliably now. This only shows now in IpoWindow
btw (for constraint ipos). The active Constraint is drawn in the Buttons
with a slightly brighter backdrop. Any action in that Panel selects a
constraint now (even click in backdrop).
So now we have pose channels & constraint channels nicely behaving. Now the
darn Action channels... :)
Further in this commit:
- interface.c: Button ROUNDBOX now does button callback too.
Button NUMSLI didn't do the callback on a click only
- Cleaned up include files in yafray, got annoyed it compiled over all the
time.
- removed unused variables from Constraint struct
|
|
For defining the deformation distances of Bones, three values are being
used now. The bone tip and root radius define the bone-shape itself and the
"dist" defines the soft area around it. A full (user) doc is in CMS here;
http://www.blender3d.org/cms/Armature_Envelopes.647.0.html
Note: todo still is allowing both Vertex Deform Groups and these Envelopes
together (and or per Bone).
Also part of this commit is:
- New: Hiding bones in EditMode. This is a separate 'hide flag', so you can
keep the PoseMode hidden Bones separate from EditMode.
(In the future we should do some kind of bone-grouping or so)
- While transform(), the hotkeys G,R,S only switch mode when the previous
mode was compatible. Caused conflicts with Crease/BoneDist/etc.
- Deleting the last VertexGroup now also deletes the entire Mesh 'dvert'
data. Sounds logical, but remember that VertexGroups are partial on a
Mesh, partial on Object. Weird design decision though...
Anyhoo, at this moment the only way to have Bone Envelopes deform, is
by deleting all VertexGroups!
- In PoseMode, the hotkey ALT+S now does both B-Bone size or Envelope,
depending draw type.
- In EditMode, Extrude now also works when only Root points were selected.
- Weight editing is also symmetrical btw, with the "X-axis Mirror" option
set.
|
|
- PoseMode: Wkey menu, "Flip Left/Right Names". On selected bones, it flips
the L/R tags in names, and calls the proper code to rename everything
that's related (constraint targets, bone-childs, etc).
- PoseMode: Shift+S snapmenu: snap cursor to selected now works
- Outliner: select bones now correctly sets 'active' flag for bones,
updating the UI as well.
Also made sure you cannot select hidden bones in outliner.
- 3DWindow: in PoseMode/EditMode draws name of active Bone too (with user
option "Draw active object name" set.
- Added the new Armature/PoseMode options in View3D pulldowns.
Cleanup:
- moved Pose code from editaction.c to poseobject.c
- removed BSE_editaction.h and BSE_editaction_types.h, moved contents of
it to BIF_editaction.h. One include per C file should be fine. :)
I know the src/ structure would require more elaborated includes, but
we don't have that now...
|
|
|
|
- Added option to the IK buttons, to have it use the 'tip' as end of the
IK chain. I never really understood this old convention (IK didn't work
on the Bone itself).
Old files still will read OK though. But I made the "To Tip" a default
when adding new IK constraints.
- Hotkey CTRL+I: add IK, with option to have it adding an Empty target,
or use a selected Bone as target. With the new non-modal PoseMode, it
gives instant access to playing with the IK chain.
- Hotkey ALT+I: clears IK, on all selected Bones
- Hotkey ALT+C: clears Constraints on all selected Bones (incl IK)
|
|
- PoseMode now is a state Armature Objects can be in. So, while in PoseMode
for an Armature, you can just select another Object or Armature.
- The old PoseMode options (transform, insert keys etc) are accessible
with making the Armature Object 'active' (and have object in PoseMode).
- At this moment no multiple Poses can be transformed/edited at the same
time.
- The old hotkey CTRL+TAB, and view3d header menu, still work to set an
Object's PoseMode
It was quite a lot recode, so tests & reports are welcome.
Oh, as a bonus I added Lasso Select for Bones in PoseMode! It selects using
only the line between root and tip of the Bone.
|
|
Aim was to get a total refresh of the animation system. This
is needed because;
- we need to upgrade it with 21st century features
- current code is spaghetti/hack combo, and hides good design
- it should become lag-free with using dependency graphs
A full log, with complete code API/structure/design explanation
will follow, that's a load of work... so here below the list with
hot changes;
- The entire object update system (matrices, geometry) is now
centralized. Calls to where_is_object and makeDispList are
forbidden, instead we tag objects 'changed' and let the
depgraph code sort it out
- Removed all old "Ika" code
- Depgraph is aware of all relationships, including meta balls,
constraints, bevelcurve, and so on.
- Made depgraph aware of relation types and layers, to do smart
flushing of 'changed' events. Nothing gets calculated too often!
- Transform uses depgraph to detect changes
- On frame-advance, depgraph flushes animated changes
Armatures;
Almost all armature related code has been fully built from scratch.
It now reveils the original design much better, with a very clean
implementation, lag free without even calculating each Bone more than
once. Result is quite a speedup yes!
Important to note is;
1) Armature is data containing the 'rest position'
2) Pose is the changes of rest position, and always on object level.
That way more Objects can use same Pose. Also constraints are in Pose
3) Actions only contain the Ipos to change values in Poses.
- Bones draw unrotated now
- Drawing bones speedup enormously (10-20 times)
- Bone selecting in EditMode, selection state is saved for PoseMode,
and vice-versa
- Undo in editmode
- Bone renaming does vertexgroups, constraints, posechannels, actions,
for all users of Armature in entire file
- Added Bone renaming in NKey panel
- Nkey PoseMode shows eulers now
- EditMode and PoseMode now have 'active' bone too (last clicked)
- Parenting in EditMode' CTRL+P, ALT+P, with nice options!
- Pose is added in Outliner now, with showing that constraints are in
the Pose, not Armature
- Disconnected IK solving from constraints. It's a separate phase now,
on top of the full Pose calculations
- Pose itself has a dependency graph too, so evaluation order is lag free.
TODO NOW;
- Rotating in Posemode has incorrect inverse transform (Martin will fix)
- Python Bone/Armature/Pose API disabled... needs full recode too
(wait for my doc!)
- Game engine will need upgrade too
- Depgraph code needs revision, cleanup, can be much faster!
(But, compliments for Jean-Luc, it works like a charm!)
- IK changed, it now doesnt use previous position to advance to next
position anymore. That system looks nice (no flips) but is not well
suited for NLA and background render.
TODO LATER;
We now can do loadsa new nifty features as well; like:
- Kill PoseMode (can be option for armatures itself)
- Make B-Bones (Bezier, Bspline, like for spines)
- Move all silly button level edit to 3d window (like CTRL+I = add
IK)
- Much better & informative drawing
- Fix action/nla editors
- Put all ipos in Actions (object, mesh key, lamp color)
- Add hooks
- Null bones
- Much more advanced constraints...
Bugfixes;
- OGL render (view3d header) had wrong first frame on anim render
- Ipo 'recording' mode had wrong playback speed
- Vertex-key mode now sticks to show 'active key', until frame change
-Ton-
|
|
So we should be all set now :)
Kent
--
mein@cs.umn.edu
|
|
(adding)
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
also the Makefile.in's were from previous patch adding
the system depend stuff to configure.ac
Kent
--
mein@cs.umn.edu
|
|
|