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. |
July 30, 2014, 14:55 (GMT) |
Fix problem of hair root animation by keeping the solver around as a runtime instance. The SolverData also functions as a short-term history for constructing the hair root animation/deformation curves. This is necessary because the DerivedMesh data on its own does not have interpolation intervals nor velocity information. It also means that we have to keep this data alive over multiple frames in order to do root animation properly. So now the solver is created as a runtime instance. |
July 30, 2014, 14:22 (GMT) |
Base support for hair root animation. Note: This does not work currently, because of the way the solver is reconstructed in every time step currently, and so does not provide actual changes in the transform. Note2: The mesh sampling system does not support changes in DerivedMesh topology so far. It can be necessary to move the hair system to the bottom of the modifier stack, because the hair roots are created for the final mesh version and for animation support it can only use the mesh being passed to the modifier. Any later subsurf etc. (constructive modifier) will alter the topology and cause a difference in the DM used for hair roots vs. DM used for calculating deformation. |
July 30, 2014, 10:11 (GMT) |
Also handle the applying of solver data to the scene DNA in the SceneConverter class. |
July 30, 2014, 09:51 (GMT) |
Moved Blender hair data conversion for the solver to a dedicated SceneConverter class. This should handle all the details of the DNA/SolverData differences and keep the rest of the solver code clean. |
July 30, 2014, 08:42 (GMT) |
Define hair root points when copying from particles, by converting the old num/fuv data. |
July 30, 2014, 06:25 (GMT) |
Use particle systems on the same object for "copy from particles" operator. This allows using the same geometry reference for hair roots. |
July 29, 2014, 16:42 (GMT) |
Usable random distribution algorithm. Does not include area weighting yet. |
July 29, 2014, 16:42 (GMT) |
Eval function to get a location and normal vector from mesh samples. |
July 29, 2014, 16:42 (GMT) |
Added a basic RNA definition for the mesh sampling system. |
July 29, 2014, 16:42 (GMT) |
Changed mesh sample definition to use 3 vertex weights instead of a face index. This is easier to sample uniformly and avoids the need for tesselation for evaluating. |
July 29, 2014, 16:42 (GMT) |
Fix for error when converting int -> unsigned int with strict compiler flags. |
July 29, 2014, 16:42 (GMT) |
Normalize the normal vector after sample eval to account for interpolation. |
|