Commit Graph

419 Commits

Author SHA1 Message Date
Nils Thuerey
59ef29a073 - another solaris math function fix 2006-11-05 18:11:04 +00:00
Nils Thuerey
c8411cfeab - a minor fix for solaris (problems with round&pow) 2006-11-05 17:28:23 +00:00
Nils Thuerey
3bea663ffa - bugfixes
#4742 exported normals are now correct
  #4821 & 4956 for complex movements in/outflows can now also
  use the animated mesh option
- new features
  * isosurface subdivision: directly
    creates a finer surface mesh from the simulation data.
    this increases simulation time and harddisk usage, though, so
    be careful - usually values of 2-4 should be enough.
  * fluidsim particles: extended model for particle
    simulation and generation. When isosurface subdivision is enabled,
    the particles are now included in the surface generation,
    giving a better impression of a single connected surface.
    Note - the particles are only included in the final surface
    mesh, so the preview surface shows none of the particle
    effects.
  * particle loading: different types of particles can now be selected for
    display: drops, floats and tracers. This is a bit obsolete
    due to the extensions mentioned above, but might still be useful.
    Floats are just particles floating on the fluid surface, could
    be used for e.g. foam.
  * moving objects impact factor: this is another tweaking option,
    as the handling of moving objects is still not conserving
    mass. setting this to zero simply deletes the fluid, 1 is
    the default, while larger values cause a stronger
    impact. For tweaking the simulation: if fluid disappears, try
    increasing this value, and if too much is appearing reduce it.
    You can even use negative values for some strange results :)
- more code cleanup, e.g. removed config file writing in fluidsim.c,
  added additional safety checks for particles & fluidsim domains (these
  currently dont work together). I also removed the "build particles"
  debug message in effects.c (seemed to be unnecessary?).

Some more info on the new features:
Here are two test animations showing the difference between
using the particle generation with isosurface subdivision.
This is how it would look with the old solver version:
http://www10.informatik.uni-erlangen.de/~sinithue/blender/fluid6_fl6manc4_1noparts.mpg
and this with the new one:
http://www10.informatik.uni-erlangen.de/~sinithue/blender/fluid6_fl6manc4_2wparts.mpg
Both simulations use a resolution of 64, however, the version with particles
takes significantly longer (almost twice as long).
The .blend file for a similar setup can be found here:
http://www10.informatik.uni-erlangen.de/~sinithue/blender/fluid6_testmanc4.blend
(Minor Tips for this file: dont enable subdivions of characters until rendering,
thus leave off for simulation, as it uses the rendering settings! For making
nice pictures switch on subdivion, and OSA.)

And here's a picture of old vs. new (for webpage or so):
http://www10.informatik.uni-erlangen.de/~sinithue/blender/fluid6_manc4compare.png
2006-11-05 16:30:29 +00:00
Ton Roosendaal
fde6fc6dd4 Bugfix #4540
Boolean crashed when using vertexcolors or UVs. The fix is disputable... it
just always returns a valid char * for "face vertex material", whatever
that may be... this fix seems not to break anything.

Also moved the report to Todo tracker, with message:

-> Need new Boolean maintainer!
2006-11-04 13:47:11 +00:00
Nathan Letwory
cdd4748692 * add freebsd3 to X list 2006-11-02 05:17:46 +00:00
Kent Mein
4657db2a38 More bugs found thanks to klockwork
mallocn.c  check malloced memory before using it.
ssp_blas2.c free memory that wasn't but should have been.

Kent
2006-10-27 15:00:31 +00:00
Kent Mein
5fdd9bcb9e Another klockwork patch.
Check to make sure BOP_newEmptyMesh returns a mesh before trying to use it.

Kent
2006-10-25 19:47:21 +00:00
Kent Mein
00b2d4f052 Another bug found by klockwork.com
This one is just a simple test to make sure a malloc works before using
the variable allocated.

Kent
2006-10-24 16:42:12 +00:00
Kent Mein
0360be49f5 This patch is the first of many to follow that deals with various
problems reported by klockwork.com who was very nice and has offered to
provide free source code analisys for us.

This one deals with freeing memory for an object when there is an
error.  (The function allocated memory intending to return it but
then ran into problems, and was forgetting to free it before it returned
NULL)

Kent
2006-10-24 15:17:39 +00:00
Nathan Letwory
88446eeca4 Patch 5105 by Joshua Leung (Aligorith), slightly modified by me
* Add WITH_BF_YAFRAY, which per default is 'true', so no visible changes for developers (and users).

