Commit Graph

6532 Commits

Author SHA1 Message Date
Ton Roosendaal
a8afa6dc20 Proper syntax for freeing an allocated array in silly c++ :) 2006-03-01 21:18:31 +00:00
Brecht Van Lommel
b9861d2a80 Array modifier patch by Ben Batt! (#3788)
This modifier allows to make arrays of meshes, with multiple offset types:
- constant offset
- offset relative to object width
- offset with scale and rotation based on another object

The number of duplicates can be computed based on a fixed count, fixed length
or length of a curve. Duplicate vertices can be automatically merged.

Nice docs and example files available in the wiki:
http://mediawiki.blender.org/index.php/BlenderDev/ArrayModifier
2006-03-01 15:30:10 +00:00
Nathan Letwory
b4505d32dc ==SCons==
* WITH_BF_GAMEENGINE=0 implicitely means WITH_BF_BULLET=0 now
2006-03-01 09:15:50 +00:00
Geoffrey Bantle
13a1a4c15e -> Vertex Group/Weight support in removedoublesflag()
Remove doubles didn't previously deal with vertex groups/weights properly. Now it averages the weights of vertices when they are doubles and share the same group. Verts that get merged but don't belong to all the same groups are dealt with as well.
2006-03-01 03:33:45 +00:00
Kent Mein
fc9615f15e reverted the looping vs switch statement. I don't know what I was thinking
in doing this in the first place.  (1 conditional vs 1 per loop duh)
Thanks for calling me on this Alexander.

(I didn't actually benchmark it to see but its pretty obvious which is less
work for the computer.)

Kent
2006-02-28 23:58:17 +00:00
Ton Roosendaal
3ecee5f154 Complex issue in group duplicators... since they can duplicate entire
animation systems, all transforms of all duplicated group members have
to be set first, before drawing or converting for render. This because
then still deformation can be calculated.
2006-02-28 20:43:21 +00:00
Kent Mein
59aced7a50 Fix for bug #3886
Basically the check for a type of jpeg was messed up.
I added a imb_is_a_jpeg function since I was working on that bit and
it makes it a little more similar to the other filetypes.

I also changed a switch statement that had the same loop for all
cases, just moved the loop outside of the switch statement.

Kent
2006-02-28 18:30:16 +00:00
Ton Roosendaal
21df108cb9 Saving OpenEXR half didn't free allocated half buffer... silly c++ memory
management!
2006-02-28 16:45:52 +00:00
Ton Roosendaal
b1c7f7f0f7 Urm... Kent's commit to fix a bug broke the other nodes that use the
same composit3_pixel_processor() function. gcc even gives nice warning:

node_composite.c: In function `node_composit_exec_mix_rgb':
node_composite.c:1437: warning: passing arg 9 of `composit3_pixel_processor' from incompatible pointer type

floats were read as pointer...
2006-02-28 16:24:25 +00:00
Peter Schlaile
5a8fd7d809 - Now the cache limitor also frees the float-planes 2006-02-28 13:07:02 +00:00
Jens Ole Wund
4e6d43a2cb msvc6 projects building debug 2006-02-28 09:07:13 +00:00
Jens Ole Wund
a040e208ee mscv6 projects again
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
2006-02-28 08:31:33 +00:00
Geoffrey Bantle
3662ce0045 -> Loop MultiSelect
Added new function in editmesh_mods.c, "loop multiselect" and can be
accessed via the CTRL-E popup menu in editmode. It is used to select
multiple edge loops/rings based upon the current selection set. It does
this simply by looping through a list of currently selected edges and
calls 'edge_loop_select' or 'edge_ring_select' for each one. This can
be used to build large selection sets quickly, as can be seen in
the following example images...

step 1 - http://www.umsl.edu/~gcbq44/multiselectA.jpg
step 2 - http://www.umsl.edu/~gcbq44/multiselectB.jpg
step 3 - http://www.umsl.edu/~gcbq44/multiselectC.jpg

-> Misc

While I was in there I fixed a couple of existing issues as well...

- "Select Less" now gets a proper undo push.
- countall() wasn't being called after inclusive selection mode conversion
- some strange formatting in EM_convertsel() in editmesh_lib.c fixed.
2006-02-28 02:28:45 +00:00
Kent Mein
4de6d54eec Fix for bug #3967.
It still needs some work but at least now it doesn't crash.

Basically it changed composit3_pixel_processor so that its using full
vector instead of first element (fac variable in the code).
In reality though its just pushing where its looking at the first element
of the vector to another function (do_mix_rgb)
which is calling ramp_blend with fac[0].

Kent
2006-02-27 21:38:57 +00:00
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
Ton Roosendaal
23f9960db9 Restored the free_imbuf_seq_except() in sequencer, to free all memory
of sequencer, except current frame. Apparently the cache limitor doesnt
work for floatbuffers yet... and while rendering, I prefer to have all
memory available for the render itself.

Schlaile; you might check on what is wrong, in case imbufs have have
a rect_float or zbuf_float, the cache doesnt work yet?
2006-02-27 19:36:42 +00:00
Campbell Barton
833e0be7bf Added a few more button align's 2006-02-27 16:30:53 +00:00
Ton Roosendaal
f68b0ddb2a Recoded Panorama rendering.
The old implementation was added quite hackish (talking about 10 yr ago).
You also had to make a small image slice, which was extended Xparts in
size. That also required to adjust the camera angle. Very clumsy.

Now; when enabling the Panorama option, it will automatically apply the
panorama effect on the vertically aligned tiles. You can just enable or
disable the "Pano" button, to get a subtle lens effect like this:

(without pano)
http://www.blender.org/bf/rt.jpg
(with pano)
http://www.blender.org/bf/rt1.jpg

For Panorama render, the minimum slice size has been hardcoded to be 8
pixels. The XParts button goes up to 512 to allow that. In practice,
rendering 64 slices will already give very good images for a wide angle
lens of 90 degrees, the curvature of straight lines then is equal to
a circle of 256 points.
Rendering a full 360 degree panorama you do by creating an extreme wide
angle camera. The theory says camera-lens 5 should do 360 degrees, but
for some reason my tests reveil it's 5.1... there's a rounding error
somewhere, maybe related to the clipping plane start? Will look at that
later. :)

