===============================
This is a new armature deform interpolation method using Dual Quaternions,
which reduces the artifacts of linear blend skinning:
http://www.blender.org/development/current-projects/changes-since-244/skinning/
Based on the paper and provided code:
Skinning with Dual Quaternions
Ladislav Kavan, Steven Collins, Jiri Zara, Carol O'Sullivan.
Symposium on Interactive 3D Graphics and Games, 2007.
This code was always kludgy and this clean it up a bit.
insertmatrixkey() has been properly renamed insertkey_float().
Matrix calculations have been excised from the interface code,
and placed in insertmatrixkey(), so that you can call it from
anywhere without preliminaries and the proper values are calced
based on the passed adr code.
By much request, several semi-bug reports and discussion with
production animators, visual keying is now used automatic
for objects and bones that have constraints that cause them
to ignore their Ipos (CopyLoc, TrackTo, etc.). In those cases,
visual keying is used instead of the normal Ipo insertion
method. This "auto" functionality is toggled from the
"Use Visual Keying" button found along with "Needed" and
"Available" in the Edit Methods prefs.
Logic as to which constraints trigger visual keying on
which adrcodes can be tweaked in match_adr_constraint()
src/editipo.c
This has been tested by a couple of people, myself included,
but I may not have hit every constraint case, so evolutionary
feedback is welcome.
* Swapped the order of the CSpace menus. This is so that it makes more sense with the Transform Constraint, to follow a source (target) -> destination (owner) flow.
* 'Local Space' option for Objects has been renamed 'Local (Without Parent) Space'
Previous bugfix of spec not being included in only shadow lamps had 2 errors.
There weren't any checks for if shi->spec and shi->shad go below 0 because of
an only shadow lamp, and also the code for including spec in only shadow lamps
was slightly wrong.
* Transform Constraint should now work in more cases. Somehow the old code (for location case) wasn't working correctly.
* ChildOf Constraint applied on objects, should now get the right 'inverse'/'offset' matrix set. It now uses the same code that is used by Blender's parenting method to do so.
===============================
An improved CrazySpace correction is now used for Armature modifiers that use
vertex groups, and that are the first enabled modifiers in the stack. This is
a a specific case, but also a common one.
http://www.blender.org/development/current-projects/changes-since-244/skinning/
Implementation Notes:
- The quaternion crazyspace correction is still used for modifiers other than
the armature modifier.
- Modifiers can now provide a deform matrix per vertex to be used for
crazyspace correction, only the armature modifier implements this now.
===================
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.
At last, the 'Local' option for Armatures works properly!
Tonight I went through carefully and cross-checked the code once again, and found several bad mistakes I had made. These were:
* the value of one variable from the armatures code was not what I expected it to be, based off the name).
* Mat4MulSerie swaps the first two args! Grrr...
Note:
There's only one rig that I've tested that was broken. That was slikdigit's "mancandy", and the part in question was the jaw. It is likely that a few more rigs out there (in particular, their 'local' action constraints) relied on the wacky rotation values that used to be used, so are now broken.
sceneSequence.h - bad type check, dosnt matter really since that define isnt used yet.
SurfNurb.c - was using lib hashing function and surfNurbs not a lib! (own mistake)
buttons_editing.c - Curves PathLen button was MAXFRAMEF and pathlen is a short so the button wrapped around.
caused errors on only shadow lamps; fixed this by adding back in the original
intensity > 0.0 check in the only shadow if statement, where it belonged in the
first place.
In addition, the specular pass was not correctly affected by only shadow lamps,
severely reducing the usefulness of this feature. For example, using four
spotlamps to create an omnidirectional buffered shadow lamp didn't work.
This commit fixes the Draw module. All buttons/widgets created via the Draw
module in a SpaceScript area are now inserted into a global list attached to
the SpaceScript data. This list is cleared before each draw, when freeing
the space, and when the area is switched to another space.c
This is necessary to prevent Blender's internal UI code from getting invalid
pointers to python data. In addition, it allows storing widget tooltips
inside the python Button objects, which solves that little bit of stupidity.
Note that this reverts the previous weaklist solution. In fact, I had to go
over each previous commit by Campbell after this code originally branched
before the weaklist commit and re-add each commit. So if anything is
missing, just tell me, or feel free to re-add it.
two separate files, raytrace.c and rayshade.c. The tracing code can now
be used separately from the renderer (will be used in a later commit),
and the raytracing acceleration structure can now also be easily replaced,
if someone wants to experiment with that.
This fixes a bug reported in IRC. getParentBoneName() was returning a string (most likely from an old bone-parent that got removed), even when the parent wasn't an Armature.
Tracking is now tempolarily disabled while an object matrix used for space conversions stuff is calculated. This used to be done before the constraints recode.
Now PoseBones should transform normally again with constraints applied and in other cases. I've gone back to the old code that used to be there before the recode, and added the constraint inverse (as appropriate) into that.
* Reverting a previous commit where I wrongly assumed that the code was not doing things the right way. This makes a few cases work better normally again.
* Object-level Transforms should now perform normally again. Now, transforms are only get inverse-corrected for constraints if certain constraints are the first 'active' constraint.
* PoseBone-level Transforms still need to be fixed, although I might have done a few tweaks here.
* Action constraints on some older files (namely mancandy) should now get correctly loaded. Wrong check for subversion number was being used
* Removed unneeded version patches
I've finally fixed the bug with the Constraint Space Conversion. It was a single matrix multiplication in the wrong order (for local->pose).
Also, there is more code added for the space conversion process when bones have 'hinge' on. (NOTE: this stuff for hinge bones may still not work really nice yet)
- Multilayer EXR files:
Rendering without "do composite" skipped to render the vector pass
- Also found a wrong loop, missing to clear speed vectors in the first
pixel of a tile, causing error print:
"Found uninitialized speed in vector buffer... fixed"
* It is now possible to work on keyframe data/scrub the timeline when the Action Editor is squished up so that the left-hand panel disappears.
* I'm not sure whether I've eliminated a bug with long-keyframes where sometimes the selection status was show incorrectly (keyframe after keyframe marking end of long-keyframe is selected, results in long-keyframe selection).
* Changed a few obscure comments
Here are some attempts at fixing bugs being encountered with the constraint system after the recode. I've just fixed a few typos (where relevant), and added some extra checks for things.
For some odd reason, shadow calculation was skipped if diffuse was 0.0. This
however would cause errors where specularity would ignore shadows. After all,
just because the shaded diffuse of a point is fully black, doesn't mean
the specularity highlight doesn't include that point.
Ton: you might want to look at this, though it's just a one-liner.
Bone matrix wasn't being applied properly.
There's still a bug left with the translation part of the resize but that is a less frequent situation, so I'll commit this while I figure out a fix.
This also helped me pinpoint a couple of off by one errors in the UV rasterizing code. One especially noteworthy was that all UV at 1.0 (on the 0..1 scale) didn't render properly.