Set WITH_BF_YAFRAY to 'false', and you'll save some major compile time :) Also handy if you're strapped for memory and compilation fails on yafray compilation due
 to this.

- this commit also has a few whitespace changes and
- made BF_NO_ELBEEM a proper BoolOption. This will be renamed to WITH_BF_ELBEEM in the near future...
2006-10-18 05:45:47 +00:00
Andrea Weikert
857f7a66fa ==== MSVC 7 project files ===
maintenance work:
- added missing files in blenkernel
- updated Bullet in extern
- Python: SurfNurb.c
- removed compile and dependency of PHY_Ode
- made blenderplayer compile again (had to add pthreads lib)
2006-09-17 17:55:57 +00:00
Jens Ole Wund
b71a05227a adding include pathes 2006-09-15 19:21:11 +00:00
Ken Hughes
67ef2c05d8 Scons update for today's earlier boolean commit. 2006-09-08 02:36:44 +00:00
Kent Mein
4b5badf9cb Updated boolop Makefile so that it can find various headers it needs now.
Kent
2006-09-07 18:09:55 +00:00
Ken Hughes
d731945f01 ===Tools===
Experimental boolean tool optimization: for very large meshes a significant
amount of time is spend performing linear searches of edges.  This patch
implements a "hash" table (really more of a bucket table) to narrow the
search space.

If someone should need to disable this, just remove the "#define HASH" at
the beginning of BOP_Mesh.h
2006-09-07 17:22:57 +00:00
Brecht Van Lommel
e7d6537f1c Added support for threadsafe MEM_mallocN/MEM_freeN in the guardedalloc
module itself, replacing the special MEM_mallocT/MEM_freeT functions.
Mutex locking is only enabled when threads are running.

There was no good reason to have these separate, it just led to ugly
hacks when calling functions with non-threadsafe malloc from threads.
2006-09-06 19:13:23 +00:00
Nils Thuerey
f21f3cb290 - modified patch #4681, for scons compiling
of the fluidsim can now be disabled with the
	flag: BF_NO_ELBEEM='true', e.g. for irix systems.
	(The number of ifdefs from the original
	patch was reduced, and the defines are now
	only necessary when elbeem is switched off.)
- particle generation option is available again
2006-08-22 11:18:00 +00:00
Nils Thuerey
b6257305c9 elbeem update:
- slightly improved and optimized
  handling of moving obstacles
- cleanup of debug messages and minor fixes
2006-08-22 10:45:19 +00:00
Kent Mein
e4a9ad6d62 I Added a dummy Error Handler temporarly while it trys to
open the tablet and friends up....

Basically the issue this fixes is this.  On my linux machine at
work someone setup a generic xorg.conf file that defines all
kinds of devices (a tablet and other stuff) which are not on my
machine.  So blender was exiting when it tried to open the tablet
and failed.  Now it doesn't.... :)

I also did some very minor reformatting... (replaced parts that had spaces
with tabs)

Kent
2006-08-04 15:08:36 +00:00
Matt Ebb
8899116fc2 * Added tablet tilt data collection for X11 2006-08-03 16:10:16 +00:00
Matt Ebb
c85de34c26 * Tablet Pressure support in GHOST
This is 'ported' from Nicholas Bishop's sculpting GSoC tree. I'm bringing it
over now so a) it can be there for when lukep does his GHOST refactor b) it's
something that GHOST should have anyway, particularly now there's interest in
painting tools and c) it's missing support in Windows, so hopefully now some
enterprising Windows coder can add that more easily in the main bf tree.

Right now X11 and Mac OS X are supported. I added and can maintain the Mac OS X
part, but I'm not familiar with the Xinput stuff, which Nicholas wrote. Both
X11 and Mac are collecting active device and pressure, and Mac is also
collecting x and y tilt data. Up to coders how they want to use this info! :)

Although the data's coming in, I haven't actually made this do anything. I
thought it best to leave it to brecht to figure out what he wants to do with the
painting stuff, and I wonder what other interesting uses there could be for it
(proportional edit?). I'll write implementation details in a separate mail to
the committers list.
2006-08-03 12:23:00 +00:00
Kent Mein
6c89868386 Adds scons support for SunOS...
(I have one small problem with linking python's static library but
other than that this should work)

