Commit Graph

6308 Commits

Author SHA1 Message Date
Erwin Coumans
90e5a9aa14 Reorganized Bullet physics files, added preliminary vehicle simulation files (disabled).
Requires some changes to projectfiles/makefiles/scons, for the added and removed files!
2006-02-21 05:36:56 +00:00
Ton Roosendaal
a6e7ff5ee9 Very silly typo in code caused Preview Window for Compositor to copy
Z values wrong... :)
2006-02-20 21:11:02 +00:00
Ton Roosendaal
ec47d960dc Compositor: new node "Z Combine", to combine two images with comparing
depth values. Current version doesn't make nice AA though... that I
check on next.
2006-02-20 18:33:55 +00:00
Ton Roosendaal
11a5d80420 Group duplicators, using linked groups, and which itself again were
linked, did not expand group.
2006-02-20 17:44:21 +00:00
Ton Roosendaal
04ec4a2530 Compositor upgrade;
- Links now can be made between any socket type. The nodes recognize amount
  of channels, and will convert types if needed.
  Conversions from RGBA to 1 channel will use the 'RGB to BW' formula.

  Also note that conversions only happen when required. So you can blur an
  alpha channel, filter it, and put this in a 1-channel socket without any
  conversion to happen, which saves memory & cpu time.

  http://www.blender.org/bf/rt.jpg

  The blur nodes don't accept Vector input yet... But filter does.

- RGB Curve Nodes now have the premultiply option resored, 2 x faster

- Fixed some confusing code in Node Group handling... much stabler now
2006-02-20 13:43:40 +00:00
Campbell Barton
003b8ae2ef Another fix for a silly bug 2006-02-20 10:31:24 +00:00
Ton Roosendaal
24adc4f645 Hrms... theeth indeed cleaned up code, but it should also work! Didn't
compiling show the warnings?
2006-02-20 10:06:50 +00:00
Campbell Barton
883d56e922 tweak colin weighting again. 2006-02-20 05:30:15 +00:00
Campbell Barton
23e55acfcb Small update...
Bugfix, Wrongly waited colinear test that caused quads with co-linear edges to be made.
 Bugfix, Use active object even if unselected.
 Optimize, Skip further tests if face pair is above the quad error limit.
 Optimize, Faster edge/Face user dict creation ~10%
 Feature: Options to ignore VCols and UV's as delimetres.
