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:
authorSebastián Barschkis <sebbas@sebbas.org>2020-11-05 17:05:30 +0300
committerSebastián Barschkis <sebbas@sebbas.org>2020-11-05 17:06:01 +0300
commit8720c660094e7b08fe4ac8a1879feb2b3aac838e (patch)
tree529c4cce7940467aad0f7e105732f796d563481d /intern/mantaflow/intern/MANTA_main.cpp
parentcba6b4f4a15567c69c452e8c60dc463b1e2efbb9 (diff)
Fluid: Potential fix for T74559: Adaptive Domain creates lines in smoke
This commit corrects the maximum resolution field in Fluid objects. The field should be set to the maximum possible resolution, i.e. it should not adjust with adaptive domains and stay constant all the time. The reason for this is that this resolution value will be used to scale gravity. And this gravity should be constant for adaptive domains too. It remains to be shown if this issue was the only reason for line-artifacts as seen in T74559.
Diffstat (limited to 'intern/mantaflow/intern/MANTA_main.cpp')
-rw-r--r--intern/mantaflow/intern/MANTA_main.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/intern/mantaflow/intern/MANTA_main.cpp b/intern/mantaflow/intern/MANTA_main.cpp
index 729cb151a39..0dbbd1ee9d0 100644
--- a/intern/mantaflow/intern/MANTA_main.cpp
+++ b/intern/mantaflow/intern/MANTA_main.cpp
@@ -56,7 +56,8 @@ using std::to_string;
atomic<int> MANTA::solverID(0);
int MANTA::with_debug(0);
-MANTA::MANTA(int *res, FluidModifierData *fmd) : mCurrentID(++solverID)
+MANTA::MANTA(int *res, FluidModifierData *fmd)
+ : mCurrentID(++solverID), mMaxRes(fmd->domain->maxres)
{
if (with_debug)
cout << "FLUID: " << mCurrentID << " with res(" << res[0] << ", " << res[1] << ", " << res[2]
@@ -85,11 +86,10 @@ MANTA::MANTA(int *res, FluidModifierData *fmd) : mCurrentID(++solverID)
mUsingInvel = (fds->active_fields & FLUID_DOMAIN_ACTIVE_INVEL);
mUsingOutflow = (fds->active_fields & FLUID_DOMAIN_ACTIVE_OUTFLOW);
- /* Simulation constants. */
- mResX = res[0];
+ /* Simulation constants */
+ mResX = res[0]; /* Current size of domain (will adjust with adaptive domain). */
mResY = res[1];
mResZ = res[2];
- mMaxRes = MAX3(mResX, mResY, mResZ);
mTotalCells = mResX * mResY * mResZ;
mResGuiding = fds->res;