Kent
2006-08-03 02:46:37 +00:00
Ton Roosendaal
56322ca051 Minor fix: default name for dupli-alloc was mixed up, using mapalloc for
malloc, and vice versa.
2006-07-22 17:04:18 +00:00
Nils Thuerey
10215a8ff4 - fixed bug #4517:
there was a wrong divisor for memory estimate
2006-07-07 14:17:08 +00:00
Erwin Coumans
8e9acb4f96 uninitialized var 2006-07-06 01:16:30 +00:00
Ed Halley
f12b19cc2d Needed to add the conditional commands to ranlib for the darwin platforms.
Matches the example of the other intern/*/Makefile libraries.
2006-07-06 00:05:33 +00:00
Ton Roosendaal
64ff9ae4a8 Mac intel commit
- patch from Douglas with endian fixes
- Makefile adds static libiconv.a from lib/
- this version will use OpenEXR libs from lib/ too, and is latest release
  with threading support
- openAL is missing, added it as default to not include it
2006-07-03 19:50:53 +00:00
Brecht Van Lommel
51f0717a78 Fix for bug #4425:
- Assert was causing blender to crash on non-manifold meshes with a decimation
  modifier. Even in a debug build, there's no reason to crash blender then,
  because the modifier handles this ok and displays a warning message.

  Part of the problem is NDEBUG not being set in scons/linux for release builds,
  but always enabled for makefiles even in debug builds.
2006-07-01 17:51:48 +00:00
Joseph Gilbert
3851ea07d4 *msvc project update
- commiting fixes for vc8
- updating projects for added files
2006-06-23 15:25:57 +00:00
Jean-Luc Peurière
5eb20cb91a fix of the previous security patch for file opening on Os X.
nobody noticed it was broken for 3 month ;)
2006-06-20 20:24:07 +00:00
Nils Thuerey
c63efa6243 - minor fix for moving object boundary conditions
and to prevent surface flickering near obstacle sides
2006-06-20 11:32:56 +00:00
Matt Ebb
3e272f6797 * Patch from Ed Halley:
"Swaps left and right bytes of small cursors for Carbon on Intel."

This fixes garbled cursors on Intel Mac builds. Tested on my G4 too and it works fine.
2006-06-19 04:04:31 +00:00
Nils Thuerey
b0a22902ec - another minor solver update to fix
obstacle fluid surface generation bug
- also contains some code clean ups
  and safer initializations
2006-06-12 12:55:51 +00:00
Nils Thuerey
a0d94e6727 - added fix for fluidsim copying bug
(surface mesh structs werent handled correctly,
  copying is now done in a new function)
2006-06-12 06:18:57 +00:00
Stephen Swaney
43e776690f removed extra qualifier on class memeber bool BOP_Mesh::isClosedMesh(); 2006-06-10 17:50:52 +00:00
Ken Hughes
6d2adf66e5 ===Tools===
Another boolean bugfix: don't add faces which contain only two vertices
(actually, triangles with two identical vertices).
2006-06-10 16:00:38 +00:00
Ken Hughes
7fcc5800ae ===Tools===
Adding back some code to booleans that got lost in the Orange merge.

I've also added back the code which checked that meshes were solid
("manifolds") but have the actual check in
intern/boolop/intern/BOP_Interface.cpp, since from my testing it was
not causing crashes or hangs.  It *can* give odd results depending on
what you're trying to intersect, but seems useful.  Additionally, since
existing bugs in the current code can create non-solid/non-manifold
meshes, seems hypocritical to create a mesh that can't later be used in
another boolean operation.
2006-06-10 15:47:19 +00:00
Ken Hughes
5c95302043 ===Tools===
Previous patch for "problems with STL iterators/vectors that only show up under
Visual Studio 2005" could cause a crash when object used as a boolean modifier
was changed (for example, flipping all the normals).  The problem is that result
of boolean operations (apparently) can result in empty meshes.  Patched to
use the vector::size operator to check for empty vectors before trying to
check the iterator.
2006-06-08 03:10:26 +00:00
Ken Hughes
b8c6c1fdf0 ===Tools===
Bug "fix" for #3932, and possibly for #3799.  Booleans can get into an endless loop (at least until memory runs out); through triangulation somehow a face is repeatedly added to the list of faces to triangulate.  This patch checks the face list for duplicates prior to a list add and aborts if a dup is found.

The real issue is why the triangulation is creating the face in the first place, but that will take a more thorough (and longer) examination of the code.  If I can fix that issue that prior to the 2.42 release, then this code can be removed.
2006-06-06 17:43:57 +00:00
Ken Hughes
a57bb6bee1 Bugfix #4081: support for OpenBSD platform for scons. Big thanks to Nathan Houghton for this contribution. 2006-06-05 15:52:26 +00:00
Erwin Coumans
abd8fba47f applied patch [ #4207 ] Boolean operations fix
Also fixed other problems with STL iterators/vectors, that only show up under Visual Studio 2005.

See also http://projects.blender.org/pipermail/bf-committers/2006-May/014608.html
2006-06-02 18:17:40 +00:00
Nils Thuerey
38547345e7 - fixed geometry init (object id init was missing)
- added more std::string fixes from bjornmose
2006-05-16 08:54:08 +00:00
Joseph Gilbert
3be8e53c10 update to msvc7 projectfiles 2006-05-13 14:46:48 +00:00
Jens Ole Wund
1e23c080de Happy msvc6 again .. however some new std::std::strings in El'Beem
i'll give it to nils later on
2006-05-12 22:00:27 +00:00
Nils Thuerey
74fc4fa254 - fixed MSVC problem in fluidsim.c
- removed some more debug output in the solver
2006-05-11 13:19:41 +00:00
Nils Thuerey
6d935aee42 - New options for mesh voxelization: shell only (also
works for non closed objects), volume ("normal"/old way of
  doing it), and a combination of both:
  http://www10.informatik.uni-erlangen.de/~sinithue/blender/voltcomp_sm.jpg
- Finally included bjornmose MSVC6 fixes
- Added support for animated meshes, e.g. meshes with
  parented skeletons. Is enabled for obstacles with a new button.
  A simple example with Bassam's mancandy can be found here:
  http://www10.informatik.uni-erlangen.de/~sinithue/blender/fluid2_mancandy.mpg
  http://www10.informatik.uni-erlangen.de/~sinithue/blender/fluid2_mancandy.blend
  (Warning - keep meshes as simple as possible, e.g. turn off subsurf
  for baking. Export probably shoulb be further optimized.)
- Changed handling of no/free/part slip obstacles, see:
  http://www10.informatik.uni-erlangen.de/~sinithue/blender/bndtcomp_sm.jpg
- Removed surface particle option for upcoming release,
  needs more testing & tweaking
- Added tracer particles instead (swimming along in the fluid)
- Updated wiki (description of IPOs still missing).
2006-05-11 08:09:02 +00:00
Kent Mein
d5ae204275 This is a bit of a hack, but it looks like sun
Used F11 and friends for its special keys Stop,again etc..
                  So this little patch enables F11 and F12 to work as expected
                  following link has documentation on it:
                  http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4734408
                  also from /usr/include/X11/Sunkeysym.h
#define SunXK_F36               0x1005FF10      // Labeled F11
#define SunXK_F37               0x1005FF11      // Labeled F12

I also added a comment explaning why the heck its there...

What this means is XK_F11 and XK_F12 do not line up with the F11 and F12
keys on sun keyboards.  So I've added special cases to correct the issue.

Doing a quick grep for XK_F shows there are some files in the
gameengine that use them when they probably shouldn't, but I'm not going to
attempt to fix them, Files that should be looked at are:
gameengine/BlenderRoutines/KX_BlenderInputDevice.h
gameengine/Converter/KX_ConvertSensors.cpp
gameengine/GameLogic/SCA_IInputDevice.h
gameengine/GamePlayer/common/unix/GPU_KeyboardDevice.cpp
gameengine/GamePlayer/common/windows/GPW_KeyboardDevice.cpp
gameengine/GamePlayer/ghost/GPG_KeyboardDevice.cpp
gameengine/Ketsji/KX_PythonInit.cpp

Kent
2006-05-10 19:46:06 +00:00
Jens Ole Wund
70c7865e85 msvc6 project linking with shell32.lib to see SHGetFolderPath()
removing dead files in el'beem however the "std::std::string" problem is still there
still no GE
2006-04-18 08:56:55 +00:00
Joseph Gilbert
f54a113cde Update to the VC7 projectfiles.
This should bring the projectfiles upto date for msvc7.

Moving these to version 7.1 so that the version 8 people don't have such a hard time importing into 2005.

Build intern.sln, extern.sln and then blender.sln. Enjoy. :p
2006-04-17 20:05:39 +00:00
Kent Mein
3815e20ad6 I renamed a couple of simple variables to prevent warnings about
variable blah at a higher scope is already defined...
(one of these was introduced by me when I moved a variable declaration
to the top of the function.)

Kent
2006-04-06 17:27:15 +00:00