diff options
author | Janne Karhu <jhkarh@gmail.com> | 2010-12-11 16:51:04 +0300 |
---|---|---|
committer | Janne Karhu <jhkarh@gmail.com> | 2010-12-11 16:51:04 +0300 |
commit | 63a508408d63c2a8853b6b0eac374c348c4c8ed1 (patch) | |
tree | c941daad5d9bff8023458e614419256c2c5dfe73 | |
parent | f03735552bec066fc14696a879e441eb29bba7c1 (diff) |
Added some explanation to pointcache->step value as suggested by troubled on irc.
-rw-r--r-- | source/blender/makesdna/DNA_object_force.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_object_force.h b/source/blender/makesdna/DNA_object_force.h index 4515a6c05a3..8a6018fb7ea 100644 --- a/source/blender/makesdna/DNA_object_force.h +++ b/source/blender/makesdna/DNA_object_force.h @@ -154,7 +154,19 @@ typedef struct PTCacheMem { typedef struct PointCache { struct PointCache *next, *prev; int flag; /* generic flag */ - int step; /* frames between cached frames */ + + int step; /* The number of frames between cached frames. + * This should probably be an upper bound for a per point adaptive step in the future, + * buf for now it's the same for all points. Without adaptivity this can effect the perceived + * simulation quite a bit though. If for example particles are colliding with a horizontal + * plane (with high damping) they quickly come to a stop on the plane, however there are still + * forces acting on the particle (gravity and collisions), so the particle velocity isn't necessarily + * zero for the whole duration of the frame even if the particle seems stationary. If all simulation + * frames aren't cached (step > 1) these velocities are interpolated into movement for the non-cached + * frames. The result will look like the point is oscillating around the collision location. So for + * now cache step should be set to 1 for accurate reproduction of collisions. + */ + int simframe; /* current frame of simulation (only if SIMULATION_VALID) */ int startframe; /* simulation start frame */ int endframe; /* simulation end frame */ |