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
2011-03-12Completely refactored sph fluid particles. Only the very core of the ↵Janne Karhu
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).
2011-03-09Fix for [#26372] Objects as PS Hair displays and renders differentlyJanne Karhu
* 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.
2011-02-17DNA header files are now grouped under the same module. No further ↵Nathan Letwory
documentation done.
2011-02-13Small addition to particle grid distribution:Janne Karhu
* 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.
2011-02-13Small update for billboards:Janne Karhu
* 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.
2011-02-12Small particle effectors update:Janne Karhu
* Greetings from farsthary: particle rotation is now taken into account for particle effector direction. ** This gives all kinds of new possibilities as he shows in his blog http://farsthary.wordpress.com/2011/02/08/vortex-particle-simple-tut/. **The only modification I made to his patch was to use the actual rotated particle direction as the effector direction as this defaults to the particle velocity vector, so no actual new options are needed. * I also added an "effector amount" setting for particle effectors so that only a part of the particles can be considered as effectors. This makes it possible to create simple "farsthary vortexes" with only one particle system. * Also some tiny reorganization of the falloff min/max values for a nicer ui.
2011-02-12Particles todo item: particle texturesJanne Karhu
* 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.
2011-02-07Hair ui simplification:Janne Karhu
* There were a lot of settings in the particle panels that made no sense for simple hair and only cluttered up the ui. * Now these settings are hidden by default unless "advanced" hair options are shown. * Without advanced options the particle velocity controls are replaced by a simple "hair length" value, which actually corresponds to the grown hair length in blender units. * Some hair effector options that are actually very useful were not shown in ui. These are now found in the "field weights" panel.
2011-02-06Bug fix: Particles in dupligroups were mostly drawn properly in 3d view, but ↵Janne Karhu
rendering them was a real mess. * After countless different bugs particles should now render correctly inside dupligroups. * Only particles with metaball visualization are still problematic, this is mostly due to the ancient metaball code. * I'll also add a test file for some of the situations, so that hopefully these cases stay fixed :)
2011-02-04Improvements for particle grid distribution:Janne Karhu
* Particles that aren't shown are now actually deleted (huge memory savings for flat objects). * Grid distribution for flat objects is now done on the surface object surface without offset. * Invert grid option wasn't in ui and it didn't work for non-volume grids. * New parameter to randomize the grid point locations. * Resolution soft/hard limits changed to even 50/250.
2011-01-17remove/comment unused defines, also zero FileGlobal.filename to quiet valgrind.Campbell Barton
2011-01-09Viscoelastic springs for sph particle fluids, original patch by Stephen ↵Janne Karhu
Whitehorn (chickencoop) * Viscoelastic springs between the fluid particles can simulate all kinds of viscous and elastic substances, such as jelly and honey. This is achieved by creating springs dynamically between neighboring particles and adjusting their rest length based on stretching/compression. * This nearly completes the currently intended functionality for particle fluids. The last missing thing is a surfacing extraction algorithm, which is needed for a proper representation of a sph fluid. * I also cleaned up and renamed some of the fluid parameters to make the ui a bit easier to understand. * One addition to the patch is an option to use "initial rest length" for the springs, which uses the lengths between the particles at the time of spring creation as the spring rest lengths instead of interaction radius/2. This makes the fluid keep it's original shape better (good for very viscoelastic materials), but can create large density differences inside the fluid (not really physically correct for a fluid). * Viscoelastic springs are stored in point cache as extra data.
2011-01-07New hair child options:Janne Karhu
* Renamed children to "simple" and "interpolated" as this is easier to explain and more descriptive than "from particles" and "from faces". * Also shuffled the child ui around a bit to make it clearer. * Child seed parameter allows to change the seed for children independent of the main seed value. * Long hair mode for interpolated children: - Making even haircuts was impossible before as the child strand lengths were even, but their root coordinates were not similar in relation to the parent strands. - The "long hair" option uses the tips of the parent strands to calculate the child strand tips. * Hair parting options: - Hair parting can now be calculated dynamically on the fly when in 2.49 there was a cumbersome way of using emitter mesh seams to define parting lines. - For long hair parting can be created by a tip distance/root distance threshold. For example setting the minimum threshold to 2.0 creates partings between children belonging to parents with tip distance of three times the root distance ((1+2)*root distance). - For short hair the parting thresholds are used as angles between the root directions. * New kink parameters: - Kink flatness calculates kink into a shape that would have been achieved with an actual curling iron. - Kink amplitude clump determines how much the main clump value effects the kink amplitude. - The beginning of kink is now smoothed to make the hair look more natural close to the roots. * Some bugs fixed along the way too: - Child parent's were not determined correctly in some cases. - Children didn't always look correct in particle mode. - Changing child parameters caused actual particles to be recalculated. * Also cleaned up some deprecated code. All in all there should be no real changes to how old files look (except perhaps a bit better!), but the new options should make hair/fur creation a bit more enjoyable. I'll try to make a video demonstrating the new stuff shortly.
2010-12-13"Fix" for [#25184] Forces for growing hair - update inconsistency - as ↵Janne Karhu
discussed with Jahka on Saturday on IRC * New option to "Regrow hair" for each frame. * This was perhaps more a feature request, but there was a similar useful feature called "animated hair" in particles at some point. * The previous behavior for hair growing was inconsistent to say the least, so this is a nice option to have.
2010-04-12Subframe calculations for particles, original patch by Raul Fernandez HernandezJanne Karhu
* Increasing subframe count increases stability for SPH fluid and Newtonian particles * Also small tweaks into physics ui panel to better fit new subframes value * This commit also fixes the moving fluid emitter problem as described by Raul in the mailinglist
2010-04-04Fluid physics for particles by Raul Fernandez Hernandez (Farsthary) and ↵Janne Karhu
Stephen Swhitehorn: This patch add SPH (Smoothed Particle Hydrodynamics)fluid dynamics to the blender particle system. SPH is an boundless Lagrangian interpolation technique to solve the fluid motion equations. From liquids to sand, goo and gases could be simulated using the particle system. It features internal viscosity, a double density relaxation that accounts for surface tension effects, static internal springs for plastic fluids, and buoyancy for gases. --------------------------------------- This is a commit of the core fluid physics. Raul will work on proper documentation soon and more features such as surface extraction from the particle point cloud and increasing stability by sub-frame calculations later.
2010-02-12correct fsf addressCampbell Barton
2009-12-26Fix for [#20458] Segmentation fault when trying to enable Hair dynamicsJanne Karhu
* The hair mesh vertex index was stored as a short, but vertex counts can easily go higher than what fits in a short so changed this to an int. * Also removed particle life looping, which didn't work correctly anyways. Similar functionality will become available when I get to recoding reactor particles into a better system.
2009-11-25Verlet integration method for particles (patch provided by farsthary).Janne Karhu
2009-11-04particle vertex group UICampbell Barton
Changed RNA vgroup access to use strings (string functions adjust the ints used internally)
2009-10-05General particle bug fixes + few small goodiesJanne Karhu
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;
2009-10-01Unified effector functionality for particles, cloth and softbodyJanne Karhu
* 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 :).
2009-09-18Particles cleanup, optimizations and some small new stuff.Janne Karhu
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 :)
2009-09-11Hair dynamics with cloth simulationJanne Karhu
- 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.
2009-09-05Some particles cleanup & fixes:Janne Karhu
- 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.
2009-08-29Point cache editing:Janne Karhu
- 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.
2009-08-12New point cache file format:Janne Karhu
- HEADER (beginning of each file) * general header: + 8 char: "BPHYSICS" + 1 int: simulation type (same as PTCacheID->type) * custom header (same for sb, particles and cloth, but can be different for new dynamics) + 1 int: totpoint (number of points) + 1 int: data_types (bit flags for what the stored data is) - DATA (directly after header) *totpoint times the data as specified in data_types flags - simulation type soft body = 0, particles = 1, cloth = 2 - data types (more can be added easily when needed) data flag contains ---------------------------------------- index (1<<0) 1 int (index of current point) location (1<<1) 3 float velocity (1<<2) 3 float rotation (1<<3) 4 float (quaternion) avelocity (1<<4) 3 float (used for particles) xconst (1<<4) 3 float (used for cloth) size (1<<5) 1 float times (1<<6) 3 float (birth, die & lifetime of particle) boids (1<<7) 1 BoidData Notes: - Every frame is not nescessary since data is interpolated for the inbetween frames. - For now every point is needed for every cached frame, the "index" data type is reserved for future usage. - For loading external particle caches only "location" data is necessary, other needed values are determined from the given data. - Non-dynamic data should be written into an info file if external usage is desired. * Info file is named as normal cache files, but with frame number 0; * "Non-dynamic" means data such as particle times. * Written automatically when baking to disk so basically a library of particle simulations should be possible. - Old disk cache format is supported for reading, so pre 2.5 files shouldn't break. However old style memory cache (added during 2.5 development) is not supported. To keep memory cached simulations convert the cache to disk cache before svn update and save the blend. - External sb and cloth caches should be perfectly possible, but due to lack of testing these are not yet enabled in ui. Other changes: - Multiple point caches per dynamics system. * In the future these will hopefully be nla editable etc, but for now things are simple and the current (selected) point cache is used. * Changing the amount of cached points (for example particle count) is allowed, but might not give correct results if multiple caches are present. - Generalization of point cache baking etc operator & rna code. - Comb brushing particle hair didn't work smoothly.
2009-07-24ParticleSettings animdata wasn't shown in graph editor, dope sheet and nla ↵Janne Karhu
editor. Tiny bug fix too: Had forgotten particle child length setting from do_versions so old files with child hair showed all hair with zero length.
2009-07-23External cacheJanne Karhu
Particle point cache can now be loaded from external files. - Activated by "external" checkbox in cache panel and giving proper folder path and file name identifier. - External cache panel has controls for particle emission start, end, lifetime and random lifetime. These should be set according to the external data for correct playback. - External files should be named "identifier_frame_index.bphys" or "identifier_frame.bphys" where: * "identifier" is a freely choseable name. * "frame" is the cached frame number. ** Six digits padded with zeros!, for example "000024". * "index" can be used to tell caches with the same identifier apart. ** Two digits starting from zero. ** The index and the underscore before are optional. If no index is present the index number in ui should be set to -1. - Cache file format is pure floating point numbers (in binary, not text!) with each particle's data one after the other with the following data members: * 3 floats: particle's location vector * 3 floats: particle's velocity vector (per second) * 4 floats: particle's rotation quaternion * 3 floats: particle's angular velocity vector (per second) * 1 float: frame of the actual data (this can be non-integer for particles that are born or die between two integer frames, but otherwise should be the same as the "frame" in the file name) - Cache files don't have to exist for each frame. * Frames without actual data are interpolated from surrounding frames that have data (extrapolation is not supported). - Cache file formats with extended (or reduced even) data members are in future plans for easier usage. - Current code only does particles, don't yet know if it's applicable to cloth or sb. - Known issue: endianness can't yet be handled in any way. Other changes: New hard limits for many particle parameters. Some examples: - Maximum amount of particles: 10M particles :) And before you all go and crash your Blender trying this out remember that this limit is only for those freaks who really have the machine power to handle it. 10M particles alone take around 2.2 Gb of memory / disk space in saved file and each cached frame takes around 0.5 Gb of memory / disk space depending on cache mode. * Known issue: To actually use this many particles they most likely need to be allocated in parts as taking hold of a 2.2Gb chunk of memory at once is probably not ok with any operating system. - Maximum amount of children: 100k children/particle (1T childparticles here we come :D) - Kink frequency: -100k to 100k half-rotations (really strange the previous limit was only from zero upwards) - Path draw steps: 10 (power of 2 remember) - Path render steps: 20 (power of 2 also!! If over 1M segments doesn't get you smooth paths then I think nothing will!)
2009-07-21Initial code for boids v2Janne Karhu
Too many new features to list! But here are the biggies: - Boids can move on air and/or land, or climb a goal object. - Proper interaction with collision objects. * Closest collision object in negative z direction is considered as ground. * Other collision objects are obstacles and boids collide with them. - Boid behavior rules are now added to a dynamic list. * Many new rules and many still not implemented. * Different rule evaluation modes (fuzzy, random, average). - Only particle systems defined by per system "boid relations" are considered for simulation of that system. * This is in addition to the boids own system of course. * Relations define other systems as "neutral", "friend" or "enemy". - All effectors now effect boid physics, not boid brains. * This allows forcing boids somewhere. * Exception to this is new "boid" effector, which defines boid predators (positive strength) and goals (negative strength). Known issue: - Boid health isn't yet stored in pointcache so simulations with "fight" rule are not be read from cache properly. - Object/Group visualization object's animation is not played in "particle time". This is definately the wanted behavior, but isn't possible with the current state of dupliobject code. Other new features: - Particle systems can now be named separately from particle settings. * Default name for particle settings is now "ParticleSettings" instead of "PSys" - Per particle system list of particle effector weights. * Enables different effection strengths for particles from different particle systems with without messing around with effector group setting. Other code changes: - KDTree now supports range search as it's needed for new boids. - "Keyed particle targets" renamed as general "particle targets", as they're needed for boids too. (this might break some files saved with new keyed particles) Bug fixes: - Object & group visualizations didn't work. - Interpolating pointcache didn't do rotation.
2009-07-13Keyed physics refresh:Janne Karhu
- Keyed targets in one list instead of "chaining", this opens up many more possibilities than before and is much less obscure. - Better keyed timing possibilities (time & duration in frames). - Looping over keyed targets list. Other changes: - New child setting "length" with threshold (great for guard & underfur with a single particle system) - Modularization of path interpolation code. - Cleared "animateable" flags from many particle settings that shouldn't be animateable. Fixes: - Keyed particles weren't copied properly (ancient bug). - Hair rotations depended on global z-axis for root rotation so downward facing strands could flip rotation randomly. Now initial hair rotation is derived from face dependent hair matrix. (This caused for example ugly flipping of child strands on some cases). - Children from faces weren't calculated straight after activating them. - Multiple disk cache fixes: * Disk cache didn't work correctly with frame steps. * Conversion from memory cache to disk cache didn't work with cloth. * Disk cache crashed on some frames trying to close an already closed cache file. * Trails didn't work with disk cached particles. - Child rough effects were effected by emitter object loc/rot making them next to useless with animation, why didn't anybody tell me this!! - Lots of random code cleanup.
2009-07-04A bunch of fun stuff now possible because of new pointcache code:Janne Karhu
* Baked normal particles can now use the "Path" visualization. * Path "max length" & "abs length" are now history: - New option to set path start & end times + random variation to length. - Much more flexible (and calculated better) than previous options. - This works with parents, children, hair & normal particles unlike old length option. - Only known issue for now is that children from faces don't get calculated correctly when using path start time. * New option "trails" for "halo", "line" and "billboard" visualizations: - Draws user controllable number of particle instances along particles path backwards from current position. - Works with children too for cool/weird visualizations that weren't possible before. * Normal particle children's velocities are now approximated better when needed so that "line" visualization trails will look nice. * New particle instance modifier options: - "path"-option works better and has controllable (max)position along path (with random variation possible). - "keep shape"-option for hair, keyed, or baked particles allows to place the instances to a single point (with random variation possible) along particle path. - "axis" option to make rotation handling better (still not perfect, but will have to do for now). Some fixes & cleanup done along the way: * Random path length didn't work for non-child particles. * Cached & unborn particles weren't reset to emit locations. * Particle numbers weren't drawn in the correct place. * Setting proper render & draw visualizations was lost somewhere when initializing new particle settings. * Changing child mode wasn't working correctly. * Some cleanup & modularization of particle child effector code and particle drawing & rendering code. * Object & group visualizations didn't work. * Child simplification didn't work.
2009-06-242.5 - Particle Settings now AnimateableJoshua Leung
Added AnimData to ParticleSettings so that this will work. This seems to be ok in the brief tests I did, but be warned that this may not be optimal for the Particles System...
2009-06-21Particle system parentingJanne Karhu
* Allows moving, rotating & scaling of particle simulations. * Setting in particle render options. * Changes viewed & rendered particles from global space to parent space. * Doesn't effect simulations at all.
2009-06-06First new particle code:Janne Karhu
-Many things not yet working properly :) -Experimental new (hopefully more logical) categorization of buttons, feedback on this is very welcome. -Separate render & draw types, for example now there is actually a render option "halo" instead of all the different point draw types. -Particles get recalculated only from buttons that actually change something that has to be recalculated, for example changing visualization doesn't reset particles any more. -Boid physics buttons are still missing as I'm currently redoing the whole boids code. -Point caching is still very wip, so baking is not possible for example, but I added a few cache baking flags for rna that were/will be needed for particle buttons logic.
2009-04-202.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender ↵Brecht Van Lommel
-r19323:HEAD Notes: * blenderbuttons and ICON_SNAP_PEEL_OBJECT were not merged.
2009-02-252.5: Particle edit mode more functional now. Transform, brushBrecht Van Lommel
editing, paint cursor, radial control, mouse/border/circle/lasso select, mirroring, bad level calls fixed, etc.
2008-09-23- Particle-particle effectors we're quite unstable and not accurate at all. ↵Janne Karhu
Now this should be fixed (especially with other integrators than euler) as the needed inter-frame effector particle positions are interpolated properly from the current and previous positions (previously only the most recent position was used). - In practice this removes the dependency of particle simulations from the update order of objects and different particle systems inside objects. - As a nice side effect out of this we also get fully correct birth positions for "near reactor particles" (previously for example smoke trail reactor particles were not born smoothly along the target particles path).
2008-09-13Particle collisions upgrade:Janne Karhu
- Particle now use the deflector objects collision modifier data to collide with deflectors and as a result can now use the velocity of the colliding object for more realistic collisions. - Dynamic rotations are also quite a bit more realistic and are related to the friction setting of the deflector (to get any dynamic rotations there has to be some friction). This is largely due to the separate handling of rolling friction (approximated to be 1% of normal sliding friction). - Collisions should be a bit faster on complex deflectors due to the tree structure used by the collision modifier. - Collision should also generally be a bit more accurate. To be noted: Only the average velocity of individual deflector faces is used, so collisions with rotating or deforming objects can't be handled accurately - this would require much more complex calculations. Subdividing the deflector object surface to smaller faces can help with this as the individual face velocities become more linear.
2008-08-22New things for particle effectors:Janne Karhu
- For newtonian particles a "self effect" button in particle extras makes the particles be effected by themselves if a particle effector is defined for this system, currently this is a brute force method so things start getting slow with more than ~100 particles, but this will hopefully change in the future. - Two new effector types: charge and a Lennard-Jones potential based force (inter-molecular forces for example). -Charge is similar to spherical field except it changes behavior (attract/repulse) based on the effected particles charge field (negative/positive) like real particles with a charge. -The Lennard-Jones field is a very short range force with a behavior determined by the sizes of the effector and effected particle. At a distance smaller than the combined sizes the field is very repulsive and after that distance it's attractive. It tries to keep the particles at an equilibrium distance from each other. Particles need to be at a close proximity to each other to be effected by this field at all. - Particle systems can now have two effector fields (two slots in the fields panel). This allows to create particles which for example have both a charge and a Lennard-Jones potential.
2008-05-11fix for [#11136] Segmentation fault when copying objects with hairsCampbell Barton
2008-05-10Fix for second part of bug #11107: physics systems were referring toBrecht Van Lommel
vertex groups with a number, but this got out of sync if any vertex group was deleted, now it properly updates it.
2008-05-07Possible fix for #9691: blender failing to allocate memory when renderingBrecht Van Lommel
particles on windows, now allocates smaller chunks of memory.
2008-04-17Patch from GSR that a) fixes a whole bunch of GPL/BL licenseChris Want
blocks that were previously missed; and b) greatly increase my ohloh stats!
2008-04-10Point Cache RefactoringBrecht Van Lommel
======================= Caching and Baking: - The point cache is now cleared on DAG_object_flush_update(), and not cleared for time dependency graph updates. - There is now a Bake button instead of Protect. Also cache start and end frames were added to softbody and particles. - The cloth autoprotect feature was removed. - The Ctrl+B menu now also bakes cloth and particles next to softbody and fluids. Additionally there are now frree bake and free cache menu entries. - The point cache api has been changed. There is now a PTCacheID struct for each point cache type that can be filled and then used to call the point cache functions. - PointCache struct was added to DNA and is automatically allocated for each physics type. - Soft body now supports Bake Editing just like cloth. - Tried to make the systems deal consistently with time ipo's and offsets. Still not sure it all works correct, but too complicated to solve completely now. Library Linking: - Added some more warnings to prevent editing settings on library linked objects. - Linked objects now read from the cache located next to the original library file, and never write to it. This restores old behavior for softbodies. For local simulation the mesh and not the object should be linked. - Dupligroups and proxies can't create local point caches at the moment, how to implement that I'm not sure. We probably need a proxy point cache for that to work (ugh). Physics UI: - Renamed deflection panel to collision for consistency and reorganized the buttons. Also removed some softbody collision buttons from the softbody panel that were duplicated in this panel for cloth. - Tweaked field panel buttons to not jump around when changing options. - Tabbing e.g. Soft Body Collision into the Soft Body panel, it now only shows Collision to make the panel names readable. - I tried to make enabled/disabling physics more consistent, since all three system did things different. Now the two modifier buttons to enable the modifier for the viewport and rendering are also duplicated in the physics panels. Toggling the Soft Body and Cloth buttons now both remove their modifiers. - Fixed modifier error drawing glitch. Particles: - Particles are now recalculated more often than before. Previously it did partial updates based on the changes, but that doesn't work well with DAG_object_flush_update() .. - Fixed memory leak loading keyed particle system. Now keys are not written to file anymore but always created after loading. - Make particle threads work with autothreads. Continue Physics: - The timeline play now has a Continue Physics option in the playback menu, which keeps the simulations going without writing them to the cache. - This doesn't always work that well, some changes are not immediately updated, but this can be improved later. Still it's fun to get a feel for the physics. Todo: - Point cache can get out of sync with and undo and changing a file without saving it. - Change the point cache file format to store a version (so old point cache files can be either converted or at least ignored), and to do correct endian conversion. - Menu item and/or buttons for Ctrl+B. - A system("rm ..") was changed to remove() since the former is very slow for clearing point caches. These system() calls were already giving trouble in a bug in the tracker, but really most use of this system("") should be changed and tested. - The Soft Body Collision and Clot Collision panel titles don't mention there's point cache settings there too, doing that makes them unreadable with the default panel setup.. but may need to make the names longer anyway.
2008-04-02Fix for bug: [#8117] Particles with fluid brokenJanne Karhu
-Handling of fluid particles was not coded at all -Now things should work properly, but as fluid particles are not very familiar to me I'd appreciate some thorough testing
2008-02-17Particle looping works again at least to some extent (don't have time to ↵Janne Karhu
test thoroughly). Instant looping had to be removed as it caused more trouble than good things.
2008-02-17Removed "roll" and "rotation" child particle kink modes as they couldn't be ↵Janne Karhu
made to work properly. Will have to see later if these can be put back in so that they actually work.
2008-02-15Effectors on particle hair can now be applied to the children insteadBrecht Van Lommel
of the parents, with the "Children" button next to Stiffness.
2008-02-14Particles' angular velocity mode "velocity" was actually just a duplicate of ↵Janne Karhu
"spin" without any angular velocity, so it was removed.