Commit Graph

40 Commits

Author SHA1 Message Date
Kent Mein
4764cbe71b commented out a debugging message... was getting errors about cast to int
losses percision on 64bit linux with gcc4.X

Kent
2006-02-27 20:05:05 +00:00
Nils Thuerey
e48af6f10b - elbeem.h header file was missing 2006-02-27 11:56:04 +00:00
Nils Thuerey
0b7b0162eb - typo in SConscript 2006-02-27 11:48:25 +00:00
Nils Thuerey
9a36e9b651 Sorry for the big commit, but I've been fixing many of these
issues in parallel... So this commit contains: an update of
the solver (e.g. moving objects), integration of blender IPOs,
improved rendering (motion blur, smoothed normals) and a first particle
test. In more detail:

Solver update:
- Moving objects using a relatively simple model, and not yet fully optimized - ok
  for box falling into water, water in a moving glass might cause trouble. Simulation
  times are influenced by overall no. of triangles of the mesh, scaling meshes up a lot
  might also cause slowdowns.
- Additional obstacle settings: noslip (as before), free slip (move along wall freely)
  and part slip (mix of both).
- Obstacle settings also added for domain boundaries now, the six walls of the domain are
  obstacles after all as well
- Got rid of templates, should make compiling for e.g. macs more convenient,
  for linux there's not much difference. Finally got rid of parser (and some other code
  parts), the simulation now uses the internal API to transfer data.
- Some unnecessary file were removed, the GUI now needs 3 settings buttons...
  This should still be changed (maybe by adding a new panel for domain objects).

IPOs:
- Animated params: viscosity, time and gravity for domains. In contrast
  to normal time IPO for Blender objects, the fluidsim one scales the time
  step size - so a constant 1 has no effect, values towards 0 slow it down,
  larger ones speed the simulation up (-> longer time steps, more compuations).
  The viscosity IPO is also only a factor for the selected viscosity (again, 1=no effect).
- For objects that are enabled for fluidsim, a new IPO type shows up. Inflow
  objects can use the velocity channels to animate the inflow. Obstacles, in/outflow
  objects can be switched on (Active IPO>0) and off (<0) during the simulation.
- Movement, rotation and scaling of those 3 types is exported from the normal
  Blender channels (Loc,dLoc,etc.).

Particles:
- This is still experimental, so it might be deactivated for a
  release... It should at some point be used to model smaller splashes,
  depending on the the realworld size and the particle generation
  settings particles are generated during simulation (stored in _particles_X.gz
  files).
- These are loaded by enabling the particle field for an arbitrary object,
  which should be given a halo material. For each frame, similar to the mesh
  loading, the particle system them loads the simulated particle positions.
- For rendering, I "abused" the part->rt field - I couldnt find any use
  for it in the code and it seems to work fine. The fluidsim particles
  store their size there.

Rendering:
- The fluidims particles use scaled sizes and alpha values to give a more varied
  appearance. In convertblender.c fluidsim particle systems use the p->rt field
  to scale up the size and down the alpha of "smaller particles". Setting the
  influence fields in the fluidims settings to 0 gives equally sized particles
  with same alpha everywhere. Higher values cause larger differences.
- Smoothed normals: for unmodified fluid meshes (e.g. no subdivision) the normals
  computed by the solver are used. This is basically done by switching off the
  normal recalculation in convertblender.c (the function calc_fluidsimnormals
  handles other mesh inits instead of calc_vertexnormals).
  This could also be used to e.g. modify mesh normals in a modifier...
- Another change is that fluidsim meshes load the velocities computed
  during the simulation for image based motion blur. This is inited in
  load_fluidsimspeedvectors for the vector pass (they're loaded during the
  normal load in DerivedMesh readBobjgz). Generation and loading can be switched
  off in the settings. Vector pass currently loads the fluidism meshes 3 times,
  so this should still be optimized.

