Commit Graph

125 Commits

Author SHA1 Message Date
Thomas Dinges
e3ed13cbd4 Cleanup: Remove special code for Visual Studio 2008.
Goodbye VC2008, it has been a pleasure (more or less) :D SCons / CMake cleaenup will follow.
Differential Revision: https://developer.blender.org/D715
2014-08-07 13:52:15 +02:00
Campbell Barton
2e840e56cf CMake: correct include dirs 2014-07-01 09:36:28 +10:00
Campbell Barton
a288644b1e Code Cleanup: WIN32 defines, check for _MSC_VER instead of !FREE_WINDOWS 2014-01-03 20:46:12 +11:00
Martijn Berger
1c8a12ee61 Fix T37987: MSVC 2013 has C99 headers and warns for out define hypot _hypot for good reason it seems 2014-01-02 22:19:10 +01:00
Campbell Barton
925c5010e8 fix for checking char arrays against NULL, instead check their first character. also remove some dead code (return directly after return). 2013-07-16 11:42:07 +00:00
Daniel Genrich
6a290d8e2a Smoke: Remove accidental leftover code from gSoC Smoke + my Smoke code merge.
Thanks to Miika for pointing this issue out and fixing it.
2013-05-21 19:52:22 +00:00
Miika Hamalainen
2345f0ee99 Fix: Smoke simulations of very high resolutions often produced weird results, as if smoke was colliding in an invisible wall.
This was caused by a "hack" Daniel Genrich introduced in his moving obstacles commit in r46050. I suppose it was originally added to prevent issues with too fast moving obstacles, but now it ended up limiting maximum velocity of higher resolution simulations.

Here is an comparision of 184 resolution simulation (simulation area limited by adaptive domain):
https://www.miikah.org/blender/smoke_with_pressure_limit_hack.png
https://www.miikah.org/blender/smoke_without_pressure_limit_hack.png


I now reverted that hack until a better solution is found. Daniel, can you check this out? Pressure was limited to maximum of dt * dx (= dt / res) which doesn't make sense to limit pressure based on grid resolution. Maybe better to limit with a constant factor instead?
2013-05-21 19:20:48 +00:00
Miika Hamalainen
f276f7f2ef Fix: Smoke simulator produced slightly different results on every run if openmp was enabled.
This was a typical threading issue. Move that particular function out of the parallel block.
2013-05-21 18:57:19 +00:00
Miika Hamalainen
53fd499d28 Fix: smoke noise tile was saved in Blender executable directory, which is often write protected on modern systems.
This caused high resolution smoke to always regenerate new tile when domain was reinitialized, slowing down especially adaptive domain simulations. Now noise tile is saved in Blender temp directory instead.
2013-05-20 17:48:16 +00:00
Campbell Barton
a120049c3b use psys->seed for smoke random number generator, increase size of MATHUTILS_TOT_CB and reduce float->double conversions. 2013-04-16 09:04:34 +00:00
Campbell Barton
ece766ee7e code cleanup: unused defines, remove unused scanfill success value from BLI_scanfill_begin(). 2013-04-10 23:52:07 +00:00
Daniel Genrich
7432924216 Smoke Bugfix /enhancement: Load pre 2.65 pointcaches.
Warning: Just make sure that you DON'T free the cache at any point. This patch can only display existing pointcaches from e.g. 2.64
2013-03-18 21:33:48 +00:00
Brecht Van Lommel
4f3ca854e1 Fix various warnings with clang build, and adjust cmake clang warnings flags
to include a few more that gcc is using too.
2013-02-26 21:58:06 +00:00
Campbell Barton
c3b96f33af internal: add include so blender builds against libpng1.6 2013-02-19 15:15:34 +00:00
Miika Hamalainen
1c4f704d5c Smoke simulator: add more float precision checks to make sure other data types don't get messed up either. (Relating previous fire fixes) 2013-02-11 20:22:47 +00:00
Campbell Barton
1a8dcbcb4f quiet -Wnarrowing warning. 2013-02-11 16:22:20 +00:00
Campbell Barton
9d4be17de4 style cleanup 2013-02-04 00:05:15 +00:00
Campbell Barton
c2839bfe76 add option WITH_SYSTEM_BULLET to link against the bullet installation found on the system.
Note: this doesn't work yet for everything with latest stable bullet (2.81), need to look into why and likely apply some patches upstream.
However I managed to link blender by disabling some features, likely it can be made to work without too much trouble.
2013-01-03 00:23:52 +00:00
Bastien Montagne
ab2c273b12 Added GPL header to sconscripts!
Also changed shebang to '#!/usr/bin/env python', this is more portable across unixes...
2012-12-17 08:01:43 +00:00
Miika Hamalainen
8b477463d1 Fix #33411: Smoke simulator using uninitialized noise tile
If loading an existing FFT noise tile failed the tile in memory was left uninitialized.
2012-12-05 17:58:24 +00:00
Brecht Van Lommel
2b962212c8 Fix #33411: crash baking smoke with FFT high resolution.
CMake had FFTW disabled by default, and when FFTW was not enabled it lead to
uninitialized memory usage. Now it falls back to wavelet if there is no FFTW,
and I've enabled it by default in CMake. If it's not found on Linux it will get
disabled automatically.
2012-12-05 15:46:31 +00:00
Campbell Barton
db8b7fcabb style cleanup and correct own invalid comment. 2012-10-31 11:45:41 +00:00
Campbell Barton
c93978d445 code cleanup: some edits for unused vars in recent smooth addition and some style edits. 2012-10-24 11:31:57 +00:00
Campbell Barton
bc8f602601 style cleanup 2012-10-20 18:46:57 +00:00
Daniel Genrich
c9fdf6e496 Smoke: Animated collision objects do no longer block smoke. Smoke gets transfered velocity from moving collision object.
Result:
http://www.youtube.com/watch?v=KRtc8eAgaZA

