=============================
* Clean up and optimizations in skinned/deformed mesh code.
* Compatibility fixes and clean up in the rasterizer.
* Changes related to GLSL shadow buffers which should have no
effect, to keep the code in sync with apricot.
This adds redcode (the file format of RED one, R3D) support to blender.
Seems to work fine with the footage I found on the web, but keep in
mind, that because of the unoptimized nature of libopenjpeg, frame
decoding isn't that fast.
It is also a rather challenging task, to make 4k-float-footage realtime :)
Notes:
- edgehash.c still has some weirdo code causing warnings on lines 80 and 117
i.e. if (v1<v0) v0 ^= v1 ^= v0 ^= v1;
- material.c (in pyapi) apparently doesn't seem to be making use of some functions for glossy stuff
this way, holding a key will only give multiple down events, father then down,up,down,up.... etc.
This is needed for apricot so they can play games in blenders :)
interface for it is still missing. Right now there is only a simple hard coded
example, that moves a single control particle with strong attraction
and velocity forces through the domain.
I added more detailed information about the control code to the wiki
http://wiki.blender.org/index.php/SoCFluidDevelDoc#The_Fluid-Control_Branch ,
together with some thoughts on how a Blender integration could be done.
The latter is now obsolete and will be soon
removed.
Some tiny build tweaks for darwin committed
in preparation of bigger changes for proper
SDK suport both on intel and ppc
it is now in a state where it can be safely
merged with trunk.
Note: basic icons were provided but I'm not
an icondesigner and working in a 16x15 grid
is way too small for me, so feel free to
change them.
1. All Ipo channels are now independent.
In Blender 2.45, all 3 Loc Ipo channels were automatically set
together. For example, having just a LocX Ipo channel was sufficient
to fix the X, Y and Z coordinates, with the Y and Z value taken
from the object original Y and Z location in Blender. The same
was true for the 3 Rot and the 3 Scale Ipo channels: the missing
channels were assumed to have constant value taken from the object
original orientation/scale in Blender.
With this patch, all Ipo channels are now independent.
THIS WILL CREATE BACKWARD COMPATIBILITY PROBLEM if you omit to
define the 3 channels of a same type together in your Blend file:
the undefined Loc, Rot, Scale coordinates of the object will
be influenced by the parent/spawner Loc/Rot/Scale in case the
object is a child or dynamically created.
2. Delta Loc, Rot, Scale are now supported with the following
limitations:
- The delta Loc/Rot Ipo modify the object global (NOT local)
location/orientation
- The delta Scale change the object local scale
- The delta Ipo curves are relative to the object starting
Loc/Rot/Scale when the Ipo was first activated; after that, the
delta Ipo becomes global. This means that the object will return
to this initial Loc/Rot/Scale when you later restart the Ipo
curve, even if you had changed the object Loc/Rot/Scale in the
meantime. Of course this applies only to the specific Loc/Rot/Scale
coordinate that are defined in the Ipo channels as the channels
are now independent.
3. When the objects are converted from Blender to the BGE, the
delta Loc/Rot/Scale that might result from initial non-zero values
in delta Ipo Curves will be ignored. However, as soon as the
delta Ipo curve is activated, the non-zero values will be taken
into account and the object will jump to the same Loc/Rot/Scale
situation as in Blender. Note that delta Ipo curves with initial
non-zero values is bad practice; logically, a delta Ipo curver
should always start from 0.
4. If you define both a global and delta channel of the same
type (LocX and DLocX), the result will be a global channel equivalent
to the sum of the two channels (LocX+DLocX).
Changed getClipboard to GHOST_getClipboard and putClipboard to GHOST_putClipboard
Removed ghost calls from blender and added the calls to winlay.h and ghostwinlay.c
This cleand up casts in drawtext.c
* dxguid is necessary only when building WITH_BF_OPENAL=1. I already added the mingw version to our SVN in lib/windows/openal/lib and now I made sure it is linked against only when needed.
- Moved WIN32 code to ghost and added code for other systems.
- Added functions getClipboard(flag), and putClipboard(buffer, flag)
-Flag is used on X11 to request selection buffer or clipboard.
-If any other system uses flag = 1 the function returns doing nothing.
- Changed ctrl +c/v and shift+ctrl + c/v to do the same thing (use the clipboard).
- Changed the menu items (copy, paste) to use the clipboard.
minus one small include file that was commented out, I'm not
sure why it was commented out but I'm pretty sure its needed.
If there are still problems later we can sort it out, everything
else is pretty simple.
Kent
I don't know the name of the "SGI Fast" atom, but this is only request
when blender start so i don't think that this make some "big" difference.
So just use plain X11 calls (thanks GSR for the info).
This add support for the different window state in Linux/X11.
Two think to take care:
1) m_post_*
2) motifFullScreen
1) This is only need if we want start a window in FullScreen or Maximized
state. The basic problem is that we can't set this property to a window
until it's really map, so i add a "post init" proccess for this two
special case (check the code for more info).
2) The Motif Hint isn't really a "FullScreen" mode, it's only a
"NO DECORATIONS" options, so if the window manager don't support WM-spec
this function only remove the border of the window, don't make it
FullScreen. A simple fix (hack) is check if the Window Manager support
WM-spec, in case that not, remove the decorations and move/resize the
window.
Test in different WM (gnome, kde, etc) and comment are welcome :)
* made win32 ghost getClientBounds so that it returns area compatible with osx getClientBounds
- if a window is non-fullscreen, substract decoration, since that'll be added by GHOST_WindowWin32()
* use SetWindowLongPtr/GetWindowLongPtr (instead of SetWindowLong) as it is compatible with 64bit windows.
- Added GHOST_kEventWindowMove event, for sending event that the
window has moved
- Fixed GHOST_GetClientBounds() for OSX (get window rect)
Todos:
- add same event for X11 and Windows
- solve why ghost doesn't call client event-proc while scaling window
(at least, not in osx)
starting angle in some cases, but wasn't always noticeable due
to the IK solver changing it anyway.
Bugfix for hidden bones in pose mode still being active, and
preventing other bones from becoming active.
compilation. Currently, it is not yet active by default, but
Genscher wanted to do some tests.
It can be used to distribute the computation load onto multiple shared-
memory CPUs by splitting the domain along the y-axis (assuming a
gravity force along z). However, there is no load balancing: so
if there's fluid only in one of the y-axis halves you will not get
a speedup for 2 CPUs.
- Added a fix for the memory allocation bugs #7120 and #6775. In
solver_init.cpp there are now several variables max___MemChunk
(line 692+), that set upper limits for various systems. The same
problem existed for mac & linux, but the limit is higher, so
it probably went by undetected. The windows limit is currently 1GB,
if the strange 700MB limit problems mentioned in the bug regports the
bugs persist, this could be further reduced. For 64bit compilations
this problem shouldn't exist anyway.
What's still missing is a display of how much the resolution was
reduced to fit into memory...
- And some minor solver code cleanup.
====================
The MeshDeform modifier can deform a mesh with another 'cage' mesh.
It is similar to a lattice modifier, but instead of being restricted
to the regular grid layout of a lattice, the cage mesh can be modeled
to fit the mesh better.
http://www.blender.org/development/current-projects/changes-since-244/modifiers/
Implementation Notes:
- OpenNL has been refactored a bit to allow least squares matrices to
be built without passing the matrix row by row, but instead with
random access. MDef doesn't need this actually, but it's using this
version of OpenNL so I'm just committing it now.
- Mean value weights for polygons have been added to arithb.c, a type
of barycentric coordinates for polygons with >= 3 vertices. This
might be useful for other parts of blender too.
==
Solving is now done independent of scale, by scaling the chain to have a
size of about 1.0. This solves some issues with small or big chains, and
also makes the IK stretch setting independent of scale. The latter breaks
backwards compatibility somewhat, but is an improvement over what it did
before.
draws into the
frame.
This patch includes some changes I made...
* use blenders bitmap fonts (rather then own fonts)
* select font size
* user interface layout changes
* Marker as another image stamp option
Also added some new API calls
BMF_GetFontHeight(font);
BMF_DrawStringBuf(...); - so we can draw text into an imbuf's image buffer.
get_frame_marker(frame) - get the last marker from the frame.
IMB_rectfill_area(...) - fill in an image buffer with a rectangle area of color.
TODO - draw stamp info in 3d view, at the moment it just displays in the animation.
applied MT_QueryAssert_patch.diff part of
patch [#6994] Fixing warnings: conversion from string constant to char *
Submitted by Renato Perini (mjordan).
Thanks, Renato!
Bugfix:
The mem cache limitor didn't take mmap-allocated memory into account,
resulting in effectively disabling it, since all imbuf-data is
currently allocated using mmap.
Tooltip getStringSize and getBoundingBox correction
Not really any user-visible changes here, but a nice clean-up of
internal font drawing functions, in this case used in tooltips.
Thanks!
settting WITHOUT_BF_INSTALL='true' will disable
the copying to INSTALL_DIR
you can use that in your user-config.py or commandline
slipping in minor cleaning for Os X builds
-----
Bugfixes for #6816 and #6988: Under Windows, Blender would crash if boolean
operations were done on objects which resulted in an empty mesh. Problem was
"iterators" created for ConvertCSGDescriptorsToDerivedMesh() tried to access
invalid memory.
turntable code should work reasonabilly well now.
fly code need works but is no more insane on Os X.
transform object is not present here.
if you find the movements a bit slow, you can speed
it in the preferences up to 2x in the view & controls
panel.
button1 (left) of the device let you switch between
the 3 modes. button2 let you switch between
unconstrained and dominant mode.
the plugin must be named 3DxNdofBlender.plug
and be placed in a folder named plugins in same
folder as executable
check no scaling is done in the plugin
please check it works ok on 3 platforms
-----
More improvements to boolean tools. The main change (although very little in
code) is changing fuzzy comparisons of floating point values. For testing, a
new define is added in intern/boolop/intern/BOP_MathUtils.h called
VAR_EPSILON, which enables better comparisons. This is turned on by default;
undefining it will revert to using the previous comparisons. The downside of
these new comparisons is a loss in speed, but the resulting meshes are more
likely to be manifold (although still not always).
The other changes include speed improvements based on profiling results and
fixes for the improper creation of triangular faces with only two vertices.
As previously the plugin itself is available
on his site :
http://cubelogic.org/blender/3dcnxplug-lin.c
or on mine (soon) :
http://jlp.nerim.net/dev/6dof/
Please let me know if any problem, i cannot
test.
We have now patches for our 3 main platforms
features are still minimal, but will follow
soon.
------
Bugfix #6847: Previous fix for "spikes" when using booleans caused creation
of faces with only two unique vertices ("eekadoodles"). This patch cleans up
the test for triangles with near-colinear vertices so PHANTOM faces can be
used again, and also adds a hack for now which removes any eekadoodle faces.
I haven't figured out yet exactly how the faces are being created; if I can
do so and fix it the hack will be removed.
for NDOF devices
I applied the patch but cant test so please
let me know if any problem.
the plugin itself can be found either
on Ettore site http://cubelogic/blender/
or on my site http://jlp.nerim.net/dev/6dof/
on my site there is also the source of
mac plugin
-----
Bugfix #6847: Boolean code was marking some valid faces as "PHANTOM" when the
three vertices were nearly co-linear (according to its tests). This
introduced holes into one or both meshes which could then result in either
holes in the final results and/or spurrious faces which should have been
split.
This commit removes the code in question until either an alternative test is
coded.
which caused faces of convex objects to be classified wrongly. Also removed
some dead code. For convex objects, the BSP trees would also be literally
orders of magnitude larger than they were supposed to be (one test with a
5000 face torus reduced the BSP tree size from 5.96 million nodes to just 72.1
thousand).
work only in non camera mode in 3D view
need the external plug-in to be compiled separately
line 894 of ghostwinlay.c must be replaced with
values adapted at your system
see mailing list for features planned and how
to use
notes :
it compiles but is non functional
lacks the platform specific changes in ghost ( i cant test windows)
lacks the code for plug-in.
the platform specific code will be added when we sync with Ettore work
the plug-in itself cannot be added here
- fix for 3DPlugin compile
- cleanup of bullet path
- removed PHY_ODE project from 3D plugin too, not used anymore
Now all configurations should build again, let me know of any problems!
Not been able to test if the 3DPlugin is actually working,is job for another day ;)
Also the 3DPlugin is compiled without OpenExr, this needs to be looked into once too.
- fixed WinTab locking positioning into absolute mode
- hopefully fixes [ #5586 ] Cursor control
Note: Setting the extent of the digitizing context causes Application to override
system settings for pen/mouse control. Removing this fixed the issue.
headers <al.h>, <alc.h>, and <alut.h> instead of <AL/al.h>, <AL/alc.h>,
and <AL/alut.h>
(cmake generated makefiles now work out of the box on my intel mac)
on OSX to have slow selection and mouse response.
Code from the previous commit is still there, but the #define that
triggers it has been commented out.
- GEdon't crash when attempting to add constraint on game objects without physics controller
- GEimproved some physics -> graphics synchronization issues
- small experiment with game engine timing to smooth framerate/reduce tearing
- removed warnings in attributes.cpp,
- and a first Klockwork bug fix: removed NULL returns in ntl_ray.h,
several other issues mentioned in the Klockwork report
are either hard to fix or not really errors...
I should have talked to joeedh before committing last time...
This is an another attempt to fix the mingw long commandline
issue on all versions of windows (I didn't realize that the
2k in Win2k refered to the length of the commandline).
In this version, I break libsrc.a up so that no archive has
more than 30 object files (adjustable with one line of
code). I also fudge the priority numbers to ensure correct
linking. This was done in a "guess the number" way until
it worked, so please test and please check for correctness.
WINDOWS CRASH EMULATION!
If you use the -d (debug) argument for starting blender, it will now:
- set all freed memory to 0xFFFFFFFF
- set all malloced memory to 0xFFFFFFFF
The first option will give nice crashers when you read from freed memory.
The second option is for OSX especially, it has the nasty habit to give
zeroed mallocs.
duplicate code. Also removed redundant files from the bsp module,
that where replaced by boolop last year, no sense in updating them
for these changes. On the user level things should still work the
same, this is only preparation work.
Not counting the removed files, -1501 lines of code, not too bad :)
Basic support for normal pressure sensitivity is implemented, adding other features like tilt etc. shouldn't be too difficult, now that basic support is there.
Tested with WACOM Volito on Windows XP using the pressure sensitivity with texture paint to change size of the brush .
Added additional include dir to scons, and MSVC 7 project files - other build systems might have to be updated.
#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
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!
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
* 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...
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)
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
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.
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
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
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.
- 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
- 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.
"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.
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.
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.
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.
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
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
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
Try to get the yy_wrap and yy_parse definitions for IRIX. Hoping
that it will also help Kent's multiply resolved warnings, I've done
this so that these symbols are defined only if they are currently
undefined. I'm not sure if it will work though, please test!
BOP_Mesh.h:45: warning: ‘class BOP_Mesh’ only defines private constructors and h
as no friends
drawimasel.c initalized a variable so it didn't give warnings about it.
(wasn't really needed but if the code changes could be potential issue)
Kent
- Added part of Austin's msvc8 fixes (vector::erase function
was "misused"), hopefully compiles better now.
- Ctrl-b now also bakes a selected fluidsim domain
similar to the softbodies.
- Added surface smoothing option for domains: default is
1, higher values result in a smoother surface (and probably
slightly higher comupation times), while 0 means the surface
is not modified at all.
- Added BLENDER_ELBEEMBOBJABORT environment variable in readBobj,
if >0 quits blender when a not yet existing fluidsim
frame should be loaded. Useful for rendering simulations
as far as possible from the command line.
- Surface normals pointer is now set to NULL in readfile.c
- Fixed win32 error string handling, now uses a function
to return the string from the solver.
- Fixed fluidsim particle halo scaling problem.
- Solver update
a string as an int and it was causing a warning.
I changed it to check to see if the string == 0
return 0 else return 1.
The only thing that called this function was memtest.c and it
had outdated code, so I fixed that...
was calling MEM_set_error_stream updated to
MEM_set_error_callback
Kent
* These changes bring cross-compiling Blender for Windows on Linux one step
closer to reality. The 'biggest' change is in makesdna SConscript to make
sure a linux native makesdna is built, that can be run, too. Next to that
proper checks for env['OURPLATFORM']=='linuxcross' are added in various
places.
Switch change in pluginapi.c was necessary, and AFAIK it should work like
that also on WIN32, if not, slap me.
Note: everything *compiles* now nicely, it is just that the final *linking*
doesn't work (yet). Anyone who fixes this will be the
hero of cross-compilers :)
no GE right now ( need to adapt to erwins file reshuffle
so may be i wait a bit until he has his mind made up )
elbeem is running when you remove the extra std:: at some places
well the msvc6 preprocessor is not very smart
--> std:: is not a member of std:: :)
so i guess there is a "using namespace std" somewhere
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.pnghttp://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 :)