Examples:
- smoothed normals versus normals from subdividing once:
  http://www10.informatik.uni-erlangen.de/~sinithue/temp/v060227_1smoothnorms.png
  http://www10.informatik.uni-erlangen.de/~sinithue/temp/v060227_2subdivnorms.png
- fluidsim particles, size/alpha influence 0:
  http://www10.informatik.uni-erlangen.de/~sinithue/temp/v060227_3particlesnorm.png
  size influence 1:
  http://www10.informatik.uni-erlangen.de/~sinithue/temp/v060227_4particlessize.png
  size & alpha influence 1:
  http://www10.informatik.uni-erlangen.de/~sinithue/temp/v060227_5particlesalpha.png
- the standard drop with motion blur and particles:
  http://www10.informatik.uni-erlangen.de/~sinithue/temp/elbeemupdate_t2new.mpg
  (here's how it looks without
  http://www10.informatik.uni-erlangen.de/~sinithue/temp/elbeemupdate_t1old.mpg)
- another inflow animation (moving, switched on/off) with a moving obstacle
  (and strong mblur :)
  http://www10.informatik.uni-erlangen.de/~sinithue/temp/elbeemupdate_t3ipos.mpg

Things still to fix:
- rotating & scaling domains causes wrong speed vectors
- get rid of SDL code for threading, use pthreads as well?
- update wiki documentation
- cool effects for rendering would be photon maps for caustics,
  and motion blur for particles :)
2006-02-27 11:45:42 +00:00
Nathan Letwory
b11c92c66e ==SCons==
* use proper seperator instead of *nix-only /
2006-02-07 21:12:01 +00:00
Nathan Letwory
27110ec0f4 ==SCons==
- remove blenderdummy.cpp from list, so that elbeem actually works
2006-02-07 21:04:22 +00:00
Nathan Letwory
4e82647e86 ==SCons==
+ BF_BUILDINFO=1 (by default) for build info in splash
- remove redundant renderconverter include dir
* check for win32-vc instead of only win32, so MingW compile goes ok
2006-02-04 16:36:37 +00:00
Nathan Letwory
3bb82a27fc == SCons ==
* This commit is all of the rewrite work done on the SCons system. For
  documentation see doc/blender-scons.txt and doc/blender-scons-dev.txt.
  Also http://mediawiki.blender.org/index.php/BlenderDev/SconsRefactoring
  contains valuable information, along with what still needs to be done.

    - linux, os x and windows compile now.
    - files are compiled to BF_INSTALLDIR (see config/(platform)-config.py)
        - NOTE: Jean-Luc P will commit sometime during the weekend proper
          appit() for OS X. For now, copy the resulting binary to an
          existing .app bundle.
    - features:
        - cleaner structure for better maintenance
        - cleaner output during compile
        - better handling of build options
        - general overall speed increase
        - see the wiki for more info

  Cygwin, FreeBSD and Solaris systems still need work. For these systems:
    1) copy a config/(platform)-config.py to ie. config/cygwin-config.py
    2) set the proper defaults for your platform
    3) mail me at jesterking at letwory dot net with you configuration. if
       you need any modifications to the system, do send a patch, too.

  I'll be giving first-aid today and tomorrow, after that it'll be all
  regular development work :)

  /Nathan
2006-02-04 14:15:10 +00:00
Jens Ole Wund
1ae7fb0c99 doing MSCV6 project woodoo ( preparing orange --> bf migration )
NOTE to Ton and Hos
PLEASE do not try to merge any ot the MSVC6 project files (*.dsw ,*dsp)
I have a plan to get it done with a minimum of pain
thanks
ole
2006-01-26 22:05:39 +00:00
Nils Thuerey
006e9547a9 - 'extern "C"' fix for MSVC as suggested by Stephane 2005-11-24 12:42:33 +00:00
Nils Thuerey
1b6482771e - solver now supports animated time steps, gravity
and viscosity, an example can be found here:
  http://www10.informatik.uni-erlangen.de/~sinithue/temp/fluid_timeanim.mpg
