diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-01-22 23:49:38 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-01-22 23:52:15 +0300 |
commit | 3891ad8e03176d993b8082292638117a2963f931 (patch) | |
tree | 93e626c089fc510a9b76571ddd0b225e71cde87d /source/blender/blenkernel/intern/smoke.c | |
parent | 7886db9ba977016199f5b28cbfa179cb97940ff0 (diff) |
Fix T58492: smoke flow jitters around flow source when using adaptive domain.
This is more like a band-aid than a real fix actually, real fix would be
to understand why rendering smoke requires auto texspace to be ON
(afaict, this was not the case in 2.7x)...
But I've already spent way too much time on this issue, at least now we
get better situation than before (i.e. smoke with adaptive domain works
well even when orig domain mesh has autospace flag disabled).
Diffstat (limited to 'source/blender/blenkernel/intern/smoke.c')
-rw-r--r-- | source/blender/blenkernel/intern/smoke.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c index ac9c593ef65..918185e0ffb 100644 --- a/source/blender/blenkernel/intern/smoke.c +++ b/source/blender/blenkernel/intern/smoke.c @@ -2898,15 +2898,21 @@ struct Mesh *smokeModifier_do( BLI_rw_mutex_unlock(smd->domain->fluid_mutex); /* return generated geometry for adaptive domain */ + Mesh *result; if (smd->type & MOD_SMOKE_TYPE_DOMAIN && smd->domain && smd->domain->flags & MOD_SMOKE_ADAPTIVE_DOMAIN && smd->domain->base_res[0]) { - return createDomainGeometry(smd->domain, ob); + result = createDomainGeometry(smd->domain, ob); } else { - return BKE_mesh_copy_for_eval(me, false); + result = BKE_mesh_copy_for_eval(me, false); } + /* XXX This is really not a nice hack, but until root of the problem is understood, + * this should be an acceptable workaround I think. + * See T58492 for details on the issue. */ + result->texflag |= ME_AUTOSPACE; + return result; } static float calc_voxel_transp(float *result, float *input, int res[3], int *pixel, float *tRay, float correct) |