Age | Commit message (Collapse) | Author |
|
56073.
|
|
generator with a local one. It's not thread safe and will not give repeatable
results, so in most cases it should not be used.
Also fixes #34992 where the noise texture of a displacement modifier was not
properly random in opengl animation render, because the seed got reset to a
fixed value by an unrelated function while for final render it changed each
frame.
|
|
|
|
also rename mesh_getVertexCos() --> BKE_mesh_vertexCos_get() to match curve function.
|
|
This was caused by a floating point precision error. During collision detection, Newton-Raphson iteration is used to find the exact time of the collision. But when using subframes, the initial Newton step was too small. Now the initial step is given in absolute units. When subframes = 0, this should behave almost the same as before.
Thanks to Janne Karhu, Lukas Toenne and Ton Roosendaal for their help with this patch, and to AutoCRC for funding.
|
|
|
|
|
|
http://projects.blender.org/tracker/index.php?func=detail&aid=29681&group_id=9&atid=127
The solver was mostly implemented by John Mansour at VPAC, with help from me and with funding from the AutoCRC. The SPH formulation is due to Gingold and Monaghan, and the smoothing kernel is due to Wendland.
This solver does not replace the old one; it is available as an option. Note that the new solver uses different units than the old one. The patch page has a couple of attachments that can be used to test the new solver, particularly sphclassical_dam_s0.01_grav.blend (ignore the earlier tests). The simulation in that file compares well with a physical experimental dam break; details in a paper by Changhong Hu and Makoto Sueyoshi, also referred to on that page.
|
|
|
|
- define array sizes for functions that take vectors.
- quiet some -Wshadow warnings.
- some copy/paste error in readfile.c made it set the same particle recalc flag twice.
|
|
|
|
|
|
|
|
|
|
|
|
where the values are unchanged.
|
|
without the underscores these clogged up the namespace for autocompleation which was annoying.
|
|
|
|
than 3 float pointers.
also make particle draw use a float vec.
|
|
|
|
http://markmail.org/message/fp7ozcywxum3ar7n
|
|
subframes can now be altered automatically while an SPH (fluid particle)
simulation is running.
|
|
for width and height of billboards, relative to the particle size. It's useful when the particle size is primarily used for collision and the like, so the billboard appearance can be adjusted independently. Also allows non-square billboards.
In addition the billboards can be scaled by the particle velocity with optional head and tail factors (similar to line drawing options). This allows for pseudo-motionblur effects.
|
|
keyed particle system itself
* Also some nicer rotation handling for the explode modifier
|
|
* Forgot this exception from the collisions rewrite. Don't check collisions with the same face twice.
|
|
* 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!
|
|
* 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.
|
|
|
|
* Renamed the old split uv's animate option "time" to "age" and added a new option to change the used split frame by frame. These are good changes were suggested/implied by Hannu Hoffren over 3 years ago in his tutorial video! (oh my how time flies)
* Also cleaned up the billboard ui quite a bit. For example now the uv channels can be properly chosen from the existing channels.
|
|
* Effecting particle properties with textures was possible in 2.49,
but not in 2.5 anymore.
* Now particles have their own textures (available in texture panel
for objects with particle systems), which are totally separate from
the material textures.
* Currently a basic set of particle properties is available for
texture control. Some others could still be added, but the whole
system is not intended as an "change anything with a texture" as
this kind of functionality will be provided with node particles in
the future much better.
* Combined with the previously added "particle texture coordinates"
this new functionality also solves the problem of animating particle
properties through the particle lifetime nicely.
* Currently the textures only use the intensity of the texture in
"multiply" blending mode, so in order for the textures to effect
a particle parameter there has to be a non-zero value defined for
the parameter in the particle settings. Other blend modes can be
added later if they're considered useful enough.
|
|
|
|
* The SPH fluid particle algorithm was implemented a bit wrong. This problem could for example result in the fluid moving sideways after being dropped straight to a horizontal collision surface, a very big no-no as far as real world physics are concerned!
* After some extensive code shuffling the algorithm is now much more true to the paper it was implemented from, and more importantly now the physics should be correct too!
* The main thing was that fluids calculations can effect many particles simultaneously, so just a single loop through all particles can't work properly. As a side note this also means that the actual fluid algorithm can't be made threaded :(
* To make things work I also had to reshuffle some general particle physics code, but there should be no functional changes what so ever to other physics types, so poke me immediately if something strange happens.
Note to users: these changes will most probably effect the way previously done sph fluid simulations look, so some parameter tweaking will be needed to get things back looking the way they were.
|
|
flagged as PROP_THICK_WRAP.
Also use const char in many other parts of blenders code.
Currently this gives warnings for setting operator id, label and description since these are an exception and allocated beforehand.
|
|
* This caused nearly all particles to leak through the collision surface if simulation subframes were used and the collision object was moving.
* In addition to fixing this I also did some more cleanup of the collision code and refined some of the comments.
|
|
* Cached particle die times are now read from cached data
|
|
apply it to the hair
* Although not strictly a bug it is the expected behavior and won't mess anything else up.
* Note: the lattice is applied to the actual hair keys instead of the calculated strands so the applied result will differ a bit from the original.
|
|
This commit and other commits attempting to fix it broke various things. The
main thing that changed was that instead of computing children/paths in
advance as part of particle_system_update, this was moved to do it just before
drawing or rendering. I've changed back that behavior and tried to keep the
other fixes in the commit.
When the new particle system was just committed, it also worked this way but
gave various problems, and I had to remove that behavior to get things working
stable. Basically it meant that you could get have a path cache that was
outdated in various situations, and it doesn't fit well with dependency graph
evaluation order.
This fixes:
#22823: Children Particle Rendering is broken
#22733: Particle objects not displayed
#22888: SigSegV when rending hair particles
#22820: Another SigSegV when undo adding hairs in particel edit mode
Some particle setups in dupligroups.
The three bugs that the original commit fixed are now also still working in
my tests:
#21316: Hair weight drawing is wrong
#21923: Consistent Crash When Rendering Particle Scene.
#21950: Path rendering option for particles causes crash
|
|
* Path drawing now works for non hair particles.
* Should fix the following bugs too:
[#21316] Hair weight drawing is wrong
[#21923] Consistent Crash When Rendering Particle Scene.
[#21950] Path rendering option for particles causes crash
|
|
* Particle now take particle acceleration during collisions into account.
|
|
|
|
* Boids didn't yet use global gravity
|
|
- object.modifiers.add()/remove()
- armature.edit_bones.active wasnt named correctly
|
|
that prevented switching directly from editmode to paint modes
+ other minor changes
|
|
The goodies:
* Curves can be used as normal dynamic effectors too with
the new "curve" field shape.
* Group visualization has optional duplication counts for
each object in the specified group.
* Object & group visualizations, which are done without
taking the dupliobject's global position into account
(unless the whole group is used). This is much nicer than
the previous behavior, but I added a "Use Global Location"
option for those who want to use it the old way.
* The active particle system's particles are now drawn a
with theme coloured outline instead of pure white.
* Added object aligned velocity factors (buttons categorized
and re-organized too).
Bug fixes:
* Absorption didn't work as the ui toggle button was forgotten.
* Some other force field ui tweaks.
* Crash after adding children and changing trails count.
* Display types "cross" and "axis" crashed.
* Particles weren't drawn with correct coloring.
* Billboards didn't update properly in viewport to camera
location changes.
* Particle rotation wasn't recreated correctly from point cache.
* Changing particles amount crashed sometimes.
* Some files with child hair crashed on loading.
* Compiler warning fixes.
* Adding boids crashed on frame 1;
|
|
* Unified scene wide gravity (currently in scene buttons)
instead of each simulation having it's own gravity.
* Weight parameters for all effectors and an effector group
setting.
* Every effector can use noise.
* Most effectors have "shapes" point, plane, surface, every point.
- "Point" is most like the old effectors and uses the
effector location as the effector point.
- "Plane" uses the closest point on effectors local xy-plane
as the effector point.
- "Surface" uses the closest point on an effector object's
surface as the effector point.
- "Every Point" uses every point in a mesh effector object
as an effector point.
- The falloff is calculated from this point, so for example
with "surface" shape and "use only negative z axis" it's
possible to apply force only "inside" the effector object.
* Spherical effector is now renamed as "force" as it's no longer
just spherical.
* New effector parameter "flow", which makes the effector act as
surrounding air velocity, so the resulting force is
proportional to the velocity difference of the point and "air
velocity". For example a wind field with flow=1.0 results in
proper non-accelerating wind.
* New effector fields "turbulence", which creates nice random
flow paths, and "drag", which slows the points down.
* Much improved vortex field.
* Effectors can now effect particle rotation as well as location.
* Use full, or only positive/negative z-axis to apply force
(note. the z-axis is the surface normal in the case of
effector shape "surface")
* New "force field" submenu in add menu, which adds an empty
with the chosen effector (curve object for corve guides).
* Other dynamics should be quite easy to add to the effector
system too if wanted.
* "Unified" doesn't mean that force fields give the exact same results for
particles, softbody & cloth, since their final effect depends on many external
factors, like for example the surface area of the effected faces.
Code changes
* Subversion bump for correct handling of global gravity.
* Separate ui py file for common dynamics stuff.
* Particle settings updating is flushed with it's id through
DAG_id_flush_update(..).
Known issues
* Curve guides don't yet have all ui buttons in place, but they
should work none the less.
* Hair dynamics don't yet respect force fields.
Other changes
* Particle emission defaults now to frames 1-200 with life of 50
frames to fill the whole default timeline.
* Many particles drawing related crashes fixed.
* Sometimes particles didn't update on first frame properly.
* Hair with object/group visualization didn't work properly.
* Memory leaks with PointCacheID lists (Genscher, remember to
free pidlists after use :).
|
|
New stuff
- Bending springs for hair dynamics.
Code cleanup & optimization
- Disabled reactor particles temporarily for cleanup, it's a clumsy system that will be replaced with something better.
- Removed child seams, something better will come here too :)
- Normal particle drawing data is now saved between redraws if the particles don't move between redraws.
* For example rotating the 3d view is now realtime even with 1M particles.
- Many random values for particles now come from a lookup table making things much faster.
- Most accessed small point cache functions are now much faster as macros.
- Lot's of general code cleanup.
- Nothing big should have changed so if something doesn't work like it used to it's probably just a typo somewhere :)
|
|
- Hair dynamics have their own panel in particle settings with the settings from cloth panel that apply to hair.
- Basic internal friction force to quickly emulate self collisions and volume preservation. (Still very early code, but gives some idea of what's possible).
- Softbody simulation is no longer used for hair.
* Old files with sb dynamics should just load the hair without dynamics so new dynamics can be applied.
* Invasion of particles exceptions in sb code is finally over.
- Collisions with other objects are disabled for now and will be worked out in the future.
Other changes/fixes:
- Particle mode editing flag wasn't saved properly.
- Some old files with edited hair didn't load correctly.
- Disabled delete & specials menu in particle mode for non-hair editing.
- Fixed yet one more cloth & softbody pointcache update issue.
- Disconnect/connect hair now uses only the deformed mesh so it works correctly also for subsurfed emitters.
- Hair editing now updates correctly with a moving emitter.
|
|
- Some big refresh issues with softbody & cloth point cache usage should now be fixed.
- Removed sticky objects from particles (better stuff will come back when I get to updating reactor particles).
- Some initial easy memory efficiency cleanup for ParticleData struct. The ultimate goal is to get particles less memory hungry -> more particles possible in single scene.
- Wrong path timing clamping caused hair particles to seem disappeared when changing between normal<->hair particles.
- "Calculate to current frame" in cache buttons baked instead of the intended function.
- Boids particle data is now a bit better organized.
|
|
- Baked point caches for particles, cloth and softbody can now be edited in particle mode.
* This overwrites the old cloth/sb cache editmode editing.
* The type of editable system is chosen from a menu.
* For particles the current particle system and it's current cache are used.
- Currently this only works for caches that are in memory, but some automatic conversion from disk to memory and back can be implemented later.
- All tools from hair editing can't be applied to point caches and are hidden in the tool panel and specials menu. Some functionality like subdividing paths can be later implemented in a slightly different way from how it works for hair.
- Code is not yet optimized for speed, so editing might be slow sometimes.
Known issues:
- Cloth doesn't update properly while in particle mode, due to the way cloth modifier currently works. Daniel can you check on this?
- As "particle mode" is not only for particles any more some other name would be in place?
- Better icons are needed for the path, point, and tip-modes as the current icons from mesh edit mode are quite misleading.
- Direct editing of point velocities is not yet implemented, but will be in the future.
Other changes:
- Hair editing doesn't require a "make editable" button press any more.
- Multiple caches in single particle system disables changing emission properties.
- Unified ui code for all point cache panels.
* Defined in buttons_particle.py and imported for cloth, smoke & softbody.
- Proper disabling of properties in ui after baking point caches. (Daniel could you please make needed disable code for smoke panels as their functionality is not familiar to me.)
- Hair weight brush has been removed. Once hair dynamics is re-implemented I'll code a more useable alternative to the functionality.
Bug fixes:
- Unlinking particle settings crashed.
- Deleting the active object with particles in the scene crashed.
- Softbody didn't write point caches correctly on save.
|
|
|