2006-02-20 05:11:04 +00:00
Nathan Letwory
29a5fbc6b7 ==SCons==
* add -pthread compile switch for linux2 platforms to be on the safe side.
2006-02-19 22:21:45 +00:00
Ton Roosendaal
21be45b66e Another attempt to solve linux issues.... now threads get killed in
end instead of using SDL_WaitThread from example code...
2006-02-19 21:34:23 +00:00
Ton Roosendaal
1e95376410 Changing a glFLush() in glFinish() for drawing info text in renderwindow...
seems to be a reason for opengl crashes with thread render?
2006-02-19 20:53:07 +00:00
Nathan Letwory
0876e99ccf ==SCons==
A working configuration file for win32/mingw, provided by Rehno Lindeque.
Thanks!
2006-02-19 19:33:36 +00:00
Martin Poirier
012f56c3d6 Patch: [ #3283 ] strcat --> sprintf
Less yuckiness!
2006-02-19 18:41:33 +00:00
Martin Poirier
da6b87abb1 Path: [ #2789 ] Add a "copy size" constraint
At long last!
This new constraint is pretty simple. Following in the footsteps of such giants as Copy Loc and Copy Rot, it lets you constrain the size of an object/bone to another object/bone, with per axis restrictions.
2006-02-19 17:42:20 +00:00
Ton Roosendaal
c7b472a54e Composite: Added "Fac" input for AlphaOver, so you can control amount. 2006-02-19 17:25:51 +00:00
Ton Roosendaal
0c1a1a855c Fix for Colorband node, it skipped calculus when 1 output was unused :) 2006-02-19 16:33:19 +00:00
Ton Roosendaal
130c41c7ba More compositing goodies.
- Texture Node
Allows to use any Blender Texture block as input for masks or color
blending. The texture node doesn't generate a real image, but adjusts to
the size as mapped with during an operation. So it won't work to use it
as Image input for Blur or Filter nodes.

Note; the Vector inputs for this node only work with manual input now!

- Translation Node
Give any image an offset in X or Y direction

For the Texture node to work, I needed to move the central 'pixel
processor' up one level... to allow differently sized images to merge
and allow 'procedural images' without size.

Temporal image of the day: http://www.blender.org/bf/rt.jpg
2006-02-19 14:55:16 +00:00
Brecht Van Lommel
f624730d26 Warning fix in subsurf_ccg.c. Also changed subsurf UV vertex and edge
handles to be more consistent.
2006-02-19 11:37:50 +00:00
Ton Roosendaal
427339fd0b Adding new SpotLamps should get 'buffers' set to 1. Was in the do_version()
check, but not in adding lamps... this will fix crashing shadowbuffers.
2006-02-18 19:35:53 +00:00
Ton Roosendaal
d128c19081 Added mask input for new Hue/Saturation Node. 2006-02-18 17:07:30 +00:00
Ton Roosendaal
7117d7f2c3 The regular warning fix update; includes two variables that were used
without initialization.

For Brecht:

source/blender/blenkernel/intern/subsurf_ccg.c:329: warning: left-hand operand of comma expression has no effect

This line I don't understand...
2006-02-18 16:21:32 +00:00
Ton Roosendaal
f4ddc2fde2 Quick change in Hue/Saturation Node: made the central Hue value 0.5, to
make applying changes easier. Saturation slider goes to 2.0 now.

Fix: rendering compositing nodes without scene crashed in header stats
drawing.
2006-02-18 15:57:46 +00:00
Ton Roosendaal
1ea9099474 - Restored "dither" option for conversion from float -> byte images.
This now is a post-process option only (used to be in render).
  It is only handled within the Imbuf/ module, on conversions from float
  to byte rect, which atm mostly happens on saving images.

- Small fix: when using Scene RenderLayer nodes, the speed vectors for
  these nodes were not created when that scene had "Do Composite" off.
2006-02-18 14:35:43 +00:00
Ton Roosendaal
7425a8fcaa Small tweak to get openexr compiling in scons 2006-02-18 14:26:38 +00:00
Ton Roosendaal
387f9a7c6d Four-in-one commit:
(NOTE: new include dependency in Render module, might need MSVC update!
It has to include the imbuf/intern/openexr/ directory in search path)

-> New Composite node: "Hue Saturation".
Works like the former 'post process' menu. There's no gamma, brightness or
multiply needed in this node, for that the Curves Node functions better.

-> Enabled Toolbox in Node editor
This now also replaces the SHIFT+A for adding nodes. The nodes are
automatically added to the menus, using the 'class' category from the
type definition.

Current classes are (compositor examples):

Inputs: RenderResult, Image
Outputs: Composite, Viewer
Color Ops: RGB Curves, Mix, Hue Saturation, AlphaOver
Vector Ops: Normal, Vector Curves, Map Value
Filters: Filter, Blur, VectorBlur
Convertors: ColorRamp, RGBtoBW, Separate RGBA, Separate HSVA, Set Alpha
Generators: RGB, Value, Time
Groups: the list of custom defined nodes

-> OpenEXR tile saving support
Created an API for for saving tile-based Images with an unlimited amount
of layers/channels. I've tested it for 'render result' now, with the idea
that this can (optionally) replace the current inserting of tiles in the
main result buffers. Especially with a lot of layers, the used memory for
these buffers can easily go into the 100s of megs.
Two other advantages:
- all 'render result' layers can be saved entirely in a single file, for
  later use in compositing, also for animation output.
- on each render, per scene, a unique temp file can be stored, allowing
  to re-use these temp files on starting Blender or loading files, showing
  the last result of a render command.

The option is currently disabled, needs more work... but I had to commit
this because of the rest of the work I did!

-> Bug fix
The Image node didn't call an execute event when browsing another image.
2006-02-18 13:28:44 +00:00
Erwin Coumans
78942aa843 temporarily fix from Johnny Matthews committed, win32 doesn't have munmap. Someone can worry about a future mmap-like implementation. 2006-02-17 20:18:49 +00:00
Ken Hughes
69d00bccaa ===Python API===
Bugfix: make face and edge .extend() methods check that input vertices are
from the same mesh.  Fixes a bug found by Cam.
2006-02-17 17:50:54 +00:00
Ton Roosendaal
6f62023850 - Added option 'convert to premul' to AlphaOver node in Compositor
- Fixed mix mode "Overlay", it was missing a multiplication with 2 :)
- small bugix in Matts nodes commit, wrong pointers transfered to coltobw()
2006-02-17 15:44:46 +00:00
Matt Ebb
90fa460d2a 3 very simple new composite nodes that I wanted for working with here. Hope the code is ok,
they work ok in testing here and get done what I need, any checks or fixes are welcome.

