Page MenuHome

smoke flow jitters around flow source when using adaptive domain
Closed, ResolvedPublic


System Information
Operating system: windows 10
Graphics card: nvidia gt970 4gb

Blender Version
Broken: smoke simulation

2.80 beta 0f5b53ba4dc

smoke simulation jitters around in the domain when adaptive domain is used instead of flowing naturally.

Exact steps for others to reproduce the error
make a smoke domain from the default cube, and add a new cubemake it smaller and aply the scale. then make it a smoke flow object. set the adaptive domain and bake the sim. on playback/render the smoke moves around the source cube instead of flowing from a fixed position.

Event Timeline

Can confirm the jittering behavior. Last known good commit is e60c49ecf06815039137c98f86a7198d6ee81e14 from November 25, 2018. (that time i last merged 2.8 into temp-fracture-modifier-2.8, and it works in the branch)
So i am trying to git bisect now from there till HEAD to find the faulty commit... I keep you posted.

And the winner is : 33cbcd73448fb1cedc083c2b1fb9a27489d09432 from November 26, 2018 , question is how to fix that... hmm

Bastien Montagne (mont29) renamed this task from smoke flow jitters around flow source to smoke flow jitters around flow source when using adaptive domain.Dec 3 2018, 9:13 PM
Bastien Montagne (mont29) triaged this task as Confirmed, Medium priority.

In fact, I believe this is a drawing issue, probably smoke draw code assuming texspace would be the one of the final evaluated mesh or something like that? Smoke simulation code itself at least is not affected by that afaict, it computes its own bbox…

When adaptive domain is enabled, that bbox is recomputed for every frame, and the 'mesh' domain size adjusted as needed, while for fixed domain it is only computed once (and current drawing with adaptive domain on is not only jittering, it is also clearly over-scaled).

I can look further into this if needed, but maybe it’s simpler for @Clément Foucault (fclem) to first have a look and see if fix is simple from drawcode side (knowing that mesh's texspace should now always be orig mesh one, and no more recomputed from final eval mesh)?

So this is not a drawing issue. The texspace should be set accordingly for the adaptive domains (which is only valid on the evaluated mesh since it changes size).

So the update need to be propagated down somehow.
However, BKE_object_dimensions_get() does work fine so the actual bounding box is correct.
It seems that the bbox is changed somewhere by the smoke sim.

Also @Martin Felke (scorpion81) said on IRC that the texspace is used indirectly by the transform code and that it also behaves strangely.

Well, in most cases we want to keep texspace from orig mesh (i.e. not take into account changes from modifier stack). Otherwise, you get fluctuating texturing when modifiers change bounds of the geometry. So question here is: do we want/need to make an exception for domain of smoke sim (and maybe others? Though iirc fluid e.g. generated geometry, not a 3D texture…)?

Is this bug a regression related to this issue ?

I’ve already spent way too much time on this, with very little real result so far.

I am pretty sure that smoke simulation code itself is not affected, afaict before/after rB33cbcd73448fb1 we have the same result on simulation itself.

Also, rB33cbcd73448fb1 is only revealing the problem, before that commit you can get exact same bug by disabling auto texspace in mesh options (for the domain one).

So I would suspect something wrong going with pointcache (and/or the way it is used by the renderers), but am really, like really not familiar with this code. For now, I'll hack a workaround re-enabling autotexspace (and even forcing it) on domain mesh generated by smoke sim process, that will at least cure the symptoms, in lack of medicine for the illness itself...

Think this bug is back - bb88485a1693751baff8a61917987323dbee654a distorts smoke with the adaptive domain.

It's also present in the Mantaflow branch. I am going to look into this and see if I can find something.