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
AgeCommit message (Collapse)Author
2016-03-30Partly fix (unreported) particles not updating correctly when changing settings.Bastien Montagne
Point-cached particles (those using simulations) would not update at all outside of first frame, due to PSYS_RECALC_RESET flag being ingnored in `system_step()`... For some mysterious reasons, udate is still non-fully functional outside of startframe (e.g. changing face distribution between random and jittered), but at least when choosing 'Vertices' you get particles from verts and not faces!
2016-03-19BLI_kdopbvh: Pass center to to range callbackCampbell Barton
Useful when BLI_bvhtree_range_query callback calculates a new position to measure from.
2016-03-13Fix T47773: Particle System with Boids Crash.Bastien Montagne
Problem was, during initialization of boids particles in `dynamics_step()`, psys of target objects was not obtained with generic `psys_get_target_system()` as later in code, which could lead to some uninitialized `psys->tree` usage... Think it's safe enough for 2.77, though not a regression.
2016-03-12Fix T47763: 2.77 RC2 (Fluid) Particle Baking slower compared to 2.67b.Bastien Montagne
Static schedule was responsible here... Also, made a minor optimization in case adaptative (auto) subframes are enabled, gives a few percent of speedup here.
2016-02-02Fix T46382: Crash sharing particle system with clump or rough curvesSergey Sharybin
Made those curves local to thread evaluation now, so there is no threading conflict accessing them from evaluation threads anymore.
2016-01-20Particle_system.c: OMP -> BLI_task.Bastien Montagne
The threaded code is twice quicker now (from an average of 20ms/frame to 10ms/frame while baking 10000 particles here e.g.)! Think this is mostly due to usage of 'dynamic' scheduler in OMP code though, from my experience so far this tends to have dramatic effects over performances, static scheduler is usually much much more efficient.
2016-01-04Fix T47038: Particles in Particle Edit Mode get added in completely wrong ↵Bastien Montagne
location. It also fixes another issue (crash) related to symmetric editing. Quite involved, we (try to!) fix complete broken logic of parts of particle code, which would use poly index as tessface one (or vice-versa). Issue most probably goes back to BMesh integration time... This patch mostly fixes particle editing mode: - Adding/removing particles when using generative modifiers (like subsurf) should now work. - Adding/removing particles with a non-tessellated mesh (i.e. one having ngons) should also mostly work. - X-axis-mirror-editing particles over ngons does not really work, not sure why currently. - All this in both 'modes' (with or without using modifier stack for particles). Tech side: - Store a deformed-only DM in particle modifier data. - Rename existing DM to make it clear it's a final one. - Use deformed-only DM's tessface2poly mapping to 'solve' poly/tessface mismatches. - Make (part of) mirror-editing code able to use a DM instead of raw mesh, so that we can mirror based on final DM when editing particles using modifier stack (mandatory, since there is no way currently to find orig tessface from an final DM tessface index). Note that this patch is not really nice and clean (current particles are beyond hope on this side anyway), it's more like some urgency bandage. Whole crap needs complete rewrite anyway, BMesh's polygons make it really hard to work with current system (and looptri would not help much here). Also, did not test everything possibly affected by those changes, so it needs some users' testing & validation too. Reviewers: psy-fi Subscribers: dfelinto, eyecandy Maniphest Tasks: T47038 Differential Revision: https://developer.blender.org/D1685
2015-11-23Cleanup: shadowing (blenkernel)Campbell Barton
2015-11-11And another fix to psys ID handling - ParticleSystem->part **is** user counted!Bastien Montagne
2015-11-11Fix (unreported) potential crash: ParticleSystem->part shall never be NULL.Bastien Montagne
2015-10-23BLI_math: add invert_qt_normalizedCampbell Barton
When the quat is known to be unit length, so we can avoid scaling (just conjugate_qt which asserts on non unit quats).
2015-10-08Add id looper for particlesystem.Bastien Montagne
2015-08-28Partial fix of T44881: Fix for missing particles update when changing seedSergey Sharybin
Was only visible with new dependency graph. Changing emit_from still doesn't behave fully reliably tho, that needs some closer investigation.
2015-08-21BVH-raycast: Use watertight intersectionsCampbell Barton
By default watertight intersections are used, For callbacks where its not needed, BLI_bvhtree_ray_cast_ex can be called without the BVH_RAYCAST_WATERTIGHT flag. Fixes T45286
2015-08-21BVH-raycast: ensure input direction is unit-lengthCampbell Barton
This was already the case for most users of ray-cast. Doing this avoids 2x normalize calls per ray-cast in many places.
2015-07-31Replace MFace w/ vert-tri's for collision modifierCampbell Barton
Note that the collision modifier doesn't have any use for Loop indices, so to avoid duplicating the loop array too, MVertTri has been added which simply stores vertex indices (runtime only).
2015-07-01Fix T45253: Particle emitter volume mode and grid mode broken in 2.75.xSergey Sharybin
This is a regression since dced56f and root of the issue comes to the fact that grid distribution sets UNEXIST flag during distribution, which is then being reset in initialize_all_particles(). This commit solves the issue, but it's not really nice and some smart guy might want to revisit it.
2015-07-01Particles: Code cleanup, whitespaceSergey Sharybin
2015-05-12Depsgraph: Add evaluation callbacks for granular nodes updateSergey Sharybin
This commit only adds callbacks which then later be used with major dependency graph commit, keeping the upcoming commit more clean to follow. Should be no functional changes so far still.
2015-05-04Separate scene simplification into viewport and renderSergey Sharybin
This way it is possible to have viewport simplification bumped all the way up, making viewport really responsive but still have final render to use highest subdivision possible. Reviewers: lukastoenne, campbellbarton, dingto Reviewed By: campbellbarton, dingto Subscribers: dingto, nutel, eyecandy, venomgfx Differential Revision: https://developer.blender.org/D1273
2015-05-03Fix T44185, Fix T44090: hair texture density working unreliable.Krzysztof Recko
"Unexisting" particles must be freed after the unexist flag has been set, which was no longer the case after 78c491e62a5. Reviewers: brecht Differential Revision: https://developer.blender.org/D1213
2015-04-13Revert "Fix hair random rotation limited to 180 degrees"Sergey Sharybin
This reverts commit 176ed5bfe280ef2151f93c0940d54498aaf00d71.
2015-04-13Fix hair random rotation limited to 180 degreesMai Lavelle
The issue was caused by phase being limited from 0 to 1, which gave only 0..M_PI distribution which is not good enough for good randomness. Now the phase is being randomized across full 0..2*M_PI range.
2015-03-25Fix T43694, by Krzysztof Rećko (chrisr), reviewed in D1177.Lukas Tönne
Added some guards to prevent clumping to non existing particles. Also, adjusted threaded child path evaluation, so each child is evaluated once - previously virtual parents were done twice.
2015-03-01Use the old double-step collision method only for cloth.Lukas Tönne
This method does not work for hair anyway. Even though hair collision needs work at this point, it's still better than nothing.
2015-02-22Fix T43768: Pointcache end frame ignores preview rangeJulian Eisel
Fix for T43768 This way it works consistent with cloth, softbodys, etc. Reviewers: lukastoenne Differential Revision: https://developer.blender.org/D1134
2015-02-14Revert "Fix T43471, based on patch submitted by @sean_loh."Lukas Tönne
This reverts commit b2b54b0902045ec4f0c1a4cae3209be863878f5b. The patch breaks particle distribution even in simple cases, not worth doing this for keeping a hackish loophole open.
2015-02-12Fix T43471, based on patch submitted by @sean_loh.Lukas Tönne
Particle textures always override timing information of particles. Previously particle times could be scripted, but now these changes are discarded by the texture evaluation function. The patch disables texture overriding when no textures are defined, this way at least some old scripts can keep working.
2015-02-02Fix for unfreed effector weights in hair dynamics.Lukas Tönne
The internal cloth modifier effector weights get replaced temporarily to make the cloth sim use the particle weight settings instead. But the particle sim was not putting back the original weights, which can be non-NULL in case the cloth sim allocated these already. Messy design ...
2015-02-02Fix for unfreed memory due to unnecessary early exit in the freeLukas Tönne
function.
2015-01-20Curve-based control for child path tapering.Lukas Tönne
This is an alternative method to the current fixed function with a clump factor and "shape" parameter. This function is quite limited and does not give the desired result in many cases (e.g. long, parallel rasta strands are problematic). So rather than trying to add more parameters there is now a fully user-defined optional curve for setting the tapering shape.
2015-01-20Separate context freeing from task freeing in threaded particle updatesLukas Tönne
to prevent double-freeing/invalid mem access. This can happen with the "virtual parents" feature, which generates both parent and child paths. Each task free function also freed the shared context, leading to double freeing.
2015-01-20Improved force field effects on hair strands.Lukas Tönne
The previous calculation was modulated with the angle between the wind direction and the segments, which leads to very oscillating behavior. Now the formula includes an estimate for the geometric cross section of a hair segment based on the incident angle and the hair thickness (currently just the particle size). This gives a more stable behavior and more realistic response to wind. Conflicts: source/blender/blenkernel/intern/particle_system.c source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20Fix for applying the bending randomness factor.Lukas Tönne
A stupid hack is needed here, changing the way the factor is applied to angular bending springs. In cloth sim the bending factor of individual springs is applied as a mix value between the bending stiffness and a max value, but this max value isn't even used in hair sim so that approach becomes useless. Conflicts: source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20Randomness factor for hair bending stiffness.Lukas Tönne
This helps to create some variation in a hair system, which can otherwise become very uniform and boring. It's yet another confusing setting in a system that should have been nodified, but only option for now (broken windows ...) Conflicts: source/blender/blenkernel/intern/particle_system.c source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20Moved particle code for distributions into own file to make hackingLukas Tönne
easier. This code is badly broken and needs to be replaced, but at least having a workable code structure might help with quick hacks to fix the worst cases.
2015-01-20Fix for inverted condition: hair data needs to be rebuilt when theLukas Tönne
cloth DM does not exist.
2015-01-20Cleanup: Removed the unnecessary cloth solver abstraction (there is onlyLukas Tönne
one solver anyway), and split some particle cloth functions for clarity. Conflicts: source/blender/blenkernel/BKE_particle.h source/blender/blenkernel/intern/particle_system.c source/blender/blenloader/intern/versioning_270.c source/blender/makesdna/DNA_particle_types.h source/blender/makesrna/intern/rna_particle.c
2015-01-20Removed accidentally committed debug print.Lukas Tönne
2015-01-20Use the generic task scheduler for threaded particle tasks, i.e.Lukas Tönne
distribution and path caching for child particles. This gives a significant improvement of viewport playback performance with higher child particle counts. Particles previously used their own threads and had a rather high limit for threading. Also threading apparently was disabled because only 1 thread was being used ...
2015-01-20Set the length threshold for hair simulation to 10% again (from 1%).Lukas Tönne
With the default 5 substeps the simulation can otherwise still become unstable. This is just a preliminary measure anyway until the length variance can be fixed properly.
2015-01-20Fix for outdated root array size when changing the particle amountLukas Tönne
during simulation.
2015-01-20Completed the implementation of bent rest shapes for hair.Lukas Tönne
Basically follows the Pixar approach from "Artistic Simulation of Curly Hair".
2015-01-20Target calculation for local non-straight rest shapes.Lukas Tönne
This is more involved than using simple straight bending targets constructed from the neighboring segments, but necessary for restoring groomed rest shapes. The targets are defined by parallel-transporting a coordinate frame along the hair, which smoothly rotates to avoid sudden twisting (Frenet frame problem). The rest positions of hair vertices defines the target vectors relative to the frame. In the deformed motion state the frame is then recalculated and the targets constructed in world/root space.
2015-01-20Reduced the length threshold for disabling short hairs from 0.1 to 0.01.Lukas Tönne
2015-01-20Fix for Sintel hair bug.Lukas Tönne
The hair solver needs sane input to converge within reasonable time steps. In particular the spring lengths must not be too difference (factor 0.01..100 or so max, this is comparable to rigid body simulation of vastly different masses, which is also unstable). The basic hair system generate strands with equally spaced points, which is good solver material. However, the hair edit operators, specifically the cutting tool, can move points along the strands, creating tightly packed hair points. This puts the solver under enormous stress and causes the "explosions" observed already during the Sintel project. The simple solution for now is to exclude very short hairs from the simulation. Later the cutting tool should be modified such that it keeps the segments roughly at the same length and throws away vertices when the hair gets too short (same goes for the extension tool). The hair system should have a general mechanism for making sure that situations such as this don't occur. This will have to be a design consideration for replacements in any future hair system.
2015-01-20First stage of implementing moving frames of reference for hair/cloth.Lukas Tönne
This adds transformations for each hair from world to "root space". Currently positions and velocities are simply transformed for the solver data and inverse-transformed when copying the results back to the cloth data. This way the hair movement becomes independent from the movement of the emitter object. Eventually the "fictitious" forces originating from emitter movement can be added back in a controlled way. http://en.wikipedia.org/wiki/Fictitious_force Ignoring these fictitious forces or scaling their effect is physically correct, because in the absence of external forces the hair will always return to rest position in this root frame. External forces currently are not yet transformed into the root space.
2015-01-20Added new data in the cloth modifier for hair root information.Lukas Tönne
This will allow us to implement moving reference frames for hair and make "fictitious" forces optional, aiding in creating stable and controllable hair systems. Adding data in this place is a nasty hack, but it's too difficult to encode as a DM data layer and the whole cloth modifier/DM intermediate data copying for hair should be removed anyway.
2015-01-20Some initial collision code, without actual response forces still.Lukas Tönne
This is still using the old BVH tree collision methods to generate contact points, similar to what cloth does. This should be replaced by a Bullet collision check, but generating contacts in this way is easier for now, and lets us test responses and stability (although in more complex collision cases the BVH method fails utterly, beside being terribly inefficient with many colliders).
2015-01-04cleanup: use 'coords' abbreviation for functions.Campbell Barton