history was lost... I think, dunno this code well.)
- commented out code to do merging of quad with 3 verts shared in
mirror mode... didnt seem worth the effort and mesh still wasnt
perfect afterwards
- bug fix, indices for triangles were not swapped correctly in
mirror, could lead to crash with subsurf in editmode
- 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
Typo in bspline interpolation code... a '1' should be '2', causing the
fourth key of interpolation always be equal to third.
Only shows error with larger key steps, like 5 frames or more. Nice it
was found before release!
- fixed error in option "Enable Goal" which didn't work with Vertex groups
assigned
- renamed some buttons & fixed tooltips. A doc online will be there soon
Note: currently the 'baking' stores the entire animation system, which
makes further animation refining (or duplicating) useless for a Baked
SoftBody. You can even delete the entire anim system.
This can be presented as a feature too (saves slow armature stuff).
However, I might check on a 'relative' bake too.
Works as follows;
- press the 'show bake settings' button (no space left... :)
- define start/end frame for bake, and an interval step.
The baked result interpolates nicely (Bspline, 4 keys) so in general a
step size of 2 or 3 still gives OK results.
- Press "BAKE". This will do a full animation + playback. Press ESC if it
you don't want it.
Once Baked, the BAKE button becomes a FREE BAKE. As reminder the softbody
buttons get blocked with error() menu.
This saves OK in a file. Renders any frame, including fields and moblur.
You can also set a "Timeoffs" for the softbody. And yes, this should be
in the NLA once... :)
NOTE! With this commit, files saved with the old (first commit) version by
Jens Ole won't read the settings back... he stored all sofbody variables in
Object, which was moved to a new struct when I did my first commit on SB
(over a month ago)
Also note that I moved particle deflecting & softbody to a new include.
softbody.c I removed an unused var.
text.c added return values to 2 return statements that didn't have anything.
Makefile added $(FIX_STUBS_WARNINGS) to CFLAGS for the stub.
source/blender/src/editface.c fixed up int vs unsigned int stuff
source/blender/src/resources.c had two vars declared as unsigned char *
and then inputs to them were cast as char * so updated the casts.
Kent
done for lattices... these keep calling this during transform, causing
the lattice itself and its children (if soft) to remain static on same
position.
Real solution has to be 2-fold:
- store deformed lattice points in Lattice, as a "DispList"
- usage of proper depgraph :)
There's also the idea to keep simulating softbody during a transform, to
give feedback on what softbody does... later.
SoftBodyDetectCollision() is handeling the case
'user wants to prevent self intersection by declaring SB object a deflection target'
ahh .. yeah .. i can see the bug reports on that
(me shrugs .. never promised that to work)
(which still can't really handle moving targets)
leaving 2 bug fixes
1. multiple objects need a reset on cache variable
2. quads always need to be handled as 2 triangles
(since they don't need to share a plane)
added a collision detecting function in effect.c for SB
( no need to be there, but i did not find a better place )
but should handle 'moving targets' up to 0.2 blender units/frame
well .. important info in this case:
collision
uses 'face normal' to decide if *intrusion* happend
uses 'damping' of collision target to slow down movement
when *intrusion* happend
+some more removing unneeded code in softbody.c
- after grab/duplicate the softbody didn't get a reset signal
- added 'copy properties' for softbody settings
- duplicate object didn't copy softbody yet
- Added browsing for vertex group for "Goal" in SoftBody buttons.
- Means the default name "SOFTGOAL" isn't needed anymore
- temporally, on file read, the "SOFTGOAL" vertex group is set, if exists
- removing vertex group possible too
- changed softbody.c code to use this
so we can decide later what proper timing is meant to be.
i've prepared something in static float sb_time_scale(Object *ob) [softbody.c] (ton :) )
'hacked in' particle collision system to match softbodies needs
naa .. i don't realy like the hack to int pdDoDeflection(..) in kernel .. effect.c (but it works :) )
so .. until we'll have a 'nice' collision detector this is what 'softbodies simulator can live with'
did not remove intentionally test function static int sb_deflect_test(..) for further discussions
http://mitglied.lycos.de/mosebjorn/hidden/ sbcol6.blend should work for a while
claened up sbObjectStep(...) to follow 'time step rules'
added really care for framerate in scene
renamed arguments in softbody_calc_forces(...); and softbody_apply_forces(...); for better reading
fixed particle integration to be ODE solver compatible
- Added new (Particle) Deflector; type Wind.
Wind gives constant directional force. It is animatable (Ipos) and reacts
to Object scaling. Also uses FallOff. Works for particles and SoftBody
quick movie check; http://www.blender.org/bf/0001_0250.avi
test file is in download.blender.org/demo/test/wind_soft.blend
- Added MaxDist option for forcefields, to control its influence better.
Is drawn as circle in 3d window.
Forcefields are a bit weak still... should react to scaling, or not; in
that case drawing should indicate it (done for spherical field now).
- on add new SoftBody, it creates automatically edges in Mesh now, gives
too confusing results otherwise
- if no edges exist in mesh, it also doesnt add diagonals for faces in
softbody
Transform;
- fixed stupid 'used unitialized' gcc warning (sorry theeth!)
- made dualAxisConstraint() accept string too
- little cleanup of prints in using Manipulators
- Added Softbody effect for Lattices (not too useful yet without
vertexgroups though)
- Added default vertex "goal" value + button, to be assigned when no
vertexgroup exists (or vertex isn't in the group)
- Made softmin and softmax work as documented (defining min and max range)
- made changes in buttons send 'update' signal to softbody
And:
- added Nkey Properties to show lattice coordinates
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...