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:
authorJanne Karhu <jhkarh@gmail.com>2010-04-04 16:29:06 +0400
committerJanne Karhu <jhkarh@gmail.com>2010-04-04 16:29:06 +0400
commitc5871b87502cfd35fa14881f1bcadbd5564e658f (patch)
tree7397e7a403589d31244ecaf7f976e3f532729159 /source/blender/blenloader
parentd574e8b82617c389de85a09fcf9b0f14172466a8 (diff)
Fluid physics for particles by Raul Fernandez Hernandez (Farsthary) and Stephen Swhitehorn:
This patch add SPH (Smoothed Particle Hydrodynamics)fluid dynamics to the blender particle system. SPH is an boundless Lagrangian interpolation technique to solve the fluid motion equations. From liquids to sand, goo and gases could be simulated using the particle system. It features internal viscosity, a double density relaxation that accounts for surface tension effects, static internal springs for plastic fluids, and buoyancy for gases. --------------------------------------- This is a commit of the core fluid physics. Raul will work on proper documentation soon and more features such as surface extraction from the particle point cloud and increasing stability by sub-frame calculations later.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c1
-rw-r--r--source/blender/blenloader/intern/writefile.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index a51ecbd2a15..b23b0edb285 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -3038,6 +3038,7 @@ static void direct_link_particlesettings(FileData *fd, ParticleSettings *part)
link_list(fd, &part->dupliweights);
part->boids= newdataadr(fd, part->boids);
+ part->fluid= newdataadr(fd, part->fluid);
if(part->boids) {
BoidState *state;
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index f5470d1ecec..2b32bbdf0c1 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -652,6 +652,9 @@ static void write_particlesettings(WriteData *wd, ListBase *idbase)
for(; state; state=state->next)
write_boid_state(wd, state);
}
+ if(part->fluid && part->phystype == PART_PHYS_FLUID){
+ writestruct(wd, DATA, "SPHFluidSettings", 1, part->fluid);
+ }
}
part= part->id.next;
}