Age | Commit message (Collapse) | Author |
|
This time is was due to different accuracy of floating point computation,
now it uses does a comparison a bit different to avoid this.
Also changed the vectoquat function to be threadsafe.
|
|
|
|
BIF_gl.h and BIF_glutil.h)
|
|
point's before a curve. now allow the bevel list to have zero point BevList's to keep in sync with curve->nurb as was expected in a few places.
|
|
* colour -> color
* centre -> center
* normalise -> normalize
* modelling -> modeling
|
|
previously only some datatypes adding functions accepted a name.
also updated the Bpy.py epydocs
|
|
All data layers, including MVert/MEdge/MFace, are now managed as custom
data layers. The pointers like Mesh.mvert, Mesh.dvert or Mesh.mcol are
still used of course, but allocating, copying or freeing these arrays
should be done through the CustomData API.
Work in progress documentation on this is here:
http://mediawiki.blender.org/index.php/BlenderDev/BlenderArchitecture/CustomData
Replaced TFace by MTFace:
This is the same struct, except that it does not contain color, that now
always stays separated in MCol. This was not a good design decision to
begin with, and it is needed for adding multiple color layers later. Note
that this does mean older Blender versions will not be able to read UV
coordinates from the next release, due to an SDNA limitation.
Removed DispListMesh:
This now fully replaced by DerivedMesh. To provide access to arrays of
vertices, edges and faces, like DispListMesh does. The semantics of the
DerivedMesh.getVertArray() and similar functions were changed to return
a pointer to an array if one exists, or otherwise allocate a temporary
one. On releasing the DerivedMesh, this temporary array will be removed
automatically.
Removed ssDM and meshDM DerivedMesh backends:
The ssDM backend was for DispListMesh, so that became obsolete automatically.
The meshDM backend was replaced by the custom data backend, that now figures
out which layers need to be modified, and only duplicates those.
This changes code in many places, and overall removes 2514 lines of code.
So, there's a good chance this might break some stuff, although I've been
testing it for a few days now. The good news is, adding multiple color and
uv layers should now become easy.
|
|
http://download.blender.org/demo/test/2.43/0001_0150_speed.avi
By default the Speed maps in the range 0-100 frames, since there's
not an actual time relationship here.
IMPORTANT: this didn't work before, and default Curve Paths have a
speed Ipo, so past saved scenes will work different now!
- Speed curve points are now drawn on the 3D path as well. With select
info for selected points, if Curve Object is active.
- Duplicating Objects with NLA ActionModifiers now also correctly copies
object pointers, so a duplicate works as expected.
|
|
- FORWARD CYCLING & MATCHING
Up to no now, adding multiple actions in NLA with walkcycles required to
animate them standing still, as if walking on a conveyor belt. The stride
option then makes the object itself move forward, trying to keep the foot
stuck on the floor (with poor results!).
This option now allows to make walk cycles moving forward. By
indicating a reference Offset Bone, the NLA system will use that bone to
detect the correct offset for the Armature Pose to make it seamlessly going
forward.
Best of all, this option works as for cyclic Action Strips as well as for
individual Action Strips. Note that for individual strips, you have to set
the strip on "Hold". (Might become automatic detected later).
Here's an example edit image for NLA:
http://www.blender.org/bf/nla_match-cycle.jpg
And the animation for it:
http://download.blender.org/demo/test/2.43/0001_0150_match.avi
Blender file:
http://download.blender.org/demo/test/2.43/mancandy_matching.blend
Using this kind of cycling works pretty straightforward, and is a lot
easier to setup than Stride Bones.
To be further tested:
- Blending cycles
- matching rotation for the bones as well.
- ACTION MODIFIERS (motion deformors)
The above option was actually required for this feature. Typically walk
cycles are constructed with certain Bones to be the handles, controlling
for example the torso or feet.
An Action Modifier allows you to use a Curve Path to deform the motion of
these controlling bones. This uses the existing Curve Deformation option.
Modifiers can be added per Action Strip, each controlling a channel (bone)
by choice, and even allows to layer multiple modifiers on top of each other
(several paths deforming motion). This option is using the dependency graph,
so editing the Curve will give realtime changes in the Armature.
The previous walkcycle, controlled by two curves:
http://download.blender.org/demo/test/2.43/0001_0150_deform.avi
Blender file:
http://download.blender.org/demo/test/2.43/mancandy_actiondeform.blend
Action Modifiers can be added in the NLA Properties Panel. Per Modifier you
have to indicate the channel and a Curve Object. You can copy modifiers from
one strip to another using CTRL+C (only copies to active Object strips).
Setting up a correct Curve Path has to be carefully done:
- Use SHIFT+A "Curve Path" in top view, or ensure the path is not rotated.
- make sure the center point of the Curve Object is at the center of the
Armature (or above)
- move the first point of the curve to the center point as well.
- check if the path starts from this first point, you can change it using
(in Curve EditMode) the option Wkey -> "Switch Direction"
- Make sure alignment uses the correct axis; if the Armature walks into
the negative Y direction, you have to set in Object Buttons, "Anim settings"
Panel, the correct Track option. (Note; option will probably move to the
Modifier later).
This is a good reason to make such paths automatic (on a command). Is on the
todo list.
Also note this:
- the Curve Path extends in beginning and ending, that's (for now) the default,
and allows to use multiple paths. Make sure paths begin and end horizontal.
- Moving the Curve in Object Mode will change the "mapping" (as if the landscape
a character walks over moves). Moving the Curve in Edit Mode will change the
actual position of the deformation.
- Speed (Ipos) on paths is not supported yet, will be done.
- The Curve "Stretch" deform option doesn't work.
- Modifiers are executed *after* all actions in NLA are evaluated, there's no
support yet for blending multiple strips with Modifiers.
- This doesn't work yet for time-mapping...
This commit is mostly for review by character animators... some details or
working methods might change.
This feature can also be used for other modifiers, such as noise (Perlin) or
the mythical "Oomph" (frequency control) and of course Python.
Special thanks to Bassam & Matt for research & design help. Have fun!
|
|
settings, rather than using the object's TrackX/Y/Z/etc buttons.
This is good for two reasons: a) having the settings over in the object buttons
before was terribly unintuitive and hidden, now it's more visible how to
control the deformation, and b) now if you have more than one curve modifier,
they can have their own settings, instead of being forced to use the object
level data.
|
|
In a quick glance: (temp image)
http://www.blender.org/bf/rt.png
Main reason is that Lattices are useful a lot for Armature deformation.
Lattices just provide much more precise and interesting control. However,
with only bone envelopes it's very hard to use.
Working with Lattice vertex groups is nearly identical to Mesh:
- on CTRL+P 'make parent' you can choose the deform option now
- In editmode, the buttons to control vertex groups are available
- In outliner you can select vertexgroups too
- Deforming Lattices with Armatures has all options as for Mesh now.
Note:
- No WeightPaint has been added yet. To compensate, the editmode
drawing for a Lattice with vertex group shows weight values for the active
vertex group.
- Lattice editmode doesn't undo/redo weight editing yet.
- Softbody for Lattice still uses own vertex weights
Implementation notes:
- derivedmesh weight_to_rgb() is now exported to drawobject.c
- been doing cleanups in code (order of includes, var declarations, etc)
- weightpaint button handling now is generic
I've checked on Brecht's proposal for Custom Element data;
http://mediawiki.blender.org/index.php/BlenderDev/CustomElementData
It could have been used, but that would mean the existing code for
vertexgroup handling and armature deform couldn't be re-used. I guess this
is really a later todo.
|
|
main features are:
* Modifiers can now be in any order in the modifier stack
* DerivedMesh now has a standard framework for custom element data to be passed
through the stack with mesh data (being copied and interpolated as
appropriate), so modifiers can access whatever data they need
* The modifier stack code has been refactored and a number of bugs have been
removed
* The EdgeSplit modifier has been added:
http://mediawiki.blender.org/index.php/BlenderDev/EdgeSplitModifier
* The DerivedMesh modifier has been added:
http://mediawiki.blender.org/index.php/BlenderDev/DisplaceModifier
* The UVProject modifier has been added:
http://mediawiki.blender.org/index.php/BlenderDev/UVProjectModifier
For more info, see:
http://mediawiki.blender.org/index.php/User:Artificer/ModifierStackUpgrade
(currently undergoing reorganisation)
|
|
On file load, a Curve deformation was not initialized when it
wasn't in a visible layer.
|
|
to finetune deform further as well.
Note that curve deform requires object buttons 'track' and 'up' axes set
properly. Curve deform can twist/flip a lot, making Vertex Group based
deform hard to set up.
|
|
User doc: http://www.blender3d.org/cms/Shape_Keys.678.0.html
- The mixed use of "Vertex Key","Key" or "RVK" in Blender was a bit
confusing. Also a 'vertex key' assumes keys per vertex, which actually is
only a single key for the entire shape. The discussions on blender.org
forums all mentioned "Shape" or "Blend Shapes", which I think is an OK
name for a "Vertex Key" in the UI. :)
- Most work was code spaghetti cleanup. Doing shape-keys now nicely goes
via the depgraph and DerivedMesh. That then allows to have different
shapes per object, with the new "Pin" feature.
Objects now define what Shape is shown (ob->shapenr)
- Added a Shape Panel in the Edit buttons with the various options
- Fixed a lot of issues in the IpoWindow, with drawing the channels.
For example, deleting a key-line there caused the entire Relative option to
go wrong, same for moving the lines up/down.
Changing key-line order now reflects in order of channels. The active
Shape is drawn more clear now too.
- Noticed it doesnt work yet for curves/lattice. Need modifier advise!
|
|
- new feature, twiddled with lattice resizing to try to maintain
existing vertex changes... much nicer than just resetting the
lattice if you decide you need more detail in the lattice.
- modifiers work with lattices now. yes, that does mean you
can make a chain of lattices effecting each other 8 miles
long.
- some cleanup of softbody code, was rather splintered and call
path was twisted and confusing. reworked main object step
routine to do things in a more obvious and consistent manner
and without duplicate code
- added ob->softflag OB_SB_RESET instead of sbObjectReset
call
- modifier changes reset softbody now
- moved curve_getVertexCos/curve_applyVertexCos into curve.c
- update curve modifier eval to work with virtual modifiers
- update modifier apply to work with curves/surfs
- update make parent to also recalc object data
NOTE: Although you can turn SB on for curve/font objects at the
moment it doesn't really work because they call deform in
multiple steps and this confuses SB. Not sure how to deal with
atm.
|
|
- some tweaks to modifier UI thanks to Bart (aligning buttons)
|
|
- removed {lattice,curve}_modifier functions
- changed render code to use displist for curve rendering
instead of making its own. required adding a bevelSplitFlag
field to DispList. I also fixed the bevel face splitting
which did not work correctly in many situations.
- changed so all curve data creation happens in makeDispListCurveTypes,
includes making bevel list and filling polys
- changed render code to use displist for surface rendering
- removed Curve.orco variable, built as needed now
- removed stupid BLI_setScanFill* functions... why use a function
argument when you can use a global and two functions! Why indeed.
(this fixed crash when reloading a file with filled curves and
toggling editmode)
- bug fix, setting curve width!=1 disabled simple bevel for no
apparent reason
- cleaned up lots and lots of curve/displist code (fun example:
"if(dl->type==DL_INDEX3 || dl->type==DL_INDEX3)"). Hmmm!
- switched almost all lattice calls to go through lattice_deform_verts,
only exception left is particles
- added DBG_show_shared_render_faces function in render, just
helps to visualize which verts are shared while testing (no
user interface).
- renamed some curve bevel buttons and rewrote tooltips to be
more obvious
- made CU_FAST work without dupfontbase hack
Also by the way I wrote down some notes on how curve code
works, nothing spiffy but it is at:
http://wiki.blender.org/bin/view.pl/Blenderdev/CurveNotes
|
|
wondered what these silly data pointers in MDeformVert were for.
Turns out they aren't even need! Just taking up extra memory and
space and confusing the armature deform algorithm. Naturally I
had to clean things up. Sorry Ton.
Deform weights are still stored in a pretty expensive and unnecessary
way, probably use about twice as much memory as needed, and do
way too many memory allocs.
- moved armature_deform_verts into armature.c
- some python code accessed the MDeformWeight data pointers, but
did so in a completely wrong way, I am positive this code could
never have worked (or maybe things changed during tons refactor),
regardless it wouldn't work now... will test later.
|
|
editmode
- gcc warning fixes
- start work to make CCGDerivedMesh able to run in object mode (hint: more
speed improvements)
- fix modifier move down tooltip
|
|
- removed mesh_deform (merge into mesh_modifier)
- switch python lattice_apply function to use object_apply_deform,
this isn't exactly equivalent but the python system shouldn't
have been calling that deep into the kernel anyway.
New feature: Modifier stack
- added Object.modifiers (list of ModifierData elements)
- added DNA_modifier_types.h
o contains type definition for the file data for the various
modifier types
- added BKE_modifier.h
o contains modifierType_get_info (access to modifier type registry)
o structs and defines for runtime modifier usage
- updated mesh_calc_modifiers to evaluate modifier stack (note that
for the time being it also evaluates the old style modifiers so files
should load and work as normal).
- add file handling modifier code (todo: don't replicate on object copy)
- add modifier stack UI code (lives in object panel)
Only real new feature at the moment is that you can apply lattices and
curves *after* a subdivision surface which was never possible before.
Todo:
- DEP graph updating does not work correctly yet, so you generally have
to tab cycle to see results.
- editmode calculation does not use modifier stack.
- bug fixes (there must be a few in there somewhere)
|
|
- changed mesh_modifier, sbObjectStep, object_deform to take vertexCo
argument instead of operating on mesh
- fixed bug where a derived mesh would not be returned in editmode
- removed object_wave, replaced by init_wave_deform and calc_wave_deform
- moved cached DerivedMesh to Object, not Mesh... fixes heisenbugs
with linked objects
|
|
- added mesh_get_active_key and replaced code in editmesh to use this
- removed obsolete code in object_deform
|
|
- Armature editmode, while armature was deforming children, was very slow
because it kept making subsurfs... this goes still hackish :)
- CTRL+A on armatures used loadsa old code, removed all of it! Still works.
- Using "Set smooth" or "Set solid" on file loaded without 3d window
crashed
|
|
- In Solid drawmode, bones get drawn solid too now. Including Outline-
selection color, if that's set.
Disable it by setting Object-buttons "drawtype" for the Armature.
Color used for solid bones is in Theme editor.
- EditMode armature now follows (Mesh edit) theme colors (Vertex, Edge)
- PoseMode armature has ThemeColor for selection, and draws three extra
colors now;
- blue shade for bones with action Ipos
- yellow for bones with IK
- green for bones with a constraint
- "X ray" now only works for PoseMode... needs review, can be done better
- "Draw Names" option uses theme color too, also indicates selection.
Fixes;
- In Armature EditMode, the deformed Mesh goes to rest-position
- Border select didn't clear 'active' flag in Bones in PoseMode
- Mouse-click select didn't work when a dashed line was close to 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-
|
|
Note, the tilting only works for '3D' curves, and is accessible in
EditMode curve with TKEY.
|
|
User level notes are in Wiki here;
http://wiki.blender.org/bin/view.pl/Blenderdev/Softbodies
And will be added in blender3d.org CMS later.
Tech level notes are still pending, but here's the most relevant ones;
- made ob->soft struct SoftBody to hold all settings, and read/save in
files
- added (temporal!) conversion for the old settings. So: read old files
with softbody experiments now, and save over!
- cleaned API calls for softbody, which are only 5 of them now:
sbNew()
sbFree()
sbObjectStep() (animation steps)
sbObjectToSoftbody() (full re-initialize data)
sbObjectReset() (only reset motion)
- API calls accepts time in frames now, within softbody.c it converts
Further, internally code was cleaned some (missing tabs etc). Also tried
to keep a well defined structure with hints how to add support for more
objects. Can write notes about that...
|
|
deforms by default. Proved to be a [3] array passed on to function needing
[4] array. Bad bad...
Thanks Ole for finding it! :)
|
|
Lattices seem to have deform lag, when they're animated with Ipos.
Found out this behaviour is already from before 2.25... solved with
removing a where_is_object() from deform code, but dont fully grasp
why.
Tested with good demo file, with motion blur too.
2) No functional changes, just made 2 files compile without warnings;
- added extra ifdefs __NLA_BLENDCON for unused calls
- removed zealot 'const' from function protos and variables, these cannot
work there, and hence gave warnings
- added void pointer casts for array conversions in matrix code
|
|
Right now, it works for Meshes (all deformers including Curve) and for
Curve/Surfaces (only hooks).
More follows.
|
|
Crash is solved now, but create displist fails.
|
|
1) Curve deform
http://www.blender3d.org/cms/Curve_Deform.392.0.html
Works simple as expected, but keep track of the rotation axis
in F7 buttons (Track X Y Z)
Only Mesh deform supported now.
Code changes:
- centralized deformation calls in curve_modifiers() mesh_modifiers()
etcetera. Here also other effects can be added like wave. Now the
evaluation order is fixed, but should become optional. It also doesnt
use the Displist anymore as deform-input. That latter part is unfinished
yet.
This code also is used for Hooks and will be needed for softbody
- made convention stricter that displists are being checked on in
drawobject(), this to prevent routines to make new displists recursively
(like armature does). Now a freedisplist() is sufficient to signal that
a new displaylist should be made.
2) Object Hooks
http://www.blender3d.org/cms/Object_Hooks.391.0.html
Support for Hooks is added to Mesh, Lattice, Curve and Surface objects.
For Armatures this would require some more work & research.
Main goal for this feature is to provide quick & simple access to the
underlying geometry in Objects on Object level, supporting hierarchies and
Ipos etc.
|
|
Animated metaballs didn't update correctly when changing frame, this when
they were parented (for example) to an object with Ipo.
The fix consists of three things:
- the test_displist() call doesn't remake displist anymore, but frees it.
this works, because when drawing an mball object it checks for a displist
and creates one when needed
- the main drawing routine drawview3d() now has a separate loop where first
all objects are updated with where_is_object(), then they're drawn.
This effectively solves lag for mballs. Might improve other lags too!
- included in NumPad-9 call to test_displist() too, to force a full upgraded
3d view
|
|
CTRL+SHIFT+A (apply lattice deform) on a Bezier Curve object was not
implemented yet. Added this.
Little sidenote: when curves are 2D the result will remain 2D, disregarding
deformation in 3rd dimension.
|
|
(MVert,MFace,etc) off into DNA_meshdata_types.h, to isolate areas
of source that actually edit mesh *data* vs. areas that just edit
mesh object information.
|
|
|
|
- fixed compile problem at IRIX with buttons_editing.c (look at JWalton's message in mailing list) ... sorry for mixed commit :-(
|
|
-Ton-
|
|
Reverting this file to it's original
version fixed a bug involving particles
and lattices.
|
|
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
Just need to finish cpp files now :)
Kent
--
mein@cs.umn.edu
|
|
|
|
|