diff options
author | Miika Hamalainen <blender@miikah.org> | 2013-08-30 13:59:49 +0400 |
---|---|---|
committer | Miika Hamalainen <blender@miikah.org> | 2013-08-30 13:59:49 +0400 |
commit | 21d670e11efbe292317c85b0d72e70c75eae57b4 (patch) | |
tree | 3fdd80d9dace9933c650c639acbb488be9d28d8f /source/blender/blenkernel/intern | |
parent | 91e5189c9077c71c0f17db31903154fc2650458a (diff) |
Fix [#36600]: Smoke subframes not working with initial velocity
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/smoke.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c index bb65955e3b5..189c1e967dd 100644 --- a/source/blender/blenkernel/intern/smoke.c +++ b/source/blender/blenkernel/intern/smoke.c @@ -1142,8 +1142,8 @@ static void em_combineMaps(EmissionMap *output, EmissionMap *em2, int hires_mult /* values */ output->influence[index_out] = em1.influence[index_in]; - if (output->velocity) { - output->velocity[index_out] = em1.velocity[index_in]; + if (output->velocity && em1.velocity) { + copy_v3_v3(&output->velocity[index_out * 3], &em1.velocity[index_in * 3]); } } @@ -1160,9 +1160,11 @@ static void em_combineMaps(EmissionMap *output, EmissionMap *em2, int hires_mult else { output->influence[index_out] = MAX2(em2->influence[index_in], output->influence[index_out]); } - if (output->velocity) { + if (output->velocity && em2->velocity) { /* last sample replaces the velocity */ - output->velocity[index_out] = ADD_IF_LOWER(output->velocity[index_out], em2->velocity[index_in]); + output->velocity[index_out * 3] = ADD_IF_LOWER(output->velocity[index_out * 3], em2->velocity[index_in * 3]); + output->velocity[index_out * 3 + 1] = ADD_IF_LOWER(output->velocity[index_out * 3 + 1], em2->velocity[index_in * 3 + 1]); + output->velocity[index_out * 3 + 2] = ADD_IF_LOWER(output->velocity[index_out * 3 + 2], em2->velocity[index_in * 3 + 2]); } } } // low res loop |