Age | Commit message (Collapse) | Author |
|
|
|
- Using correct frame to update particle system tree for SPH simulation (i.e. psys_update_particle_bvhtree(psys, cfra)).
- Increased SPH neighbour count to 512 - this greatly reduces BVH tree search bias, and makes simulations more symmetrical.
Adaptive time step improvements:
- Fix for relative velocities based on previous state (fixes fast-moving particle clusters).
- Only reporting on element size once per time step. Prevents incorrect Courant number from being calculated when using multiple-step integration.
|
|
|
|
- use BLI_join_dirfile for joining all paths (no need to ensure slash is appended).
- paths from linked library files now supported.
|
|
- remove / comment unused python vars
- replace mul_v3_fl(somevec, -1.0f); with negate_v3(somevec);
|
|
|
|
|
|
|
|
* Fluid compilation: Inverse the compile flag from DISABLE_ELBEEM to WITH_MOD_FLUID for consistency. (scons/cmake)
* Use WITH_BF_FLUID in your user config (scons)
* Add support for scons to disable build with Decimate and Boolean modifier.
(WITH_BF_DECIMATE and WITH_BF_BOOLEAN)
|
|
|
|
http://markmail.org/message/fp7ozcywxum3ar7n
|
|
made less cryptic and changed to indicate if they work on files or directories.
|
|
|
|
- move font.c unicode functions into string_utf8.c and rename to fit with other BLI_string funcs.
|
|
* Boids need the random velocity vector always.
|
|
|
|
subframes can now be altered automatically while an SPH (fluid particle)
simulation is running.
|
|
* replace by BLI_snprintf in various places, note _snprintf on windows
does not properly null terminate the string.
* fix overflow in sequencer proxy code due to buffer being smaller than
specified size.
* fix some usage of snprintf as strcpy, this is will go wrong if the
string contains % characters.
* remove BLI_dynstr_printf function in gpu module, use BLI_dynstr_appendf
|
|
This fixes bug #26764 and several others like it, where modifier
properties (and others, but most visibly modifiers) would not do
anything when animated or driven, as modifier properties require the
RNA update calls to tag the modifiers to get recalculated.
While just adding a call to RNA_property_update() could have gotten
this working (as per the Campbell's patch attached in the report, and
also my own attempt #25881). However, on production rigs, the
performance cost of this is untenatable (on my own tests, without
these updates, I was getting ~5fps on such a rig, but only 0.9fps or
possibly even worse with the updates added).
Hence, this commit adds a property-update caching system to the RNA
level, which aims to reduce to the number of times that the update
functions end up needing to get called.
While this is much faster than without the caching, I also added an
optimisation for pose bones (which are numerous in production rigs) so
that their property updates are skipped, since they are useless to the
animsys (they only tag the depsgraph for updating). This gets things
moving at a more acceptable framerate.
|
|
frame, not in the case of a subframe between the first and second frame.
|
|
of "hair path"
* Objects are now always rotated in the directions of the hair paths
* Secondary fix: particle size wasn't updated for hair particles, so dupliobject size couldn't be change after the hair was edited
|
|
with hair particle objects
* Noise is now considered an animated texture as it changes with every frame
* Converted a few places in particles code to use the particle system's own random table instead of BLI_frand.
|
|
* Particle die time wasn't taken correctly into account in certain situations when calculating dynamics.
|
|
keyed particle system itself
* Also some nicer rotation handling for the explode modifier
|
|
|
|
vertex (e.g. 9 particles generated at 8 locations)
* The tiny offset value used in particle distribution code was actually too small, so that floating point errors got the best of the calculations.
|
|
* The unphysical particle damping wasn't scaled according to the timestep.
|
|
|
|
* Explode modifier wasn't updated properly when keyed particles were used.
* Explode modifier didn't get correct locations for grid distributed particles.
|
|
|
|
* Forgot this exception from the collisions rewrite. Don't check collisions with the same face twice.
|
|
doubles, adjust to use floats.
|
|
integration
* Verlet integration didn't like moving emitters, so now the first step for newborn particles with verlet is actually done with euler integration.
|
|
* The interpolation should only be done if the dynamics were calculated, since otherwise animation keys can't be set after parenting.
|
|
[#26493] Particle system animates incorrectly when emitting mesh is parented
* Particle emission now updates all parent objects too to the exact emission time.
* This only does object level animation as updating the object data for every particle would be too slow.
* A better fix could be to interpolate the emission location directly from the current particle emission location and the location from the previous frame, but for this some point cache changes have to be made, so it will have to wait.
|
|
|
|
* Slightly too strong optimization in the new collisions code, the "edges" in the middle of quads weren't checked at all.
|
|
|
|
* The old collisions code detected particle collisions by calculating the
collision times analytically from the collision mesh faces. This was
pretty accurate, but didn't support rotating/deforming faces at all, as
the equations for these quickly become quite nasty.
* The new code uses a simple "distance to plane/edge/vert" function and
iterates this with the Newton-Rhapson method to find the closest particle
distance during a simulation step.
* The advantage in this is that the collision object can now move, rotate,
scale or even deform freely and collisions are still detected reliably.
* For some extreme movements the calculation errors could stack up so much
that the detection fails, but this can be easily fixed by increasing the
particle size or simulation substeps.
* As a side note the algorithm doesn't really do point particles anymore,
but uses a very small radius as the particle size when "size deflect" isn't
selected.
* I've also updated the collision response code a bit, so now the particles
shouldn't leak even from tight corners.
All in all the collisions code is now much cleaner and more robust than before!
|
|
* Don't know when this got broken again, but now the "regrow hair" option works like it's supposed to again.
|
|
|
|
algorithm remains
the same, but big changes have happened both on the outside and on the inside.
New UI:
* The old parameters were quite true to the underlying algorithm, but were quite obscure
from a users point of view. Now there are only a few intuitive basic parameters that
define the basic fluid behavior.
** By default particle size is now used to determine the interaction radius, rest
density and spring rest lengths so that it's easy to get stable simulations by simply
emitting particles for a few frames and adjusting the particle size (easy when the
particle size is drawn) so that the fluid appears continuous (particles are touching
eachother).
** Stiffness - in reality most fluids are very incompressible, but this is a very hard
problem to solve with particle based fluid simulation so some compromises have to be
made. So the bigger the stiffness parameter is the less the fluid will compress under
stress, but the more substeps are needed for stable simulation.
** Viscosity - how much internal friction there is in the fluid. Large viscosities also
smooth out instabilities, so less viscous fluids again need more substeps to remain
stable.
** Buoancy - with high buoancy low pressure areas inside the fluid start to rise against
gravity, and high pressure areas start to come down.
* In addition to these basic parameters there are separate advanced parameters that can
either be tweaked relative to the basic parameters (or particle size) or defined
independently.
** Repulsion - the stiffness parameter tries to keep the fluid density constant, but this
can lead to small clumps of particles, so the repulsion keeps the particles better
separated.
** Stiff viscosity - the normal viscosity only applies when particles are moving closer to
eachother to allow free flowing fluids. Stiff viscosity also applies smoothing to
particles that are moving away from eachother.
** Interaction radius - by default this is 4 * particle size.
** Rest density - by default this is a density that the particles have when they're packed
densely next to eachother.
** Spring rest length - by default this is 2 * particle size.
* There are also new options for 3d view particle coloring in the display panel to show
particle velocity and acceleration. These make it easier to see what's happening in the
fluid simulations, but can of course be used with other particles as well.
* Viscoelastic springs have some new options too. The plasticity can now be set to much
higher values for instant deletion of springs as the elastic limit is exeeded. In addition
to that there is an option to only create springs for a certain number of frames when a
particle is born. These options give new possibilities for breaking viscoelastic fluids.
New in the code:
* Most of the fluids code is now thread safe, so when particle dynamics go threaded there
will be a nice speed boost to fluids as well.
* Fluids now use a bvh-tree instead of a kd-tree for the neighbor lookups. The bvh-tree
implementation makes the code quite a bit cleaner and should also give a slight speed
boost to the simulation too.
* Previously only force fields were calculated with the different integration methods, but
now the fluid calculations are also done using the selected integration method, so there
are again more choices in effecting simulation accuracy and stability. This change also
included a nice cleanup of the whole particle integration code.
As the internals are pretty stirred up old particle fluid simulations will probably not
work correctly straight away, but with some tweaking the same level of control is still
available by not using the "relative versions" of the advanced parameters (by default these
are not used when loading old files).
|
|
* Silly mistakes in my last particle distribution code commit.
|
|
for retopo workflow you don't wan't to project the mesh onto its self, added option not to.
|
|
* Grid distribution isn't really suited for hair, so this is now disabled.
* Setting a jittered distribution with particles/face = 1 now creates particles on the center of faces.
* Quite a bit of cleanup of the whole particle distribution code.
|
|
|
|
* In some cases fluid particles could be born at the exact same locations. Now these cases are just ignored and such particles don't effect each other.
|
|
header static for blenlib, blenkernel and editors.
|
|
* New option to distribute particles in a hexagonal grid.
* This is much more stable for fluids than normal grid distribution and looks quite nice otherwise too :)
* Also some small scale code cleanup of grid distribution code.
|
|
python functions.
- use NULL rather then 0 where possible (makes code & function calls more readable IMHO).
- set static variables and functions (exposed some unused vars/funcs).
- use func(void) rather then func() for definitions.
|