Also note that for each Xpart slice, the entire database needs to be
rotated around camera to correct for panorama, on huge scenes that might
give some overhead.

Threaded render goes fine for Panorama too, but it can only render the
vertically aligned parts in parallel. For the next panorama slice it has
to wait for all threads of the current slice to be ready.

On reading old files, I convert the settings to match as closely as
possible the new situation.
Since I cannot bump up the version #, the code detects for old panorama
by checking for the image size. If image width is smaller than height, it
assumes it's an old file (only if Panoroma option was set).
2006-02-27 12:39:36 +00:00
Campbell Barton
534ee9e190 Made vertex clear work for selected faces from the menu, to be the same as Shift+K.
Also makde Shift+K work in weightpaint mode.
2006-02-27 12:34:53 +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
Campbell Barton
b7ff45f914 new emptys now have default settings for new emptys. 2006-02-27 06:00:00 +00:00
Campbell Barton
9e0d2837d5 Applied JMS's Patch. for better Python Dupli Access.
Made some fixes and changes.
* The matricies returned were wrapped. Wrapping Display Mesh matricies segfaulted sometimes. - Made a copy instead.
* Added 1 missing epydoc from the patch.
* Renamed getDupliMatrices to getDupliObjects, and changed to return a list of (object, matrix) tuples instead of just the matrix. This is much more usefull because it allows python to know what objects are used for dupliGroups and for dupliverts where there is more then 1 child. also cleaned up this function a bit.
2006-02-27 04:05:55 +00:00
Chris Want
9a21866aec pthreads for Makefiles/cygwin (don't forget to update lib/windows). 2006-02-27 00:03:18 +00:00
Campbell Barton
3f5fd39e28 removed typos causing MTL loading to fail. 2006-02-25 15:05:36 +00:00
Nathan Letwory
d9f9e76500 ==SCons==
+ SCons support for pthreads-win32. Library will be committed shortly into
  lib/windows, so be sure to check commit list and update that as well
  when the pthread lib is available.
2006-02-25 14:53:27 +00:00
Kent Mein
fa1129dc1d converted sqrtf to SimdSqrt Solaris has no sqrtf.
Kent
2006-02-25 13:43:15 +00:00
Ton Roosendaal
66e1c90d0f Bugfix: CTRL+select on a Bone, while in editmode Curve, crashed. 2006-02-25 12:49:35 +00:00
Ton Roosendaal
02a931ac4f Replacing SDL threads with pthread.
For some reason I thought SDL thread handling would be much simpler... but
the migration to posix pthread went very smooth and painless. Less code
even, and I even notice a slight performance increase!

All threading code is still wrapped in blenlib/intern/threads.c
Only real change was making the callback functions to return void pointer,
instead of an int.

The mutex handling is also different... there's no test anymore if a
mutex was initialized, which is a bit confusing. But it appears to run
all fine still. :)

Nathan Letwory has been signalled already to provide the Windows pthread
library and make/scons linking. For MSVC we might need help from someone
else later though.
2006-02-25 11:56:08 +00:00
Nathan Letwory
e377a5f721 ==SCons==
* Use same warning flags as with linux2, greatly reducing noise in
  output during compile. Also for developers using win32/mingw now
  in effect: correct *each* and *every* warning in your code. I
  command you to!
2006-02-25 10:40:31 +00:00
Nathan Letwory
8dd19059fc ==SCons==
* Warning flags I had dutifully copied from sirdudes yet unpublished
  make rewrite turned out to be the Paranoia flags, causing the flood
  of warnings. Using better flags instead (like current Makefile level 1).

  All developers on Linux that use SCons for building - (new) code you write is
  supposed to be *entirely* warning-free from now on (Ton said so!)