* Separate RGBA: Separates an input RGBA image into its R, G, B and A channels
* Separate HSVA: Separates an input RGBA image into H, S, V and A channels
* Set Alpha: Takes an input RGBA image and an alpha value channel and combines them
into a single RGBA image channel. You can also set the alpha for the entire image
with the number field when there's no input alpha channel. TODO: Allow input alpha
channel with no input image, in order to output a solid colour, with alpha.
2006-02-17 13:51:55 +00:00
Ken Hughes
7592c09c2b ===Python API===
Allow object.setMatrix() to accept 3x3 matrices by extending to a 4x4
internally.  Also check the dimensions of the new matrix and throw an
exception if not a 3x3 or 4x4.
2006-02-16 20:09:32 +00:00
Ton Roosendaal
fe036a0538 Added new malloc type in our MEM module; using the unix feature 'mmap'.
In Orange we've been fighting the past weeks with memory usage a lot...
at the moment incredible huge scenes are being rendered, with multiple
layers and all compositing, stressing limits of memory a lot.
I had hoped that less frequently used blocks would be swapped away
nicely, so fragmented memory could survive. Unfortunately (in OSX) the
malloc range is limited to 2 GB only (upped half of address space).
Other OS's have a limit too, but typically larger afaik.

Now here's mmap to the rescue! It has a very nice feature to map to
a virtual (non existing) file, allowing to allocate disk-mapped memory
on the fly. For as long there's real memory it works nearly as fast as
a regular malloc, and when you go to the swap boundary, it knows nicely
what to swap first.

The upcoming commit will use mmap for all large memory blocks, like
the composit stack, render layers, lamp buffers and images. Tested here
on my 1 GB system, and compositing huge images with a total of 2.5 gig
still works acceptable here. :)

http://www.blender.org/bf/memory.jpg
This is a silly composit test, using 64 MB images with a load of nodes.
Check the header print... the (2323.33M) is the mmap disk-cache in use.

BTW: note that is still limited to the virtual address space of 4 GB.

The new call is:
MEM_mapalloc()

Per definition, mmap() returns zero'ed memory, so a calloc isn't required.

For Windows there's no mmap() available, but I'm pretty sure there's an
equivalent. Windows gurus here are invited to insert that here in code! At
the moment it's nicely ifdeffed, so for Windows the mmap defaults to a
regular alloc.
2006-02-16 17:51:01 +00:00
Ton Roosendaal
7f4b01ccf0 Rendering tricks for improving workflow:
- Button option "Single" in render-layer panel will enable to only render
  the currently indicated render-layer. It will also skip compositing.

- Brought back the 'Local View' render. This will only render the visible
  objects, but with lights from the original view-layers.
  To make the option useful, it also temporal enables 'Single', which has
  the a disadvantage that you need to set the correct render-layer.

  It is a bit a tricky option though... since its quite invisble and
  confusing for people who don't know the feature. This might become either
  a button in 3d header, or use a popup requester to confirm, or... will
  need to think over!

