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-06-24 16:30:49 +0300
committerSebastián Barschkis <sebbas@sebbas.org>2020-06-24 17:07:35 +0300
commit9951858942893adeb4eef27ec8a8471a179e9c59 (patch)
tree46fbf6cc8f3fe65b05ade1b0a6d23737f48bc5f7 /intern/mantaflow/intern/MANTA_main.h
parent9fe64948abe991d18c1af3a52d81e87c24d39687 (diff)
Fluid: Improved OpenVDB support for fluid caches
This commit makes uses of the new OpenVDB IO in Mantaflow (introduced in 781f783a66ac). From now on, fluid cache files in OpenVDB format will contain a list of grids per frame (before: one .vdb file per grid per frame). Besides regular grids, particle systems are also stored using OpenVDBs PointGrid data structures. All older cache formats will remain fully functional: - Uni caches (.uni) files are still available from the UI and can be used as before - Raw caches (.raw) are no longer available from the UI, but loading them is still possible - Old OpenVDB caches (one .vdb per grid) can no longer be baked either, but loading them is still possible. It is also no longer possible to choose file formats for 'Noise' and 'Particles'. Instead there are now options to set the file format for 'Volumetric' and for 'Mesh' data. Known issues (planned to be resolved soon): - OpenVDB files are currently not taking into consideration the clipping value (FluidDomainSettings). Empty cells are therefore being written too. Depending on the scene, this can make file sizes unnecessarily large. - Domains are not being exported at their world position. Instead they are always clipped to the origin.
Diffstat (limited to 'intern/mantaflow/intern/MANTA_main.h')
-rw-r--r--intern/mantaflow/intern/MANTA_main.h29
1 files changed, 3 insertions, 26 deletions
diff --git a/intern/mantaflow/intern/MANTA_main.h b/intern/mantaflow/intern/MANTA_main.h
index 6a8484c75d9..38cbd33ea0a 100644
--- a/intern/mantaflow/intern/MANTA_main.h
+++ b/intern/mantaflow/intern/MANTA_main.h
@@ -60,19 +60,6 @@ struct MANTA {
int flags;
} Triangle;
- // Cache helper typedefs
- typedef struct GridItem {
- void **pointer; /* Array of pointers for this grid.*/
- int type;
- int *res;
- string name;
- } GridItem;
-
- typedef struct FileItem {
- string filename;
- vector<GridItem> grids;
- } FileItem;
-
// Manta step, handling everything
void step(struct FluidModifierData *mmd, int startFrame);
@@ -104,10 +91,10 @@ struct MANTA {
// Read cache (via Manta save/load)
bool readConfiguration(FluidModifierData *mmd, int framenr);
- bool readData(FluidModifierData *mmd, int framenr);
- bool readNoise(FluidModifierData *mmd, int framenr);
+ bool readData(FluidModifierData *mmd, int framenr, bool resumable);
+ bool readNoise(FluidModifierData *mmd, int framenr, bool resumable);
bool readMesh(FluidModifierData *mmd, int framenr);
- bool readParticles(FluidModifierData *mmd, int framenr);
+ bool readParticles(FluidModifierData *mmd, int framenr, bool resumable);
bool readGuiding(FluidModifierData *mmd, int framenr, bool sourceDomain);
// Read cache (via file read functions in MANTA - e.g. read .bobj.gz meshes, .uni particles)
@@ -899,16 +886,6 @@ struct MANTA {
string getRealValue(const string &varName);
string parseLine(const string &line);
string parseScript(const string &setup_string, FluidModifierData *mmd = NULL);
- bool updateMeshFromBobj(string filename);
- bool updateMeshFromObj(string filename);
- bool updateMeshFromUni(string filename);
- bool updateParticlesFromUni(string filename, bool isSecondarySys, bool isVelData);
- bool updateGridsFromUni(string filename, vector<GridItem> grids);
- bool updateGridsFromVDB(string filename, vector<GridItem> grids);
- bool updateGridsFromRaw(string filename, vector<GridItem> grids);
- bool updateMeshFromFile(string filename);
- bool updateParticlesFromFile(string filename, bool isSecondarySys, bool isVelData);
- bool updateGridsFromFile(string filename, vector<GridItem> grids);
string getDirectory(struct FluidModifierData *mmd, string subdirectory);
string getFile(struct FluidModifierData *mmd,
string subdirectory,