Skip to content

Commit 398fed7

Browse files
committed
new demo version 0.6.5!
1 parent f353224 commit 398fed7

15 files changed

+76
-43
lines changed

README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
Want to try the FLIP Fluids addon before buying the [full marketplace product](https://github.com/rlguy/Blender-FLIP-Fluids/wiki/Official-Marketplaces-of-the-FLIP-Fluids-Addon)? Try out the **FLIP Fluids Demo** addon! The FLIP Fluids demo can do almost everything that the full version can and will let you create, run, and render your own fluid simulations with a few small limitations.
1+
Want to try the FLIP Fluids addon before buying the [full marketplace product](https://github.com/rlguy/Blender-FLIP-Fluids/wiki/Official-Marketplaces-of-the-FLIP-Fluids-Addon)? Try out the **FLIP Fluids Demo** addon! The FLIP Fluids demo can do almost everything that the full version can and will let you create, run, and render your own fluid simulations with a few small limitations. The demo version is always up-to-date with the latest features and fixes of the full version.
22

33
### Limitations
44

5-
- Simulation meshes are watermarked with _FLIP Fluids Demo_ text
5+
- Simulation meshes are watermarked with _FLIP Fluids Addon_ text
66
- Note: the watermark of the demo is baked directly into the simulation meshes. If you install the full version of the addon and load a simulation cache created with the demo version, you will need to re-bake the simulation to remove the watermark.
77
- The [Mixbox simulated color blending features](https://github.com/rlguy/Blender-FLIP-Fluids/wiki/Mixbox-Installation-and-Uninstallation) are not available in this demo. Color blending features will be limited to basic RGB blending methods.
8+
- Supplementary product content such as [[Example Scenes|Example-Scene-Descriptions]] and [Preset Library Scenes](Preset-Library-Installation-and-Uninstallation) will not be available in the demo.
89

910
### Getting Started
1011

11-
Download the latest FLIP Fluids Demo installation file here: [FLIP_Fluids_addon_0.6.4_demo_(23_may_2023.zip)](https://github.com/rlguy/Blender-FLIP-Fluids/releases/download/v0.6.3/FLIP_Fluids_addon_0.6.4_demo_.23_may_2023.zip)
12+
Download the latest FLIP Fluids Demo installation file here: [FLIP_Fluids_addon_0.6.5_demo_(07_jun_2023.zip)](https://github.com/rlguy/Blender-FLIP-Fluids/releases/download/v0.6.3/FLIP_Fluids_addon_0.6.5_demo_.07_jun_2023.zip)
1213

1314
After downloading the demo addon, follow our [Installation Instructions](https://github.com/rlguy/Blender-FLIP-Fluids/wiki/Addon-Installation-and-Uninstallation). The instructions are similar to installing any other Blender addon.
1415

cmake/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ set(CMAKE_BUILD_TYPE Release)
5353
set(FLUIDENGINE_VERSION_TYPE_IS_STABLE_BUILD TRUE)
5454
set(FLUIDENGINE_VERSION_MAJOR 0)
5555
set(FLUIDENGINE_VERSION_MINOR 6)
56-
set(FLUIDENGINE_VERSION_REVISION 4)
57-
set(FLUIDENGINE_VERSION_DATE "23-MAY-2023")
56+
set(FLUIDENGINE_VERSION_REVISION 5)
57+
set(FLUIDENGINE_VERSION_DATE "07-JUN-2023")
5858

5959
if(FLUIDENGINE_VERSION_TYPE_IS_STABLE_BUILD)
6060
set(FLUIDENGINE_VERSION_TYPE_LABEL "Demo")
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

src/engine/fluidsimulation.cpp

+62-35
Original file line numberDiff line numberDiff line change
@@ -10442,21 +10442,40 @@ void FluidSimulation::_updateSheetSeeding() {
1044210442
_markerParticles.getAttributeValues("VELOCITY", velocities);
1044310443

1044410444
std::vector<float> *ages;
10445+
Array3d<float> tempAgeAttributeGrid;
10446+
Array3d<bool> tempAgeAttributeValidGrid;
1044510447
if (_isSurfaceAgeAttributeEnabled) {
10448+
tempAgeAttributeGrid = _ageAttributeGrid;
10449+
tempAgeAttributeValidGrid = _ageAttributeValidGrid;
1044610450
_markerParticles.getAttributeValues("AGE", ages);
10447-
_updateMarkerParticleAgeAttributeGrid();
10451+
_updateMarkerParticleAgeAttributeGrid(tempAgeAttributeGrid, tempAgeAttributeValidGrid);
1044810452
}
1044910453

1045010454
std::vector<float> *viscosities;
10455+
Array3d<float> tempViscosityAttributeGrid;
10456+
Array3d<bool> tempViscosityAttributeValidGrid;
1045110457
if (_isSurfaceSourceViscosityAttributeEnabled) {
10458+
tempViscosityAttributeGrid = _viscosityAttributeGrid;
10459+
tempViscosityAttributeValidGrid = _viscosityAttributeValidGrid;
1045210460
_markerParticles.getAttributeValues("VISCOSITY", viscosities);
10453-
_updateMarkerParticleViscosityAttributeGrid();
10461+
_updateMarkerParticleViscosityAttributeGrid(tempViscosityAttributeGrid, tempViscosityAttributeValidGrid);
1045410462
}
1045510463

1045610464
std::vector<vmath::vec3> *colors;
10465+
Array3d<float> tempColorAttributeGridR;
10466+
Array3d<float> tempColorAttributeGridG;
10467+
Array3d<float> tempColorAttributeGridB;
10468+
Array3d<bool> tempColorAttributeValidGrid;
1045710469
if (_isSurfaceSourceColorAttributeEnabled) {
10470+
tempColorAttributeGridR = _colorAttributeGridR;
10471+
tempColorAttributeGridG = _colorAttributeGridG;
10472+
tempColorAttributeGridB = _colorAttributeGridB;
10473+
tempColorAttributeValidGrid = _colorAttributeValidGrid;
1045810474
_markerParticles.getAttributeValues("COLOR", colors);
10459-
_updateMarkerParticleColorAttributeGrid();
10475+
_updateMarkerParticleColorAttributeGrid(tempColorAttributeGridR,
10476+
tempColorAttributeGridG,
10477+
tempColorAttributeGridB,
10478+
tempColorAttributeValidGrid);
1046010479
}
1046110480

1046210481
vmath::vec3 goffset(0.5f * _dx, 0.5f * _dx, 0.5f * _dx);
@@ -10483,19 +10502,19 @@ void FluidSimulation::_updateSheetSeeding() {
1048310502
velocities->push_back(v);
1048410503

1048510504
if (_isSurfaceAgeAttributeEnabled) {
10486-
float age = Interpolation::trilinearInterpolate(p - goffset, _dx, _ageAttributeGrid);
10505+
float age = Interpolation::trilinearInterpolate(p - goffset, _dx, tempAgeAttributeGrid);
1048710506
ages->push_back(age);
1048810507
}
1048910508

1049010509
if (_isSurfaceSourceViscosityAttributeEnabled) {
10491-
float viscosity = Interpolation::trilinearInterpolate(p - goffset, _dx, _viscosityAttributeGrid);
10510+
float viscosity = Interpolation::trilinearInterpolate(p - goffset, _dx, tempViscosityAttributeGrid);
1049210511
viscosities->push_back(viscosity);
1049310512
}
1049410513

1049510514
if (_isSurfaceSourceColorAttributeEnabled) {
10496-
float r = Interpolation::trilinearInterpolate(p - goffset, _dx, _colorAttributeGridR);
10497-
float g = Interpolation::trilinearInterpolate(p - goffset, _dx, _colorAttributeGridG);
10498-
float b = Interpolation::trilinearInterpolate(p - goffset, _dx, _colorAttributeGridB);
10515+
float r = Interpolation::trilinearInterpolate(p - goffset, _dx, tempColorAttributeGridR);
10516+
float g = Interpolation::trilinearInterpolate(p - goffset, _dx, tempColorAttributeGridG);
10517+
float b = Interpolation::trilinearInterpolate(p - goffset, _dx, tempColorAttributeGridB);
1049910518
vmath::vec3 color(r, g, b);
1050010519
colors->push_back(color);
1050110520
}
@@ -10791,9 +10810,10 @@ void FluidSimulation::_updateMarkerParticleVorticityAttributeGrid() {
1079110810
}
1079210811
}
1079310812

10794-
void FluidSimulation::_updateMarkerParticleAgeAttributeGrid() {
10795-
_ageAttributeGrid.fill(0.0f);
10796-
_ageAttributeValidGrid.fill(false);
10813+
void FluidSimulation::_updateMarkerParticleAgeAttributeGrid(Array3d<float> &ageAttributeGrid,
10814+
Array3d<bool> &ageAttributeValidGrid) {
10815+
ageAttributeGrid.fill(0.0f);
10816+
ageAttributeValidGrid.fill(false);
1079710817

1079810818
std::vector<vmath::vec3> *positions;
1079910819
std::vector<float> *ages;
@@ -10804,20 +10824,21 @@ void FluidSimulation::_updateMarkerParticleAgeAttributeGrid() {
1080410824
AttributeTransferParameters<float> params;
1080510825
params.positions = positions;
1080610826
params.attributes = ages;
10807-
params.attributeGrid = &_ageAttributeGrid;
10808-
params.validGrid = &_ageAttributeValidGrid;
10827+
params.attributeGrid = &ageAttributeGrid;
10828+
params.validGrid = &ageAttributeValidGrid;
1080910829
params.particleRadius = radius;
1081010830
params.dx = _dx;
1081110831

1081210832
AttributeToGridTransfer<float> attributeTransfer;
1081310833
attributeTransfer.transfer(params);
1081410834

10815-
GridUtils::extrapolateGrid(&_ageAttributeGrid, &_ageAttributeValidGrid, _CFLConditionNumber);
10835+
GridUtils::extrapolateGrid(&ageAttributeGrid, &ageAttributeValidGrid, _CFLConditionNumber);
1081610836
}
1081710837

10818-
void FluidSimulation::_updateMarkerParticleViscosityAttributeGrid() {
10819-
_ageAttributeGrid.fill(0.0f);
10820-
_ageAttributeValidGrid.fill(false);
10838+
void FluidSimulation::_updateMarkerParticleViscosityAttributeGrid(Array3d<float> &viscosityAttributeGrid,
10839+
Array3d<bool> &viscosityAttributeValidGrid) {
10840+
viscosityAttributeGrid.fill(0.0f);
10841+
viscosityAttributeValidGrid.fill(false);
1082110842

1082210843
std::vector<vmath::vec3> *positions;
1082310844
std::vector<float> *viscosities;
@@ -10828,22 +10849,25 @@ void FluidSimulation::_updateMarkerParticleViscosityAttributeGrid() {
1082810849
AttributeTransferParameters<float> params;
1082910850
params.positions = positions;
1083010851
params.attributes = viscosities;
10831-
params.attributeGrid = &_viscosityAttributeGrid;
10832-
params.validGrid = &_viscosityAttributeValidGrid;
10852+
params.attributeGrid = &viscosityAttributeGrid;
10853+
params.validGrid = &viscosityAttributeValidGrid;
1083310854
params.particleRadius = radius;
1083410855
params.dx = _dx;
1083510856

1083610857
AttributeToGridTransfer<float> attributeTransfer;
1083710858
attributeTransfer.transfer(params);
1083810859

10839-
GridUtils::extrapolateGrid(&_viscosityAttributeGrid, &_viscosityAttributeValidGrid, _CFLConditionNumber);
10860+
GridUtils::extrapolateGrid(&viscosityAttributeGrid, &viscosityAttributeValidGrid, _CFLConditionNumber);
1084010861
}
1084110862

10842-
void FluidSimulation::_updateMarkerParticleColorAttributeGrid() {
10843-
_colorAttributeGridR.fill(0.0f);
10844-
_colorAttributeGridG.fill(0.0f);
10845-
_colorAttributeGridB.fill(0.0f);
10846-
_colorAttributeValidGrid.fill(false);
10863+
void FluidSimulation::_updateMarkerParticleColorAttributeGrid(Array3d<float> &colorAttributeGridR,
10864+
Array3d<float> &colorAttributeGridG,
10865+
Array3d<float> &colorAttributeGridB,
10866+
Array3d<bool> &colorAttributeValidGrid) {
10867+
colorAttributeGridR.fill(0.0f);
10868+
colorAttributeGridG.fill(0.0f);
10869+
colorAttributeGridB.fill(0.0f);
10870+
colorAttributeValidGrid.fill(false);
1084710871

1084810872
Array3d<vmath::vec3> colorAttributeGrid(_isize, _jsize, _ksize, vmath::vec3());
1084910873

@@ -10857,7 +10881,7 @@ void FluidSimulation::_updateMarkerParticleColorAttributeGrid() {
1085710881
params.positions = positions;
1085810882
params.attributes = colors;
1085910883
params.attributeGrid = &colorAttributeGrid;
10860-
params.validGrid = &_colorAttributeValidGrid;
10884+
params.validGrid = &colorAttributeValidGrid;
1086110885
params.particleRadius = radius;
1086210886
params.dx = _dx;
1086310887

@@ -10871,16 +10895,16 @@ void FluidSimulation::_updateMarkerParticleColorAttributeGrid() {
1087110895
float rval = _clamp(color.x, 0.0f, 1.0f);
1087210896
float gval = _clamp(color.y, 0.0f, 1.0f);
1087310897
float bval = _clamp(color.z, 0.0f, 1.0f);
10874-
_colorAttributeGridR.set(i, j, k, rval);
10875-
_colorAttributeGridG.set(i, j, k, gval);
10876-
_colorAttributeGridB.set(i, j, k, bval);
10898+
colorAttributeGridR.set(i, j, k, rval);
10899+
colorAttributeGridG.set(i, j, k, gval);
10900+
colorAttributeGridB.set(i, j, k, bval);
1087710901
}
1087810902
}
1087910903
}
1088010904

10881-
GridUtils::extrapolateGrid(&_colorAttributeGridR, &_colorAttributeValidGrid, _CFLConditionNumber);
10882-
GridUtils::extrapolateGrid(&_colorAttributeGridG, &_colorAttributeValidGrid, _CFLConditionNumber);
10883-
GridUtils::extrapolateGrid(&_colorAttributeGridB, &_colorAttributeValidGrid, _CFLConditionNumber);
10905+
GridUtils::extrapolateGrid(&colorAttributeGridR, &colorAttributeValidGrid, _CFLConditionNumber);
10906+
GridUtils::extrapolateGrid(&colorAttributeGridG, &colorAttributeValidGrid, _CFLConditionNumber);
10907+
GridUtils::extrapolateGrid(&colorAttributeGridB, &colorAttributeValidGrid, _CFLConditionNumber);
1088410908
}
1088510909

1088610910
void FluidSimulation::_updateMarkerParticleColorAttributeMixing(double dt) {
@@ -11115,7 +11139,7 @@ void FluidSimulation::_updateMarkerParticleAgeAttribute(double dt) {
1111511139
}
1111611140

1111711141
if (_currentFrameTimeStepNumber == 0) {
11118-
_updateMarkerParticleAgeAttributeGrid();
11142+
_updateMarkerParticleAgeAttributeGrid(_ageAttributeGrid, _ageAttributeValidGrid);
1111911143
}
1112011144

1112111145
std::vector<float> *ages;
@@ -11131,7 +11155,7 @@ void FluidSimulation::_updateMarkerParticleViscosityAttribute() {
1113111155
}
1113211156

1113311157
if (_currentFrameTimeStepNumber == 0) {
11134-
_updateMarkerParticleViscosityAttributeGrid();
11158+
_updateMarkerParticleViscosityAttributeGrid(_viscosityAttributeGrid, _viscosityAttributeValidGrid);
1113511159
}
1113611160
}
1113711161

@@ -11141,7 +11165,10 @@ void FluidSimulation::_updateMarkerParticleColorAttribute(double dt) {
1114111165
}
1114211166

1114311167
if (_currentFrameTimeStepNumber == 0) {
11144-
_updateMarkerParticleColorAttributeGrid();
11168+
_updateMarkerParticleColorAttributeGrid(_colorAttributeGridR,
11169+
_colorAttributeGridG,
11170+
_colorAttributeGridB,
11171+
_colorAttributeValidGrid);
1114511172
}
1114611173

1114711174
_updateMarkerParticleColorAttributeMixing(dt);

src/engine/fluidsimulation.h

+8-3
Original file line numberDiff line numberDiff line change
@@ -1689,11 +1689,16 @@ class FluidSimulation
16891689
void _updateMarkerParticleVelocityAttributeGrid();
16901690
void _updateMarkerParticleVelocityBasedAttributes();
16911691
void _updateMarkerParticleVorticityAttributeGrid();
1692-
void _updateMarkerParticleAgeAttributeGrid();
1692+
void _updateMarkerParticleAgeAttributeGrid(Array3d<float> &ageAttributeGrid,
1693+
Array3d<bool> &ageAttributeValidGrid);
16931694
void _updateMarkerParticleAgeAttribute(double dt);
1694-
void _updateMarkerParticleViscosityAttributeGrid();
1695+
void _updateMarkerParticleViscosityAttributeGrid(Array3d<float> &viscosityAttributeGrid,
1696+
Array3d<bool> &viscosityAttributeValidGrid);
16951697
void _updateMarkerParticleViscosityAttribute();
1696-
void _updateMarkerParticleColorAttributeGrid();
1698+
void _updateMarkerParticleColorAttributeGrid(Array3d<float> &colorAttributeGridR,
1699+
Array3d<float> &colorAttributeGridG,
1700+
Array3d<float> &colorAttributeGridB,
1701+
Array3d<bool> &colorAttributeValidGrid);
16971702
void _updateMarkerParticleColorAttributeMixing(double dt);
16981703
vmath::vec3 _RGBToHSV(vmath::vec3 in);
16991704
vmath::vec3 _HSVToRGB(vmath::vec3 in);

0 commit comments

Comments
 (0)