Age | Commit message (Collapse) | Author |
|
for example due to a subsurf modifier preceding a cloth modifier.
|
|
Add read/write/interpolate functions.
In order to get rigid body point cache id from object it's now required to pass the
scene to BKE_ptcache_ids_from_object().
Rigid body cache is drawn in the orange color of the bullet logo.
|
|
This was left over from 2.4x days and is not used anymore.
Now simulations are always interactive.
|
|
Issue was caused by cycles being duplicated curve objects before converting
them to mesh. This duplication will loose pointcache which resulted in object
not being properly deformed.
|
|
|
|
|
|
added some missing functions too - which are not used yep but should be there for api completeness.
* CDDM_set_mloop
* CDDM_set_mpoly
* BLI_mempool_count
|
|
without the underscores these clogged up the namespace for autocompleation which was annoying.
|
|
set to correct default, was 10 when supposed to be 1.
|
|
|
|
also removed some unused function definitons.
|
|
|
|
http://markmail.org/message/fp7ozcywxum3ar7n
|
|
|
|
|
|
|
|
* Fixed cmake compile.
* Fixed segmentation fault when closing Blender, caused by rna changes from earlier svn trunk merge.
|
|
Committed changes from previous weeks, biggest changes are:
* Canvas can now have multiple "surfaces" that each can have specific format, type and settings.
* Renewed UI to support this new system.
* Aside from old "image sequence" output format, Dynamic Paint can now work on vertex level as well. Currently vertex paint and displace are supported.
* Integrated vertex level painting with Point Cache.
* Added viewport preview for Point Cache surfaces.
Due to massive amount of changes, old Dynamic Paint saves are no longer supported. Also some features are temporarily missing or may not work properly.
|
|
|
|
|
|
earlier, don't know why I didn't notice these before.
|
|
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.
|
|
* Not strictly necessary right now, but better for future.
* Struct data (only boids at the moment) is now written as structs (with dna) so they work between 64 and 32 bit machines too.
|
|
* I've getting bad feelings about the point cache index_array for a while (cause for this bug too), so from now on memory cache uses a simple binary search directly on the index data to handle queries to specific data points.
* This is a bit slower than just checking from a dedicated array, but it's much less error prone, uses less memory and makes the code more readable too, so it's not a tough choice.
|
|
* Massive reorganization of pointcache code, things are now cleaner than ever.
* For all but smoke the cache is first written to memory when using disk cache and after that written to disk in one operation. This allows less disk operations and the possibility to compress the data before writing it to disk.
* Previously only smoke cache could be compressed, now the same options exist for other physics types too (when using disk cache). For now the default compression option is still "no compression", but if there aren't any problems this can be set to "light compression" as it's actually faster than no compression in most cases since there's less data to write to the disk. Based on quick tests heavy compression can reduce the file size down to 1/3rd of the original size, but is really slow compared to other options, so it should be used only if file size is critical!
* The pointcache code wasn't really 64bit compatible (for disk cache) until now, so this update should fix some crashes on 64bit builds too. Now all integer data that's saved to disk uses 32 bit unsigned integers, so simulations done on 64bit should load fine on 32bit machines and vice versa. (Important disk cache simulations made on 64bit builds should be converted to memory cache in a revision before this commit).
* There are also the beginnings of extradata handling code in pointcache in anticipation of adding the dynamic springs for particle fluids (the springs need to be stored as extradata into point cache).
* Particles were being read from the cache with a slightly wrong framerate. In most cases this probably wasn't noticeable, but none the less the code is now correct in every way.
* Small other fixes here and there & some cosmetic changes to cache panel, but over all there should be no functional changes other than the new disk cache compression options.
* This whole re-organization also seems to fix bug #25436 and hopefully shouldn't introduce any new ones!
|
|
- made theme colors for mesh edge len & face angle/area display.
- use %g rather then %f for float display, trims unneeded zeros.
- store cached 2d and 3d text color as bytes rather then floats, compare when drawing to avoid setting the context.
- use unsigned char for more color functions, avoids casting to glColorubv().
|
|
* Pointcache code was quite ugly looking and complicated, so here are mostly just cosmetic adjustments, but some improved logic also.
* Slight cleanup of pointcache ui too.
* Shouldn't have any functional changes what so ever, so poke me right away if something seems off.
|
|
smoke are stored together:
* Separate caches were causing quite a lot of problems both in principle and practice.
* For example it doesn't really make sense to have different frame ranges for normal and high resolution smoke, but this was fully possible before.
* Also to fully bake the smoke you had to do a "Bake All Dynamics", which completely defeats the whole point of the feature!
* As a result of this change the smoke cache usage is much much simpler and less error prone.
* This is quite a big change, but hopefully there should be less rather than more problems as a result :)
Some other related changes:
* Changing the cache name now works for disk caches properly too, it now just renames the cache files so should be faster too!
* Smoke is now always forced to disk cache with step 1 on file load as there were some strange cases where smoke was trying to use memory cache.
* Disabled smoke debug prints from console.
* Disabled changing smoke parameters when smoke is baked.
Note to users: The unfortunate side effect of this is that old high resolution simulations have to be baked again, but in return you get much better and more logical functionality. Sorry none the less!
|
|
- remove MEM_guardedalloc.h from header files (include directly)
|
|
|
|
or get it from the context instead.
|
|
|
|
- library data allows pointcache writing (hard to know how this should work long term so ifdef'd for now)
- changing the frame now updates the dupligroup objects
- BKE_ptcache_ids_from_object(), option to get the id's from duplis
note! scene_update_tagged() is called from the main() loop, and runs BKE_ptcache_quick_cache_all(), this could become a performance issue, especially with duplis, should probably not call BKE_ptcache_quick_cache_all() all the time, even when not playing back animation.
(commits 27856 by Campbell from render25 branch)
|
|
Shouldn't contain any functional changes.
|
|
This reduces point cache sizes dramatically especially if particle
life time is small compared to total simulation length. For example
with the settings: particle amount = 10000, start = 1, end = 200,
life = 10, cache step = 1, the unoptimized blend file size (compressed)
was a little over 22 Mb and with this optimization the file is a little
under 2 Mb (again compressed). In addition to saving memory/disk space
this also probably speeds up reading from cache, since there's less
data to read.
As an additional fix the memory cache size (displayed in cache panel)
is now calculated correctly.
|
|
transform animation
* The exact location of particle birth wasn't cached if cache step was greater than 1, so the interpolation from an unborn particle to a living one wasn't accurate at all.
* Although not ideal, the current solution is to copy the birth location to the previous cached frame so it's always exact. This should work properly for memory & disk cache.
* This fix shouldn't cause any problems, but exhaustive tests of caching are difficult so be sure to let me know if there's strange behavior.
|
|
|
|
recalc_emitter_field on mousemove and poll() functions.
run on entering particle editmode only.
|
|
* Fix for time cursor getting 'stuck' after baking point caches
|
|
* Enable cache for high res + new preview
* Bugfix for smoke banding (in cooperation with N_T)
Hint: Work-in-progress regarding collision objects so can be broken, didn't test
Hint2: jahka enabled a general particle panel but
* bake button doesn't work
* step is not supported for cloth
* several other things there ;)
|
|
- Moves hair from face-space to global space and back.
- Allows for editing of emitter mesh after hair combing.
- Disconnect hair before doing topology changing changes in mesh edit mode, connect after changes.
- Notes:
* The closest location on emitter surface to the hair root is used to connect the hair.
* Emitter deflection, sticky roots and add brush don't apply for disconnect hair in particle mode.
- Todo for future:
* Copy disconnected hair from object to another (when 2.5 has proper copy operators again).
* Possible automatic disconnect/connect with topology changing operations in mesh edit mode.
Other changes/fixes:
- Proper subtypes for some particle mode notifiers.
- Particle mode selections didn't draw correctly because of using lighting for the paths.
|
|
- 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.
|
|
* cache for low res (deactivating high res for now)
* new way of view3d rendering of smoke (no longer 3 axes) -using 3dtexture now (introduced into gpu/intern)
* introducing LZO and LZMA libs into extern (makefiles missing for now)
* reducing memory usage after simulating for the frame ended (freeing temporary buffers)
* splitting smoke into 2 modifier for the cache-sake (it cannot handle more than 1 cache on the same modifier-index)
* no color on gui anymore
* fixing non-power-of-2 resolutions (hopefully)
* fixing select-deselect of domain drawing bug
* fixing drawobject.c coding style (making Ton happy) ;-)
HINT #1: If scons doesn't work -> cmakefiles are up-to-date, couldn't test scons (but i tried to mantain them, too)
CODERS HINT #1: we really need a way to disable adding all modifiers through "Add Modifiers" dropdown!
WARNING #1: before applying this commit, deactivate your SMOKE DOMAIN in your old files and save them then. You can open them then savely after that.
WARNING #2: File and cache format of smoke can be changed, this is not final!
|
|
There was some missing code or something causing compiling problems.
|
|
* prepare pointcache for smoke (smoke doesn't use it yet, commit follows later)
|
|
|
|
* Silencing some compiler warnings
* Set paths for Scene rendering settings so that they can be animated (or at least won't produce error warnings)
|
|
- Correct fix for file loading crash introduced by earlier point cache commit.
- Simulations are no longer calculated to current frame at render time automatically.
* This has to be thought through more carefully at some point, perhaps through render profiles.
* All simulations can be updated manually to current frame from any cache panel with the "update all to current frame" button.
- Some explanatory comments added for BKE_pointcache.h.
|
|
- 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.
|
|
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!)
|