Ton Roosendaal [Sat, 25 Feb 2006 11:56:08 +0000 (11:56 +0000)]
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.
Nathan Letwory [Sat, 25 Feb 2006 10:40:31 +0000 (10:40 +0000)]
==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!
Nathan Letwory [Sat, 25 Feb 2006 01:06:02 +0000 (01:06 +0000)]
==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!)
Nathan Letwory [Fri, 24 Feb 2006 18:55:44 +0000 (18:55 +0000)]
==SCons==
* compile game-engine libs only when actually enabled
Chris Want [Fri, 24 Feb 2006 14:37:24 +0000 (14:37 +0000)]
I had to disable mmap altogether for Irix.
Ton Roosendaal [Fri, 24 Feb 2006 10:21:40 +0000 (10:21 +0000)]
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.
Ton Roosendaal [Fri, 24 Feb 2006 10:20:31 +0000 (10:20 +0000)]
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)
Ton Roosendaal [Fri, 24 Feb 2006 10:18:48 +0000 (10:18 +0000)]
Paranoia "volatile" assignment to globals in MEM module. Was suggested to
do this for globals that can be changed within threads.
Campbell Barton [Fri, 24 Feb 2006 04:03:15 +0000 (04:03 +0000)]
Should now work with python 2.3, also optimized dictionary's a bit. keys -> iterkeys and has_key -> try/except
Ton Roosendaal [Thu, 23 Feb 2006 23:12:33 +0000 (23:12 +0000)]
restored SDL_WaitThread() again, SDL_KillThread() is not OK.
Ton Roosendaal [Thu, 23 Feb 2006 21:38:48 +0000 (21:38 +0000)]
Buttons could crash on wrong scene layer index... not sure how that index
can get wrong, but secure code is always OK. :)
Nathan Letwory [Thu, 23 Feb 2006 21:37:29 +0000 (21:37 +0000)]
==SCons==
* Add check for WITH_BF_OPENEXR to ensure WITH_OPENEXR is specified when
needed. Now workyworky again
Nathan Letwory [Thu, 23 Feb 2006 21:08:40 +0000 (21:08 +0000)]
==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
Ton Roosendaal [Thu, 23 Feb 2006 20:57:31 +0000 (20:57 +0000)]
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!
Ton Roosendaal [Thu, 23 Feb 2006 20:18:29 +0000 (20:18 +0000)]
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.
Stephen Swaney [Thu, 23 Feb 2006 16:27:41 +0000 (16:27 +0000)]
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).
Ton Roosendaal [Thu, 23 Feb 2006 15:39:01 +0000 (15:39 +0000)]
Composite: Image node now supports "start frame" values up to 10k.
Campbell Barton [Thu, 23 Feb 2006 14:45:59 +0000 (14:45 +0000)]
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.
Ton Roosendaal [Thu, 23 Feb 2006 11:16:16 +0000 (11:16 +0000)]
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
Campbell Barton [Thu, 23 Feb 2006 04:38:33 +0000 (04:38 +0000)]
Moved to brush cursors hotspot to be at the tip of the brush.
Chris Want [Wed, 22 Feb 2006 23:34:12 +0000 (23:34 +0000)]
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
Chris Want [Wed, 22 Feb 2006 23:26:26 +0000 (23:26 +0000)]
In some directories (e.g. source/blender/src) there are so many files
now that the command to put the object files into an archive is
exceeding 20k characters, which is a problem for some operating systems.
To avoid this, this modification causes make to change directories before
archiving, to avoid having to specify full file paths to the files
being archived.
If this causes problems on some systems, let me know and I'll find an
alternative.
Ton Roosendaal [Wed, 22 Feb 2006 22:23:30 +0000 (22:23 +0000)]
Composite: filter node now includes image edge in calculation, the outer
pixels even had alpha zero...
Chris Want [Wed, 22 Feb 2006 22:05:13 +0000 (22:05 +0000)]
'inline' in C isn't very portable (probably should be made a macro).
Ton Roosendaal [Wed, 22 Feb 2006 20:57:21 +0000 (20:57 +0000)]
Brought back "mapping to translucency" for materials, was temporal replaced
with tests with material layer mapping...
Ton Roosendaal [Wed, 22 Feb 2006 20:13:52 +0000 (20:13 +0000)]
Composite fix: Blur node with option "Bokeh" didn't survive on very small
filtersizes (below 2 pixels). This because Bokeh actually does 2 peaks...
/\ /\
/ \/ \
I've added some fixes in the filter calculus though, and made sure that
on size 1 at least the image gets copied straight away.
Also fixed error, Bokeh shifted image 1 pixel up.
Todo; make filters become real floats in size...
Geoffrey Bantle [Wed, 22 Feb 2006 18:35:12 +0000 (18:35 +0000)]
"Select Random" in editmode for meshes did not do an undo_push... This was
pretty annoying so I fixed it.
Geoffrey Bantle [Wed, 22 Feb 2006 14:14:43 +0000 (14:14 +0000)]
Fixes small problem with my last commit and MSVC compilers, originally pointed
out on commiters ML here:
http://projects.blender.org/pipermail/bf-committers/2006-February/013677.html
Campbell Barton [Wed, 22 Feb 2006 13:18:30 +0000 (13:18 +0000)]
Added lighten/darken paint modes, works in vertex paint mode and weight paint mode.
Usefull for painting in areas with ~0.5 values without overwriting existing 1.0 weights.
Erwin Coumans [Wed, 22 Feb 2006 06:58:05 +0000 (06:58 +0000)]
added 'disable sleeping' option for rigidbodies. + bugfix of out of sync wheels for vehicle
Geoffrey Bantle [Wed, 22 Feb 2006 02:17:56 +0000 (02:17 +0000)]
[Two Sections here; First is the log that *should* have been included
to my previous commit (whoops). The second part covers the changes I
have made to the code since then (all related to merge tools code).]
# Part One: Complete Log for Commit from 2/13/06
-> Upgraded merge tools.
The new merge tools add several options to blenders Merge submenu,
accessed via the WKEY whilst in Editmode for meshes. The new options
depend on current mode:
- Vertex mode: "At First" and "At Last"
When choosing "At First" or "At last" it will merge all selected
vertices at the first or last selected vertex.
(Note: Blender now keeps track of the last and first verts selected in
editMode (G.editMesh->lastvert and G.editMesh->firstvert
pointers. This meant additions were made to the undomesh code in
editmesh.c as well).
- Edge mode: "Collapse Edges"
When choosing this option, Blender examines the current set of
selected edges and groups them according whether or not they are
topologically connected. It then goes through each group and merges
them one by one to a single point.
- Face Mode: "Collapse Faces"
Works the same as "Collapse Edges", only works on groups of
topologically connected faces.
-> Inclusive selection mode conversion.
This feature extends the ability of blenders selection mode
conversions. Currently when you change selection modes from a "lower
order" mode to a "higher order" one (vertex->edge, vertex->face or
edge->face) blender only selects elements in the new mode whose
elements were completely selected in the previous mode.
This patch does not change blenders default behavior but offers
implicit selection mode conversion as an alternative. To access it,
hold either the left or right CTRL keys and click on a selection mode
in the view 3d selection mode header buttons. This can be accessed via
the CTRL-TAB selection mode switching as well, simply hold CTRL while
clicking the mode you want or entering its number on the keypad.
In some programs, such as Wings and Mirai, it has been demonstrated
that it can also be very useful to exploit selection mode switching to
implicitly select previously unselected elements as well. For instance
switching selection mode from vertex to edges will select all edges
currently associated with the currently selected vertices. The same
behavior is applied to switching between vertex->face and
edge->face. By exploiting this sort of selection conversion complex
selection sets can be built quicker.
Furthermore I modified blenders UndoMesh code to make selection mode
switching "undo coherent". Aside from its relevance to inclusive
selection mode conversion, this really counts as a "bug" in my
mind. Previously selection mode switch could cause the selection state
of the mesh to be invalid when certain modeling operations were
undone. An example of this would be "edge subdivide-> switch to face
mode-> undo"; you end up with edges selected while still in face mode!
# Part Two: Log for this Commit
-> Code Cleanup
As per Ton's request I reformatted all my code, changed variable names
and eliminated my use of "LinkNode" structs and replaced them with
"ListBase" instead. There should be no warnings while compiling now
either.
-> Remove doubles bug
Fixed small problem in removedoublesflag() in editmesh_tools.c that
caused editface structs to get their UV's scrambled. Vertex colors
might not be safe though? Need to investigate later.
-> Small bug in in the the code for merge last/first
It could cause a crash when exiting editmode, switching meshes, then
entering editmode again. "lastvert" and "firstvert" pointers are now
set to NULL whenever exiting editmode now (see load_editmesh() in
editmesh.c). I will find a better solution to this *soon*...
-> All merge tools now UV aware (optional)
The default behavior is to leave UVs alone, but if you hold CTRL while
clicking on the menu entry, UV's are merged. This works fine in most
situations, although some investigation into how to best handle
merging of UVs at the border of UV islands needs to be done.
This last item brings up a point about the current state of the
interface: several functions accessed through the WKEY menu now use
the CTRL modifier to change how they behave (This convention has been
in place for a while, see subdivide for example). Unfortunately there
is no way to communicate the way modifier keys change the behavior of
certain functions to the user. This makes such options invisible for
all intents and purposes...
Ton Roosendaal [Tue, 21 Feb 2006 22:42:33 +0000 (22:42 +0000)]
Fix for very old annoyance; when an object is deformed far away from its
object center, it doesn't generate displaylist (or derivedmesh). This
error showed especially on loading files, and you had to advance frame,
zoom out or press Numpad-9 to see stuff.
Ton Roosendaal [Tue, 21 Feb 2006 22:11:46 +0000 (22:11 +0000)]
Fix for crashing border select in FaceSelect mode. This was part of the
exr & floatbuffer merge of january 9... faulty code I didn't check.
Chris Want [Tue, 21 Feb 2006 21:24:06 +0000 (21:24 +0000)]
Making blender compile with Makefiles if WITH_OPENEXR is false.
Chris Want [Tue, 21 Feb 2006 20:45:20 +0000 (20:45 +0000)]
Trying to get the bullet re-org to work with Makefiles.
Campbell Barton [Tue, 21 Feb 2006 15:49:45 +0000 (15:49 +0000)]
Tracked a redrawing crash down to drawtext.c - was doing ... % 0 causeing a devide by zero, just check for a zero value.
Nathan Letwory [Tue, 21 Feb 2006 14:24:08 +0000 (14:24 +0000)]
==SCons==
* accidently left WITH_BF_STATICOPENGL enabled for non-linux. tsktsk.
Ton Roosendaal [Tue, 21 Feb 2006 12:41:48 +0000 (12:41 +0000)]
Bug in Composite AddAlpha node. The option premul added alpha wrong.
Nathan Letwory [Tue, 21 Feb 2006 12:36:50 +0000 (12:36 +0000)]
==SCons==
* when WITH_BF_STATICOPENGL=1 on Linux Blender will be statically linked
against GL libraries. NOTE: I used values that worked on my machine -
platform managers and people who have better knowledge about this, please
modify config/linux2-config.py accordingly.
Ton Roosendaal [Tue, 21 Feb 2006 10:47:08 +0000 (10:47 +0000)]
Carefully went over all scanline updating while rendering, to ensure only
updates are allowed to draw when a part is within a scanline rendering
loop. Might solve threads issues with opengl...
Erwin Coumans [Tue, 21 Feb 2006 07:33:19 +0000 (07:33 +0000)]
included WheelInfo headerfile rather then forward declare (gcc stl container needs actual class information)
Erwin Coumans [Tue, 21 Feb 2006 07:08:23 +0000 (07:08 +0000)]
exposed a few more tuning paramters
Erwin Coumans [Tue, 21 Feb 2006 06:08:58 +0000 (06:08 +0000)]
added vehicle specific files + updated scons file (Makefile/projectfiles need updating)
Erwin Coumans [Tue, 21 Feb 2006 06:08:18 +0000 (06:08 +0000)]
enabled vehicle/updated scons file (Makefile/projectfiles needs updating)
Erwin Coumans [Tue, 21 Feb 2006 05:57:46 +0000 (05:57 +0000)]
updated scons file, case-sensititivy problem fixed
Erwin Coumans [Tue, 21 Feb 2006 05:36:56 +0000 (05:36 +0000)]
Reorganized Bullet physics files, added preliminary vehicle simulation files (disabled).
Requires some changes to projectfiles/makefiles/scons, for the added and removed files!
Ton Roosendaal [Mon, 20 Feb 2006 21:11:02 +0000 (21:11 +0000)]
Very silly typo in code caused Preview Window for Compositor to copy
Z values wrong... :)
Ton Roosendaal [Mon, 20 Feb 2006 18:33:55 +0000 (18:33 +0000)]
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.
Ton Roosendaal [Mon, 20 Feb 2006 17:44:21 +0000 (17:44 +0000)]
Group duplicators, using linked groups, and which itself again were
linked, did not expand group.
Ton Roosendaal [Mon, 20 Feb 2006 13:43:40 +0000 (13:43 +0000)]
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
Campbell Barton [Mon, 20 Feb 2006 10:31:24 +0000 (10:31 +0000)]
Another fix for a silly bug
Ton Roosendaal [Mon, 20 Feb 2006 10:06:50 +0000 (10:06 +0000)]
Hrms... theeth indeed cleaned up code, but it should also work! Didn't
compiling show the warnings?
Campbell Barton [Mon, 20 Feb 2006 05:30:15 +0000 (05:30 +0000)]
tweak colin weighting again.
Campbell Barton [Mon, 20 Feb 2006 05:11:04 +0000 (05:11 +0000)]
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.
Nathan Letwory [Sun, 19 Feb 2006 22:21:45 +0000 (22:21 +0000)]
==SCons==
* add -pthread compile switch for linux2 platforms to be on the safe side.
Ton Roosendaal [Sun, 19 Feb 2006 21:34:23 +0000 (21:34 +0000)]
Another attempt to solve linux issues.... now threads get killed in
end instead of using SDL_WaitThread from example code...
Ton Roosendaal [Sun, 19 Feb 2006 20:53:07 +0000 (20:53 +0000)]
Changing a glFLush() in glFinish() for drawing info text in renderwindow...
seems to be a reason for opengl crashes with thread render?
Nathan Letwory [Sun, 19 Feb 2006 19:33:36 +0000 (19:33 +0000)]
==SCons==
A working configuration file for win32/mingw, provided by Rehno Lindeque.
Thanks!
Martin Poirier [Sun, 19 Feb 2006 18:41:33 +0000 (18:41 +0000)]
Patch: [ #3283 ] strcat --> sprintf
Less yuckiness!
Martin Poirier [Sun, 19 Feb 2006 17:42:20 +0000 (17:42 +0000)]
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.
Ton Roosendaal [Sun, 19 Feb 2006 17:25:51 +0000 (17:25 +0000)]
Composite: Added "Fac" input for AlphaOver, so you can control amount.
Ton Roosendaal [Sun, 19 Feb 2006 16:33:19 +0000 (16:33 +0000)]
Fix for Colorband node, it skipped calculus when 1 output was unused :)
Ton Roosendaal [Sun, 19 Feb 2006 14:55:16 +0000 (14:55 +0000)]
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
Brecht Van Lommel [Sun, 19 Feb 2006 11:37:50 +0000 (11:37 +0000)]
Warning fix in subsurf_ccg.c. Also changed subsurf UV vertex and edge
handles to be more consistent.
Ton Roosendaal [Sat, 18 Feb 2006 19:35:53 +0000 (19:35 +0000)]
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.
Ton Roosendaal [Sat, 18 Feb 2006 17:07:30 +0000 (17:07 +0000)]
Added mask input for new Hue/Saturation Node.
Ton Roosendaal [Sat, 18 Feb 2006 16:21:32 +0000 (16:21 +0000)]
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...
Ton Roosendaal [Sat, 18 Feb 2006 15:57:46 +0000 (15:57 +0000)]
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.
Ton Roosendaal [Sat, 18 Feb 2006 14:35:43 +0000 (14:35 +0000)]
- 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.
Ton Roosendaal [Sat, 18 Feb 2006 14:26:38 +0000 (14:26 +0000)]
Small tweak to get openexr compiling in scons
Ton Roosendaal [Sat, 18 Feb 2006 13:28:44 +0000 (13:28 +0000)]
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.
Erwin Coumans [Fri, 17 Feb 2006 20:18:49 +0000 (20:18 +0000)]
temporarily fix from Johnny Matthews committed, win32 doesn't have munmap. Someone can worry about a future mmap-like implementation.
Ken Hughes [Fri, 17 Feb 2006 17:50:54 +0000 (17:50 +0000)]
===Python API===
Bugfix: make face and edge .extend() methods check that input vertices are
from the same mesh. Fixes a bug found by Cam.
Ton Roosendaal [Fri, 17 Feb 2006 15:44:46 +0000 (15:44 +0000)]
- 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()
Matt Ebb [Fri, 17 Feb 2006 13:51:55 +0000 (13:51 +0000)]
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.
Ken Hughes [Thu, 16 Feb 2006 20:09:32 +0000 (20:09 +0000)]
===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.
Ton Roosendaal [Thu, 16 Feb 2006 17:51:01 +0000 (17:51 +0000)]
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.
Ton Roosendaal [Thu, 16 Feb 2006 12:27:46 +0000 (12:27 +0000)]
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.
Brecht Van Lommel [Wed, 15 Feb 2006 22:33:55 +0000 (22:33 +0000)]
==UV Editor==
Small ABF stability improvement, do some angle clamping during iteration,
fixes a particular model that went wrong.
Brecht Van Lommel [Wed, 15 Feb 2006 22:31:43 +0000 (22:31 +0000)]
==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.
Ton Roosendaal [Wed, 15 Feb 2006 19:55:29 +0000 (19:55 +0000)]
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... :)
Ton Roosendaal [Wed, 15 Feb 2006 15:22:49 +0000 (15:22 +0000)]
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 :)
Ton Roosendaal [Wed, 15 Feb 2006 09:35:01 +0000 (09:35 +0000)]
- 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.
Jean-Luc Peurière [Tue, 14 Feb 2006 23:52:47 +0000 (23:52 +0000)]
added proper casts to get things compiling with gcc 4.0 Os X
Alexander Ewering [Tue, 14 Feb 2006 22:17:23 +0000 (22:17 +0000)]
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)
Ton Roosendaal [Tue, 14 Feb 2006 22:14:14 +0000 (22:14 +0000)]
Potential fix for crashing ogl in drawing render updates... ATI only?
I don't know why, but at Andrea's system it goes fine.
Ton Roosendaal [Tue, 14 Feb 2006 19:25:33 +0000 (19:25 +0000)]
Forgot to commit define.... tsk!
Ton Roosendaal [Tue, 14 Feb 2006 18:47:21 +0000 (18:47 +0000)]
Added 'screen' to texture mixing menu as well.
Ton Roosendaal [Tue, 14 Feb 2006 18:41:34 +0000 (18:41 +0000)]
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
Ton Roosendaal [Tue, 14 Feb 2006 18:04:25 +0000 (18:04 +0000)]
Added callback to compositor, so it can print in RenderWindow header the
current to-be composited node and amount of memory in use.
Johnny Matthews [Tue, 14 Feb 2006 17:55:55 +0000 (17:55 +0000)]
A small alteration for C syntax, code and vars mixed up (MSVC complained about this).
Ton Roosendaal [Tue, 14 Feb 2006 17:35:38 +0000 (17:35 +0000)]
Render Layer button typo...
Ton Roosendaal [Tue, 14 Feb 2006 17:32:49 +0000 (17:32 +0000)]
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.
Ton Roosendaal [Tue, 14 Feb 2006 16:16:23 +0000 (16:16 +0000)]
Uncommitted button "Single" from render-layer panel... this was supposed
to be a new feature, but have not working code for it yet :)
Ton Roosendaal [Tue, 14 Feb 2006 11:46:45 +0000 (11:46 +0000)]
Weekly cleanup in my precious blender tree :)
Unused variables, missing prototypes mostly.
Ton Roosendaal [Tue, 14 Feb 2006 11:30:43 +0000 (11:30 +0000)]
Dangerous typo in softbody.c... a missing '/' made a /* */ comment to
disable the entire next line of code too.
Ton Roosendaal [Tue, 14 Feb 2006 11:28:13 +0000 (11:28 +0000)]
Bug fix: copying a scene, choosing 'empty scene' did a corrupt copy of the
scene render layers
Little feat: Render Result Nodes that use other scene, have icon in button
to indicate this.
Ton Roosendaal [Tue, 14 Feb 2006 10:02:25 +0000 (10:02 +0000)]
Reviewed octree filling times... found a way to optimize some 10% of time,
nothing radical. :)
Just remember to always try higher octree resolutions (256 or 512) or more
complex scenes. Can be 5-10 times faster.
For waiting pleasure; added a per-second header print update to tell where
octree is. Also added an ESC test in octree making.
(Commit in image.c is a faulty print for 'Not an anim').
Ton Roosendaal [Tue, 14 Feb 2006 00:05:09 +0000 (00:05 +0000)]
Made threaded Compositing more friendly for last node in list... the main
thread entered a loop without sleep() then.
Ton Roosendaal [Tue, 14 Feb 2006 00:04:07 +0000 (00:04 +0000)]
Bug in vector blur; the mask anti-alias code was accidentally using a char
for counting the size of a 'jaggie' to be antialiased, which can of course
be more than 255 pixels in size... causing eternal loop.