- for simulation time animation the time IPO of the object is currently used,
  for all three there should probably be new ipos in the fluidsim struct
- started the API in elbeem.cpp, to get rid of parser & export
  via HD (it's not yet used)
2005-11-23 12:51:07 +00:00
Kent Mein
46875a6400 Changed powf to pow. (For Solaris)
Kent
2005-11-21 18:03:42 +00:00
Jens Ole Wund
0093857b4f fixing msvc6 projects to compile again 2005-11-09 19:29:04 +00:00
Nils Thuerey
35c605d299 - replaced values.h by float.h/limits.h as suggested by Hos,GSR,UnNamed 2005-11-09 16:47:49 +00:00
Nils Thuerey
8a13f43416 - forgot to enable mac compile fix 2005-11-09 16:30:05 +00:00
Nils Thuerey
e3f681da67 - popup menu now aborts by default
- changed directory/prefix input (only 1 string instead of two, more similar to render output settings now)
- changed reading/writing of surface files
- slightly enhanced surface smoothness
2005-11-09 07:56:26 +00:00
Chris Want
0fbd27fd9b I seem to have problems with the distinction between else and #else today.
My apologies!
2005-11-05 22:20:40 +00:00
Chris Want
165ed1b116 Use limits.h and float.h on *bsd instead of values.h.
On this subject (and thanks to GSR for research) on debian the
values.h has the following warning:

/* This interface is obsolete.  New programs should use
   <limits.h> and/or <float.h> instead of <values.h>.  */

Should values.h be used at all?
2005-11-05 21:09:47 +00:00
Joseph Gilbert
beece21d1f project file update
*Added the boolop project
2005-11-03 20:07:55 +00:00
Nils Thuerey
d348027499 - hopefully fixed osx compilation by forcing compilation
with a single file again (intern/elbeem/intern/solver_main.cpp
	includes intern/elbeem/intern/solver_init.cpp and
	intern/elbeem/intern/solver_util.cpp when __APPLE_CC__ is defined)
- minor cleanup of inlined functions
2005-10-26 12:07:51 +00:00
Jens Ole Wund
dd38751a84 updated elbeem project for new / removed files 2005-10-25 18:18:43 +00:00
Nils Thuerey
a7e9a9d9c0 Only restructured code:
- added Hos fixes
- split up solver into 3 cpp files (as suggested by jonathan)
- de-inlined function that caused gcc33 to use >1GB of memory
2005-10-25 08:07:52 +00:00
Kent Mein
85939c5839 looks like the warning fix caused problems so reverting it.
Kent
2005-10-11 19:21:31 +00:00
Kent Mein
c6524703d3 A couple of small fixes to get things working on solaris.
added #include <ieeefp.h>  similar to where its included in
other files.  (made an ifdef that matches other includes of the same
file)

solaris does a lot of type overloading so there is no expf  its just exp
so I added a #define expf exp wrapped in an ifndef

Finally, I fixed a warning in cfglexer.cpp about multiply defined
yy_wrap functions.

Kent
2005-10-11 18:07:37 +00:00
Jens Ole Wund
ad915277a0 msvc6 project file suite complete again 2005-10-10 17:27:17 +00:00
Joseph Gilbert
ee77c42f01 Projectfile update
* added new file to elbeem project
2005-10-10 15:34:56 +00:00
Nils Thuerey
7095d8a11f - minor solver fix for msvc compilation
- added pop up menues for fluid sim bake with no
  fluid objects or without valid output dir settings
- fixed 3d view redraw for fluidsim buttons
2005-10-10 11:31:06 +00:00
Nils Thuerey
d3d8441f67 - fixed fluidsim inflow speed init
- fixed intersecting fluid objects init
- added MSVC6 fixes from bjornmose (thanks!)
2005-10-10 08:52:42 +00:00
Nils Thuerey
328eeaf10b - added option to switch off compiling elbeem to scons files (set USE_FLUIDSIM=true)
in this case only the new blenderdummy.cpp and utilities.cpp have to be compiled
- restructured gui:
   * domain options split up into 2 sections
	 * added compressibility and refinement settings
	 * added inflow/outflow object types
- increased progress bar by 1
2005-10-10 06:59:47 +00:00
Jens Ole Wund
f342f06920 again an intermediate solution for the msvc6 builders
added msvc6 project file for builing elbeem

NOTE: it won't build unless some spots in elbeem code are cangend

see -->
fixing elbeem to build on msvc6
http://projects.blender.org/pipermail/bf-committers/2005-September/011952.html


[quote]
And no.. i won't set up a msvc6 project for building blender_elbeem.lib
until things calmed down a bit.
[/quote]

well i did for me to continue work, why not share.

if you do *rebuild all* in this project (release mode) on success will do a
post build step which will copy blender_elbeem.lib to the lib/windows..blah folder
such that the msvc6 (blender) project will find it for happy linking.

it even #defines MSVC6 so all the above changes could be nicly hidden behind that
( my local tree does so ) but it is on Nils to decide if he wants his code to be *pested*.
2005-10-02 20:57:53 +00:00
Joseph Gilbert
f6c7cf7c13 projectfile update to elbeem
* fixed lib paths
* removed files
* fix preprocessor define
2005-09-29 02:22:56 +00:00
Nils Thuerey
227c88c293 - corrected MSVC6 fix in ntl_vector3dim.h (caused problems with SDL includes)
- removed print from SConscript
2005-09-28 17:52:06 +00:00
Nils Thuerey
d7b441473a - removed some unecessary files & code
- debug output now controlled globally by elbeem debug level
  (BLENDER_ELBEEMDEBUG environment var), also for fluidsimBake
	and read/writeBobj
- debug output is written to file for WIN32
- added "for" and "vector" etc. defines for MSVC6
  (I couldnt get hold of the compiler itself, so not tested yet)
2005-09-28 16:20:57 +00:00
Joseph Gilbert
b6ecdb8c35 Project file update for elbeem
Warning clean up of python project
2005-09-26 14:46:14 +00:00
Nils Thuerey
4fb0cccc68 - merged latest version of fluid solver
(fixed shadowed variables warnings, removed cfgparser.hpp,
	added cfgparser.h, removed debugging output)
- added support for env. var BLENDER_ELBEEMDEBUG to enable
  debugging output again
- fixed missing triangle display (marching cubes produced v3=0 triangles)
- fixed geometry init bug (nearest intersection check
  for intersecting objects was messed up)
- changed position of derived mesh creation in DerivedMesh.c
  (for some reason the useDeform code is necessary, without it or
	 with useDeform=0 nothing is displayed)
- 3dviews now update every 2 seconds to show simulation progress
- note: mesh_strip_loose_faces(me); in ./source/blender/blenkernel/intern/mesh.c:937
  not necessary anymore?
2005-09-23 14:42:14 +00:00
Joseph Gilbert
38922c74c0 update to .NET project files
*Added elbeem project to /intern
(please rebuild intern)
2005-09-22 19:45:00 +00:00
Joseph Gilbert
f29f335ad5 Before including <GL/gl.h> on windows you have to include <windows.h> 2005-09-22 18:03:58 +00:00
Nils Thuerey
e1fe7c88ec - fixes elbeem SConscript file for python2.3
- added temporary fix for 128+ resolutions
2005-09-21 13:30:39 +00:00
Chris Burt
47d5cc2757 Added zlib include for solaris and windows to fix broken compilation of
new fluids sim. Thanks lukep and theeth!
2005-09-18 17:06:21 +00:00
Jean-Luc Peurière
e2d577de9e initial commit of the fluid simulator.
Ton reviewed and gave his blessing.
Zr, can you have a look ?

see :
http://projects.blender.org/tracker/?func=detail&atid=127&aid=3039&group_id=9

for initial comments.

N_T : the solver itself (elbeem) needs some works to get rid of
warnings
2005-09-18 13:27:12 +00:00