At least; both options display in render window a text to denote the option.
2006-02-16 12:27:46 +00:00
Brecht Van Lommel
32a9c7b493 ==UV Editor==
Small ABF stability improvement, do some angle clamping during iteration,
fixes a particular model that went wrong.
2006-02-15 22:33:55 +00:00
Brecht Van Lommel
9fedbd6c51 ==Python==
Small bug reported on irc, matrix.translationPart didn't check bounds
properly (needed to use || instead of &&). Also fixed similar bugs in
rotationPart and rich compare.
2006-02-15 22:31:43 +00:00
Ton Roosendaal
55610ac7c1 We found out memory got fragmented a lot for creating speed vectors on
large scenes... this because it has to make 3 entire databases to find
the vertex-speed to previous and next frame. Even though most of the
prev/next database was freed, the parts I kept were spread all over
memory.

This commit copies from the prev/next database only the two screen aligned
speed vectors and stores that in temporal per-object structs. Even whilst
it takes more memory, it then can free the entire database, making space
for the next database to be built.
Tests reveiled it saves quite some... well, if you want to believe the
'virtual memory' total unix gives... :)
2006-02-15 19:55:29 +00:00
Ton Roosendaal
8d0a2c4192 Added printing stats back in commandline renders. Prints now a full 'log',
using 1 line per part rendered. Might go back to 1 line again, but at this
moment I need the logs for debugging.
Same prints are active now for UI rendering. Just temporal :)
2006-02-15 15:22:49 +00:00
Ton Roosendaal
9ef9d66a26 - Preview render (buttons) was executing the 'data ipos', causing inserting
keys with IKEY in buttons to not work.

- Crash in opengl while rendering was caused by the fact that scanline
  updates are drawn in the main thread, whilst the actual render thread
  then can already be doing different stuff.
  Especially with many layers & passes it's getting confusing easily :)

  Convention now is that scanline render updates only happen while the
  thread is looping over scanlines. As soon as it reached the last, no
  drawing happens, not even to update the last segment.
  This isnt a problen, since any finished tile is drawn again entirely.
2006-02-15 09:35:01 +00:00
Jean-Luc Peurière
8bc0060835 added proper casts to get things compiling with gcc 4.0 Os X 2006-02-14 23:52:47 +00:00
Alexander Ewering
343dbc5580 Fix for report #3916: The background image size/offset buttons now have
max values multiplied by the view's grid setting, like most other buttons
dealing with sizes and locations.

Sorry, untested, as I can't get it to link (error while loading
shared libraries: libavformat.so)
2006-02-14 22:17:23 +00:00
Ton Roosendaal
11293a6492 Potential fix for crashing ogl in drawing render updates... ATI only?
I don't know why, but at Andrea's system it goes fine.
2006-02-14 22:14:14 +00:00
Ton Roosendaal
c9fa1a23e4 Forgot to commit define.... tsk! 2006-02-14 19:25:33 +00:00
Ton Roosendaal
3eb971abcc Added 'screen' to texture mixing menu as well. 2006-02-14 18:47:21 +00:00
Ton Roosendaal
1c7187f4fc Added blending type "Overlay" to options for Mix node & ramp shaders.
The description is here; it blends nicely bright parts.
http://www.pegtop.net/delphi/articles/blendmodes/overlay.htm
2006-02-14 18:41:34 +00:00
Ton Roosendaal
acb5f6e79f Added callback to compositor, so it can print in RenderWindow header the
current to-be composited node and amount of memory in use.
2006-02-14 18:04:25 +00:00
Johnny Matthews
86e9faad70 A small alteration for C syntax, code and vars mixed up (MSVC complained about this). 2006-02-14 17:55:55 +00:00
Ton Roosendaal
57243ce834 Render Layer button typo... 2006-02-14 17:35:38 +00:00
Ton Roosendaal
3cf0bbfa17 Nasty memory conflict in Compositor... when:
- a Group has Curve node inside
- this Group was re-used more times
- with threaded render activated
- and both groups executed on same time

Then the premultipy optimize table was created twice... causing memory
to confuse.
2006-02-14 17:32:49 +00:00
Ton Roosendaal
b9bd02e590 Uncommitted button "Single" from render-layer panel... this was supposed
to be a new feature, but have not working code for it yet :)
2006-02-14 16:16:23 +00:00
Ton Roosendaal
ec42d60c3d Weekly cleanup in my precious blender tree :)
Unused variables, missing prototypes mostly.
2006-02-14 11:46:45 +00:00