Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Fraser <alex@phatcore.com>2013-02-19 06:24:52 +0400
committerAlex Fraser <alex@phatcore.com>2013-02-19 06:24:52 +0400
commit4e73ff0d637772950f1f54c0259edbc60027cfba (patch)
tree6dc23661614166856f351f73ef0c5f5d6ecb9ec8 /source/blender/blenkernel/BKE_particle.h
parent442d16b46879f9109f4536d48553aa36824b17b1 (diff)
Fix for [#34099] Particles leaking from moving meshes
This was caused by a floating point precision error. During collision detection, Newton-Raphson iteration is used to find the exact time of the collision. But when using subframes, the initial Newton step was too small. Now the initial step is given in absolute units. When subframes = 0, this should behave almost the same as before. Thanks to Janne Karhu, Lukas Toenne and Ton Roosendaal for their help with this patch, and to AutoCRC for funding.
Diffstat (limited to 'source/blender/blenkernel/BKE_particle.h')
-rw-r--r--source/blender/blenkernel/BKE_particle.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_particle.h b/source/blender/blenkernel/BKE_particle.h
index a9a8bc32064..6c207675cb1 100644
--- a/source/blender/blenkernel/BKE_particle.h
+++ b/source/blender/blenkernel/BKE_particle.h
@@ -220,7 +220,10 @@ typedef struct ParticleCollision {
ParticleCollisionElement pce;
- float total_time, inv_timestep;
+ /* total_time is the amount of time in this subframe
+ * inv_total_time is the opposite
+ * inv_timestep is the inverse of the amount of time in this frame */
+ float total_time, inv_total_time, inv_timestep;
float radius;
float co1[3], co2[3];