diff options
author | Janne Karhu <jhkarh@gmail.com> | 2010-04-04 16:29:06 +0400 |
---|---|---|
committer | Janne Karhu <jhkarh@gmail.com> | 2010-04-04 16:29:06 +0400 |
commit | c5871b87502cfd35fa14881f1bcadbd5564e658f (patch) | |
tree | 7397e7a403589d31244ecaf7f976e3f532729159 /release | |
parent | d574e8b82617c389de85a09fcf9b0f14172466a8 (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 'release')
-rw-r--r-- | release/scripts/ui/properties_particle.py | 47 |
1 files changed, 45 insertions, 2 deletions
diff --git a/release/scripts/ui/properties_particle.py b/release/scripts/ui/properties_particle.py index dbd2b90fea2..54ddb6da8a6 100644 --- a/release/scripts/ui/properties_particle.py +++ b/release/scripts/ui/properties_particle.py @@ -395,6 +395,43 @@ class PARTICLE_PT_physics(ParticleButtonsPanel): sub.prop(part, "integrator") sub.prop(part, "time_tweak") + elif part.physics_type == 'FLUID': + fluid = part.fluid + split = layout.split() + sub = split.column() + + sub.label(text="Forces:") + sub.prop(part, "brownian_factor") + sub.prop(part, "drag_factor", slider=True) + sub.prop(part, "damp_factor", slider=True) + sub = split.column() + sub.prop(part, "size_deflect") + sub.prop(part, "die_on_collision") + sub.prop(part, "integrator") + sub.prop(part, "time_tweak") + + split = layout.split() + sub = split.column() + sub.label(text="Fluid Interaction:") + sub.prop(fluid, "fluid_radius", slider=True) + sub.prop(fluid, "stiffness_k") + sub.prop(fluid, "stiffness_knear") + sub.prop(fluid, "rest_density") + + sub.label(text="Viscosity:") + sub.prop(fluid, "viscosity_omega", text="Linear") + sub.prop(fluid, "viscosity_beta", text="Square") + + sub = split.column() + + sub.label(text="Springs:") + sub.prop(fluid, "spring_k", text="Force", slider=True) + sub.prop(fluid, "rest_length", slider=True) + layout.label(text="Multiple fluids interactions:") + + sub.label(text="Buoyancy:") + sub.prop(fluid, "buoyancy", slider=True) + elif part.physics_type == 'KEYED': split = layout.split() sub = split.column() @@ -454,7 +491,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel): col.prop(boids, "banking", slider=True) col.prop(boids, "height", slider=True) - if part.physics_type == 'KEYED' or part.physics_type == 'BOIDS': + if part.physics_type == 'KEYED' or part.physics_type == 'BOIDS' or part.physics_type == 'FLUID': if part.physics_type == 'BOIDS': layout.label(text="Relations:") @@ -484,7 +521,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel): col.active = psys.keyed_timing col.prop(key, "time") col.prop(key, "duration") - else: + elif part.physics_type == 'BOIDS': sub = row.row() #doesn't work yet #sub.red_alert = key.valid @@ -492,6 +529,12 @@ class PARTICLE_PT_physics(ParticleButtonsPanel): sub.prop(key, "system", text="System") layout.prop(key, "mode", expand=True) + elif part.physics_type == 'FLUID': + sub = row.row() + #doesn't work yet + #sub.red_alert = key.valid + sub.prop(key, "object", text="") + sub.prop(key, "system", text="System") class PARTICLE_PT_boidbrain(ParticleButtonsPanel): |