Part of my Blender Development Project Phase III, merged from Smoke2 branch

WIP docs:
http://wiki.blender.org/index.php/User:Genscher/Smoke_Development_Project_2012
2012-10-16 17:01:22 +00:00
Daniel Genrich
8a25e2d2b2 Smoke: Merge parts of Smoke2 branch
New:
----------
Collision objects do cause vorticity when passing through smoke

Part of my Smoke Development Project (milestone III)
2012-10-15 19:57:18 +00:00
Sergey Sharybin
c5300c638c Solve some issues with smoke when using strict compile flags
- Mark some functions as static
- ifdef-ed currently unused functions from spectrum.cpp
- Fixed missing prototype for smectrum() function
2012-10-15 09:25:03 +00:00
Campbell Barton
3a947cf537 code cleanup: remove redundant casts 2012-10-14 08:49:01 +00:00
Daniel Genrich
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
Campbell Barton
d724d0adfe code cleanup: quiet warnings for gcc's -Wundef, -Wmissing-declarations 2012-09-16 00:26:36 +00:00
Daniel Genrich
a1dd6ea836 Smoke: High res on even resolution did not write to all cells (downsampling = n-1, upsampling = n).
Thanks goes to MiikaH.
2012-08-10 09:58:58 +00:00
Daniel Genrich
8a0f6aa2f2 Bugfix: High resolution "exploded" when using uneven resolutions, sometimes with specific object scaling.
Part of Smoke Development Phase III.

Credit also goes to MiikaH: It was a teamwork effort and took days to track down. :)
2012-08-01 20:29:37 +00:00
Campbell Barton
32cf7fcdb1 code cleanup: spelling 2012-07-16 23:23:33 +00:00
Campbell Barton
ff9a4e445e fix for smoke writing uninitialized values to pointcache, not a big deal since they are ignored on reading. 2012-07-03 06:45:43 +00:00
Daniel Genrich
a0c6371b7f Smoke Bugfix: Turbulence was removed. 2012-07-02 13:41:51 +00:00
Daniel Genrich
9f7af5ef7e Bugfix for wrong / bad vorticity forming weird banding on the y and z axis.
Part of Blender Smoke Develeopment Milestone III.
2012-07-02 12:55:23 +00:00
Campbell Barton
9c504f6db2 correct freeing C++ arrays. 2012-06-10 20:14:15 +00:00
Daniel Genrich
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
Miika Hamalainen
eda0f3b186 Fix for smoke boundary conditions: "Open borders" behaved differently for positive and negative axises.
+ Some code cleanup.
2012-05-26 21:36:19 +00:00
Daniel Genrich
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
Daniel Genrich
796dd8a321 Fix compile error with msvc 2012-04-30 11:27:06 +00:00
Daniel Genrich
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
Daniel Genrich
be674afdad Bugfix (missed one code line): Copy paste induced bug found by Sv. Lockal.
Thank you for pointing this out!
2012-02-19 21:15:12 +00:00
Daniel Genrich
49b1d14aee Bugfix: Copy paste induced bug found by Sv. Lockal.
Thank you for pointing this out!
2012-02-19 20:59:46 +00:00
Campbell Barton
6d965f4493 style edits for function declarations 2011-12-30 07:55:15 +00:00
Campbell Barton
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
Andrew Wiggin
7c46f1c4b7 Fix some MSVC 2010 warnings (including one apparent bug in intern/elbeem/intern/solver_relax.h) 2011-09-25 12:33:51 +00:00
Campbell Barton
84d06f252e tag & comment unused vars with /* UNUSED */ 2011-09-20 08:48:48 +00:00
Campbell Barton
bf5a6531a6 replace define '#if FFTW3==1' --> '#ifdef WITH_FFTW3' 2011-09-05 23:46:08 +00:00
Campbell Barton
410c5e3cd2 cmake source definitions:
remove missing includes and use more strict formatting.
2011-07-16 23:01:14 +00:00