Commit Graph

255 Commits

Author SHA1 Message Date
5a981db3ec Fix [#34561]: Possible smoke crash if smoke flow had lower density than adaptive domain "threshold". 2013-03-10 19:12:40 +00:00
ddddb7bab1 code cleanup: favor braces when blocks have mixed brace use. 2013-03-09 03:46:30 +00:00
203301e26e Additional smoke fix for r54464: floating point precision still sometimes produced way too high values. Now values are also clamped within correct range. 2013-02-11 15:03:22 +00:00
1647725913 Fix: smoke simulator flow sometimes produced NaN values, causing fire to disappear from the simulation. 2013-02-11 13:28:18 +00:00
e9678e74b0 Fix [#34008]: Scaling Smoke Domain In Z-Axis Crashes Blender
Also as minor change skip base_res update on domain step if adaptive domain isn't enabled.
2013-01-29 19:27:05 +00:00
86991fbcb0 Fixed render time regression in Blender Internal
It was caused by image threading safe commit and it was noticeable
only on really multi-core CPU (like dual-socket Xeon stations), was
not visible on core i7 machine.

The reason of slowdown was spinlock around image buffer referencing,
which lead to lots of cores waiting for single core and using image
buffer after it was referenced was not so much longer than doing
reference itself.

The most clear solution here seemed to be introducing Image Pool
which will contain list of loaded and referenced image buffers, so
all threads could skip lock if the pool is used for reading only.
Lock only needed in cases when buffer for requested image user is
missing in the pool. This lock will happen only once per image so
overall amount of locks is much less that it was before.

To operate with pool:
- BKE_image_pool_new() creates new pool
- BKE_image_pool_free() destroys pool and dereferences all image
  buffers which were loaded to it
- BKE_image_pool_acquire_ibuf() returns image buffer for given
  image and user. Pool could be NULL and in this case fallback to
  BKE_image_acquire_ibuf will happen.

  This helps to avoid lots to if(poll) checks in image sampling
  code.

- BKE_image_pool_release_ibuf releases image buffer. In fact, it
  will only do something if pool is NULL, in all other case it'll
  equal to DoNothing operation.
2013-01-21 08:49:42 +00:00
4a427d8e0d style cleanup 2012-12-29 01:54:58 +00:00
b2c66e268f replace MIN/MAX 3,4 with inline functions 2012-12-21 05:07:26 +00:00
e72239c6a4 style cleanup 2012-12-18 01:52:18 +00:00
d2a741048a Fix #33353: Smoke color problems with adaptive domain
High resolution cache didn't always read all written data fields which caused colors to get messed up.
2012-11-30 11:01:14 +00:00
d25b13d13f code cleanup: double promotion warnings, also allow cmake to build SDL without audaspace. 2012-11-09 16:15:00 +00:00
852a41fb0e style cleanup, also remove redundant call to set_listbasepointers in free_main(). 2012-11-07 01:02:28 +00:00
c64fa6a344 Smoke/Dynamic Paint: Allow use of fluid sim generated particles as emitter/brush. 2012-10-27 17:19:55 +00:00
23baf8c9c3 code cleanup: check defgroup_name_index() return value != -1, rather then checking >= 0.
also remove unused bmesh decimator code.
2012-10-22 17:19:05 +00:00
d599b643b7 style cleanup: bge, switch statements mostly.
also left bmesh decimator on in previous commit.
2012-10-21 07:58:38 +00:00
c4b46f119c Fix: Smoke 3d viewport shading was sometimes calculated incorrectly when adaptive domain was enabled. 2012-10-18 14:23:04 +00:00
92862f96dc code cleanup: use float sizes for function args. 2012-10-15 23:11:59 +00:00
57004cfb5a style cleanup:
also add helper makefile targets:
* tbz - makes a tar.bz2 of an svn export
* test_style_qtc - outputs style checks in qtc task format.
2012-10-10 23:44:07 +00:00
e9a61cd29d quiet compiler warnings from recent merge. 2012-10-10 14:28:47 +00:00
cb634b9100 Google Summer of Code project: "Smoke Simulator Improvements & Fire".
Documentation & Test blend files:
------------------
http://wiki.blender.org/index.php/User:MiikaH/GSoC-2012-Smoke-Simulator-Improvements

Credits:
------------------
Miika Hamalainen (MiikaH): Student / Main programmer

Daniel Genrich (Genscher): Mentor / Programmer of merged patches from Smoke2 branch
Google: For Google Summer of Code 2012
2012-10-10 13:18:07 +00:00
e75f5c8208 quiet -Wmissing-prototypes warnings, and enable this warning by default for C with gcc.
helps for finding unused functions and making functions static, also did some minor code cleanup.
2012-09-15 01:52:28 +00:00
3a0593cc3d code cleanup: dont use function calls like dot_v3v3, pow and sqrt within macros which results in calling the function multiple times needlessly.
also added some comments.
2012-07-06 22:48:28 +00:00
f5f25b81e8 style cleanup:
also fix for building ghost test and fix double free in one of the tests
2012-06-17 09:58:26 +00:00
eedaaee072 fix for building without smoke. 2012-06-06 05:37:38 +00:00
3ea554e0a2 Smoke Bugfix: Velocity of moving objects was too high after scaling patch.
Spoted by MiikaH.
2012-06-01 15:49:39 +00:00
ee854f581a Smoke: Fix messed up shadow display with OpenMP. This needs fixing. For now disable openmp for that function. Shadow calculation would be better raytraced on GPU or using shaders for the future.
Part of my Blender Smoke Development Phase III.

(accidently commited this to smoke2 branch first)
2012-05-28 14:31:08 +00:00
1e13168183 Smoke:
a) Another boundary fix. Resulted in smoke getting "sucked" back into the domain
b) Disabling substeps (internal thing). Fixes arbitrary explosions/instabilities.

