Blender Git Commits

Blender Git "hair_system" branch commits.

Page: 32 / 35

August 2, 2014, 15:56 (GMT)
Basic support for Bullet GhostObjects in the rigidbody API and the hair
system.

These ghost objects are pure collision objects (without rigid body
dynamics) which can be used to retrieve collision info from Bullet and
use it in the hair solver.
August 2, 2014, 09:06 (GMT)
More sensible defaults and ranges for the hair sim settings.

Note that this will probably change again in the future. The goal is to
make the simulation as stable as possible in the default ui range of
properties (artists can override soft limits, but then instability has
to be expected).

Currently spring forces and damping depend somewhat on the time step
size and hair segment length. Also reparameterizing properties a bit
could help to increase accuracy in artistically interesting ranges.
August 2, 2014, 08:52 (GMT)
Fix for scons error: Was missing an opening bracket for the hair
namespace define.
August 1, 2014, 15:43 (GMT)
Fix for scons build files.
August 1, 2014, 14:43 (GMT)
Merge branch 'master' into hair_system
August 1, 2014, 11:45 (GMT)
Added missing static keywords on release mode debug function stubs.
August 1, 2014, 11:04 (GMT)
New memory management system for Bullet rigid bodies and some code
reorganization.

Bullet leaves the allocation and setup of rigid bodies up to the caller
code. Our current system allocates btRigidBody structs (respectively
the extended rbRigidBody wrapper struct) one-by-one. Deleting this
data and other lifetime data management is the domain of Objects and
their rigid body components.

This behavior is fine as long as only persistent objects in the DNA data
populate the RigidBodyWorld. However, for utilizing Bullet for other
collision types (hair, particles) and more on-the-fly rigid body changes
this model does not work well. Updating the rigid body world,
registering/unregistering rigid bodies, keeping track of constraint
references etc. becomes really difficult.

The patch implements a memory pool for rigid bodies, which allows
preallocating rigid body data for massive simulations. The lifetime of
rigid bodies is also disconnected from Object data, so that simulations
can use rigid bodies for data that is dynamically created and destroyed
without having to worry about dangling pointers so much.

The same principles should be applied to constraint data and collision
shapes eventually, but rigid bodies are the most critical.

Separation of concerns: Moved functions for building object rigid bodies
and applying Bullet results to them into a dedicated file. The same
should happen for hair, particles, and any other Bullet users later.
Purpose is to keep the main Bullet world API limited to dealing with
Bullet primarily and avoid fixating it on Object DNA data.

Cleanup: Renamed a number of internal rigidbody functions to clarify
the procedure:

world_build: create rbRigidBody instances for stuff in Scene
validate_*: ensure a rbRigidBody exists for an Object/particle/etc.
sync_*: define Bullet settings for an Object/particle/etc. based
on Blender Scene data
world_apply: copy back data from Bullet after a step to the Blender
Scene data
August 1, 2014, 09:46 (GMT)
Removed unused code.
August 1, 2014, 09:35 (GMT)
Hair debug cleanup: Nicer organization of drawing elements and a
dedicated Debug class for solver info.

The debug code uses preprocessor conditions to avoid all overhead in
non-debug modes or when not using debug output. The only extra info at
this point is for collision contact points, which will be imported from
the Bullet collision world (not yet implemented).
July 31, 2014, 17:54 (GMT)
Store a dynamics world reference in the solver externals struct.

This will provide the solver with contact points of the Bullet engine.
July 31, 2014, 17:23 (GMT)
Removed the deprecated steps-per-second property of the hair modifier.

For now it uses Bullet time steps, this could later be modified.
July 31, 2014, 17:04 (GMT)
Integrate hair solver stepping with the global scene stepping used for
Bullet physics.

This is a preparation to using Bullet for hair-mesh collisions. This
is much more accurate and requires less secondary interpolation when
the hair solver is in sync with the Bullet stepping.

Bullet uses essentially the same time step concepts as the hair solver
did, i.e. the main "step" (1 frame) is divided into fixed-size "ticks".
This is paramount for stability of the solver. The hair solver could
eventually use a multiple or integer fraction of the Bullet tick size
if more accuracy or performance is necessary.
July 31, 2014, 14:38 (GMT)
Extended RigidBodyWorld stepping function with a tick callback.

This will allow hooking other simulations (e.g. hair) into the Bullet
time step loop to enable sync'ed stepping of Bullet and other solvers
for accurate collision response.

This means that more solvers have to become global (instead of object-
based), but that was a design goal anyway for reasons of avoiding
dependency issues.

The Bullet time step will have to be run more generally if there are
other simulations. In particular it should still be executed even when
rigid bodies are cached, because the collision info may be needed. In
case of cached rigid bodies it would probably be sufficient to make them
all kinematic bodies, so that no calculation takes place for the rigid
bodies themselves, while their collision shapes are still available and
interpolated between cache frames.
July 31, 2014, 10:34 (GMT)
Merge branch 'master' into hair_system
July 31, 2014, 08:34 (GMT)
Color tweak for debug hair display.
July 31, 2014, 08:31 (GMT)
Fix for wrong hair root evaluation: The time value passed to the solver
was the end of the time step interval.

This causes extrapolation of the hair root location and overshooting
hair.
July 31, 2014, 07:48 (GMT)
Draw hair points, as a visual debugging helper.
July 30, 2014, 17:57 (GMT)
Multithreading for hair simulation.

The hair solver now uses the generic task BLI_taskpool implementation
to enable threaded stepping of the simulation. For now the hair data
can very easily be split into tasks, since all hairs are entirely
independent. Later on this becomes more restricted through hair-hair
collisions, but there are some advanced techniques for dealing with it
(static pair pruning etc.)
July 30, 2014, 16:19 (GMT)
Removed some leftover debug print code.
July 30, 2014, 16:01 (GMT)
Set a flag in the hair modifier whenever the hair data in the solver
becomes invalid.

This is needed when the number of hairs or points changes, but also
in case on sudden positional changes etc. (like resetting to rest
position), because the solver would otherwise calculate a large delta
and generate a lot of fake energy.
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021