diff options
Diffstat (limited to 'source/blender/makesdna/DNA_object_force.h')
-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 */ |