Part of my Blender Smoke Development.
2012-05-27 18:45:16 +00:00
c4bbc5abfc Fixed smoke 3D-view issues: Preview became invisible from certain angles if domain size was < 1.0 and density+shading strength changed depended on domain size. 2012-05-25 09:40:56 +00:00
f883d12e0c Smoke: Start fixing scaling issues which happen with non cube-shaped domains.
Detail: Smoke solver and Blender side of smoke now share the same cell length.

First reported by the Sintel artists long ago, again reported by MiikaH.

Part of my Smoke Development Project Phase III.
2012-05-24 23:50:20 +00:00
8042c52fb6 Smoke: Fix wrong maximum timestep, resulting in exploding/unstable fluids.
Part of my Smoke Development project.
In conjunction with MiikaH and his gSoC project.
2012-05-24 18:22:36 +00:00
be53fde9cd code cleanup:
- remove duplicate includes
- blender builds with -Werror in C++ for fluids/smoke
2012-05-21 06:33:45 +00:00
7a95d4333a Fix reseting of particle lifetime and unborn feature when adding smoke - reported by blendernation 2012-05-08 11:39:32 +00:00
343edf2722 style cleanup: function calls & whitespace. 2012-04-29 17:11:40 +00:00
e701f9b670 style cleanup: whitespace / commas 2012-04-29 15:47:02 +00:00
3d1349609c - Tag unused variables
- Use (void) instead () for function declarations without arguments
2012-04-29 09:34:51 +00:00
8bf8a128c2 Smoke: Support for moving obstacles. (Merge from Smoke2 branch)
Sponsored by the Blender Development Fund.
http://www.blender.org/blenderorg/blender-foundation/development-fund/

Remarks:
The original code was not designed to support moving obstacles so I had to introduce some velocity constraints into the code to prevent smoke from exploding. If this causes problems with "fire" emulation, please let me know.
2012-04-28 21:46:43 +00:00
b4a0152e76 code cleanup: float formatting was confusing in some cases - eg: (0.,0.,0.) 2012-04-11 08:15:13 +00:00
f349aeacf1 Smoke: Use better standards for inflow
a) Set particle system for inflow to " show unborn"
b) Set particle system for inflow to lifetime = 1
2012-04-06 12:50:46 +00:00
126c9d4caa use cmake WITH_MOD_ * to exclude include paths which are not used. 2012-03-27 00:17:57 +00:00
69e6894b15 style cleanup: follow style guide for formatting of if/for/while loops, and else if's 2012-03-24 06:18:31 +00:00
d74ab9d598 Smoke bugfix: Collision objects were completely broken in some cases since no tessfaces were generated. (Thanks to Campbell for giving me the solution) 2012-03-20 20:32:17 +00:00
4f19c1a995 spelling cleanup 2012-03-18 07:38:51 +00:00
31d2ee9bf7 style cleanup, brackets in else/if, some indentation. 2012-03-06 18:40:15 +00:00
ea13ec1699 Spelling Cleanup 2012-03-01 12:20:18 +00:00
d8a70df8cc Smoke
------
New: Child particles are used as emitter. 

Based on the patch #30013 by Kai Kostack. Thank you!

Please do test this code!
2012-02-19 20:05:01 +00:00
24f83c7e3e minor edits to sync up with trunk, remove crash save handler, this can be added later if we need but isnt really apart of bmesh specifically. 2012-02-17 21:22:18 +00:00
fac771beca missed these last commit 2012-01-29 22:32:00 +00:00
4af4863baf svn merge ^/trunk/blender -r43639:43664 2012-01-24 16:18:20 +00:00
d7e30369f8 commented smoke collision derived mesh,
was storing its own copy of the collision mesh but never using it.
2012-01-24 01:21:43 +00:00
7508540c53 svn merge -r41575:41602 ^/trunk/blender 2011-11-07 07:01:24 +00:00