2006-02-25 01:06:02 +00:00
Nathan Letwory
9202ec2cad ==SCons==
* compile game-engine libs only when actually enabled
2006-02-24 18:55:44 +00:00
Chris Want
5e3163041a I had to disable mmap altogether for Irix. 2006-02-24 14:37:24 +00:00
Ton Roosendaal
d5096f48b1 forgot note for last commit;
There's one 'volatile' warning in pipeline.c still, should be harmless...
it is bad code to be rewritten soon.
2006-02-24 10:21:40 +00:00
Ton Roosendaal
7930c40051 Made the most critical variables in render pipeline "volatile", especially
the ones that get changed within threads, to communicate with the main
thread.

(Part of the long quest to get threaded render safe, especially in Linux)
2006-02-24 10:20:31 +00:00
Ton Roosendaal
3bd57e6a64 Paranoia "volatile" assignment to globals in MEM module. Was suggested to
do this for globals that can be changed within threads.
2006-02-24 10:18:48 +00:00
Campbell Barton
9c4ce4cae1 Should now work with python 2.3, also optimized dictionary's a bit. keys -> iterkeys and has_key -> try/except 2006-02-24 04:03:15 +00:00
Ton Roosendaal
d99d73ad03 restored SDL_WaitThread() again, SDL_KillThread() is not OK. 2006-02-23 23:12:33 +00:00
Ton Roosendaal
1612f6b392 Buttons could crash on wrong scene layer index... not sure how that index
can get wrong, but secure code is always OK. :)
2006-02-23 21:38:48 +00:00
Nathan Letwory
0ec3791d2d ==SCons==
* Add check for WITH_BF_OPENEXR to ensure WITH_OPENEXR is specified when
  needed. Now workyworky again
2006-02-23 21:37:29 +00:00
Nathan Letwory
2f8f1b8cdf ==SCons==
+ When giving CC and CXX on the command-line you can specify what compiler
  to use:

  scons CC=gcc-3.3 CXX=g++-3.3
2006-02-23 21:08:40 +00:00
Ton Roosendaal
ecdfa5374a Work in progress commit on saving OpenEXR with all render-layers and
passes in single file. Code is currently disabled, commit is mainly to
have a nicer method of excluding OpenEXR dependency from render module.
This should compile with disabled WITH_OPENEXR too.

Reason why EXR is great to include by default in Blender is its feature
to store unlimited layers and channels, and write this tile based. I
need the feature for saving memory; while rendering tiles, all full-size
buffers for all layers and passes are kept in memory now, which can go
into 100s of MB easily.
The code I commit now doesn't allocate these buffers while rendering, but
saves the tiles to disk. In the end is it read back. Overhead for large
renders (like 300 meg buffers) is 10-15 seconds, not bad.

Two more interesting aspects:
- Blender can save such multi-layer files in the temp directory, storing
it with .blend file name and scene name. That way, on each restart of Blender,
or on switching scenes, these buffers can be read. So you always see what was
rendered last. Also great for compositing work.
- This can also become an output image type for rendering. There's plenty of
cases where you want specific layers or passes saved to disk for later use.

Anyhoo, finishing it is another days of work, and I got more urgent stuff
now!
2006-02-23 20:57:31 +00:00
Ton Roosendaal
d9aac9d9b8 Bugfix for very very ancient envmap error. When you scale the envmap
object the OSA filtersize inverse scaled as well. Made small scaled
envmap objects far to blurry.
2006-02-23 20:18:29 +00:00
Stephen Swaney
977c201bc0 patch #3830 Fix for commenting a block of text with highlight enabled
Highlighting would not update when you un/commented a block of code.
Contributed by Ricki Myers (themyers).
2006-02-23 16:27:41 +00:00
Ton Roosendaal
f146e0e04e Composite: Image node now supports "start frame" values up to 10k. 2006-02-23 15:39:01 +00:00
Campbell Barton
6e12747b71 Added UI numeric access to bone radius (for envelopes), needed to accsess the other day to make bones the same radius and had to guess.
See the edit bone properties.

Just added a comment to DNA_armature_types.h about rad_head and rad_tail override, if a parant exists.
2006-02-23 14:45:59 +00:00
Ton Roosendaal
2c1a328f58 Tweak for Speed vector calculus for Ztransp render layer; it used to mask
out moving transparent pixels by checking for alpha>0.95, now it also
checks the solid layer (if present), and if there's no solid face in a
pixel, the speed vector gets also added and used for transparent pixels.

This solves the 'ugly' hard outlines for vectorblur of moving hair.

Before:
http://www.blender.org/bf/h1.jpg
After:
http://www.blender.org/bf/h2.jpg
2006-02-23 11:16:16 +00:00
Campbell Barton
8ab274ee30 Moved to brush cursors hotspot to be at the tip of the brush. 2006-02-23 04:38:33 +00:00
Chris Want
a30dc3866c Some issues compiling on Irix:
+ the code in writemovie.c no longer compiles (since the renderer
refactor). I have #if 0-ed it.

+ OpenGL on Irix doesn't have GL_ARB_vertex_program

+ mmap on Irix doesn't like MAP_ANON.

+ If using the MipsPro 7.3 compiler, the variable MIPS73_ISOHEADERS
can be set to point to the directory with those weird C++ headers
that don't have .h in the name
2006-02-22 23:34:12 +00:00