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:
authorMiika Hamalainen <blender@miikah.org>2013-05-21 22:59:46 +0400
committerMiika Hamalainen <blender@miikah.org>2013-05-21 22:59:46 +0400
commita8ec403d72030a2a568f358d4e16bc9bef31c827 (patch)
treed0c4afb08ff7ac66f03dbcbf00e000f01d769cda /source/blender/blenkernel/intern/smoke.c
parentf276f7f2ef7202582d48851bd66846b6e6777e5b (diff)
Fix: Smoke adaptive domain applied velocity in wrong unit space causing high velocities never apply additional margin ahead the fluid.
Also skip new flow velocity because thats not accurate enough to be of any use in there.
Diffstat (limited to 'source/blender/blenkernel/intern/smoke.c')
-rw-r--r--source/blender/blenkernel/intern/smoke.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index e5a73621649..669be5fc6ec 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -1789,19 +1789,12 @@ static void adjustDomainResolution(SmokeDomainSettings *sds, int new_shift[3], E
if (max[1] < y) max[1] = y;
if (max[2] < z) max[2] = z;
}
- /* velocity bounds */
- if (em->velocity) {
- if (min_vel[0] > em->velocity[index * 3]) min_vel[0] = em->velocity[index * 3];
- if (min_vel[1] > em->velocity[index * 3 + 1]) min_vel[1] = em->velocity[index * 3 + 1];
- if (min_vel[2] > em->velocity[index * 3 + 2]) min_vel[2] = em->velocity[index * 3 + 2];
- if (max_vel[0] < em->velocity[index * 3]) max_vel[0] = em->velocity[index * 3];
- if (max_vel[1] < em->velocity[index * 3 + 1]) max_vel[1] = em->velocity[index * 3 + 1];
- if (max_vel[2] < em->velocity[index * 3 + 2]) max_vel[2] = em->velocity[index * 3 + 2];
- }
}
}
/* calculate new bounds based on these values */
+ mul_v3_fl(min_vel, 1.0f / sds->dx);
+ mul_v3_fl(max_vel, 1.0f / sds->dx);
clampBoundsInDomain(sds, min, max, min_vel, max_vel, sds->adapt_margin + 1, dt);
for (i = 0; i < 3; i++) {