Vertex color node worked only if VCol Paint/Light was enabled. Fixed
that, and removed the vertex color node making it part of the geometry
node instead.
Also, preview.blend had black vertex colors for the sphere, so set them
to white like the other primitives.
* Added patch 5251 X/Y Offset to Split Viewer node, by Juho
(with some modifications from the patch version).
Also various small tweaks to compositor drawing & buttons.
Adding missing define for displace node (Matt can change the number when he gets back, this is just to fix compilation)
Removing "#pragma mark" from node.c. IIRC, that's XCode leaving crap around, so be sure to remove them when you commit (it outputs warnings on other compilers).
Added support for multiple UVs in the render engine. This also involved
changing the way faces are stored, to allow data to be added optionally
per 256 faces, same as the existing system for vertices.
A UV layer can be specified in the Map Input panel and the Geometry node
by name. Leaving this field blank will default to the active UV layer.
Also added sharing of face selection and hiding between UV layers, and at
the same time improved syncing with editmode selection and hiding.
Still to do:
- Multi UV support for fastshade.
- Multires and NMesh preservation of multiple UV sets.
Please read:
http://www.blender3d.org/cms/Imaging.834.0.html
Or in short:
- adding MultiLayer Image support
- recoded entire Image API
- better integration of movie/sequence Images
Was a whole load of work... went down for a week to do this. So, will need
a lot of testing! Will be in irc all evening.
#5417: Only Shadow material gave shadow outside of Spot bundle
#5414: Material Nodes: sockets without input were always treated as single
value inputs, ignoring color or vector. (Caused by commit to do
automatic conversions of socket links).
#5420: When reading with old Blender a new file that has a new window type,
saving it over, and read back in current Blender, the window type
should be reset to EMPTY, because all its data got lost.
- Removed stupid idea to insert convertor nodes in Node Shaders, when a
link is created by non-matching sockets. Now it works like Compositor,
doing a default conversion. Works like this:
1 from 3 or 4 values: take average
3 from 1: copy to all
3 from 4: copy 3
4 from 1: copy to 3, set alpha to 1
4 from 3: copy 3, set alpha to 1
- Added select-linked in Nodes. Lkey or Shift+L. Also in pulldown menus
Random seeding is still not perfect in render, especially lack of good
thread support still.
- VectorBlur node was calling seed for each exec, causing other nodes to
get fixed random too.
- added seed in non-OSA main loop for render
- use BLI_srandom, is better than BLI_srand
- After making a Group, internal socket values are now copied to the
group node, so an execute will give identical results
- After ungrouping, the cyclic dependency tagging didn't work well in
all cases, showing a red noodle line and giving composite errors.
For time being solved by calling the NodeSort twice.
- Viewer nodes now get previews updated always (used to be only the active)
Note: this is not for previews inside of groups!
Loadsa new compo nodes, most added in new menu "Mattes".
- Seperate into YCC
- Combine YCC
- Seperate into YUV
- Combine YUV
- (Chroma) Difference Matte
- Chroma Key
- Luminance Key
- Color Spill correction
Main problem is missing docs still... Bob is working on it, he'll also
make tooltips for all buttons.
Some UI things might change too, like more clear names.
- Image Node: after loading new file it didn't update the header name
- File-out Node: header color suggested there was only 1 'active', which
it isn't.
Apparently being so scroogish for cpu cycles makes crashes in Linux. I'll
add it on todo for later checks, but I need a windows or linux coder for
it!
For users: it might fix crashes when you have NodeTrees in Libraries.
- Icon previews for Images were created always for old files, which made
browsing (menus) incredible slow. Added a minor change in the flow, so
icons only get created when the user invokes loading images.
Andrea; you might check this, probably not al cases are covered yet?
- Compositor: the 'File Output' node now has a min/max frame for which it
writes files
- Compositor: fixed a very bad bug (even in 2.42a release) that made the
depsgraph for nodes not work... while editing, only the nodes that change
should be recalculated, but accidentally all of them were done each time.
Reports came in that Elephants Dream files crash on quit or loading other
files. Was caused by freeing Material Nodes, which was accessing memory
that potentially was just freed before (node->id). Apparently only Windows
really gives issues then, which is actually a good thing :)
- It saves a file with indicated type on each change, with number
appended denoting the current frame (like ANIM saving).
- Output filename button supports relative paths ("//")
- Shows optional preview image too
- For now, added a print on each file save as feedback
To make this option work nicely, changed the BKE_makepicstring() function
to have less globals inside, so it is more generic. Todo: allow amount of
digits in filenames to be set (to support files like tmp_123456.jpg)
* Combine RGBA
Basically the opposite of separate RGBA, brings 4 value channels into a single
RGBA image). Has interesting possibilities for reordering channels, when used
with separate RGBA!
* Dilate/Erode
Originally written by Brecht van Lommel, with some minor modifications and
tweaking by myself. Positive distances dilate, negative distances erode.
* I also added the 'value' field to the hue/saturation node. Minimal extra cost,
and can be handy.
The raytracer wasn't calling node shaders yet, so results showed only
shading for the base material.
This now works, but there's a conflict in the internal Blender shader that
makes recursive raytracing with nodes unpredictable. Basicaly the conflict
is that when a ray wants to shade a point, it should be able to check the
material for mirror properties, but this is undefined for node trees...
Probably we need to separate raytrace entirely from material shading. Is
a good topic for NodeShader 2.0, when we really split up materials in
shading components.
I'll add a note in the release log about this. Best results you get now
when you don't include mirror/ray-transp insde a node tree, in that case
a regular material mirror can render that material perfectly.
- Ztransp looked weird in Node previews, only showing the backfacing pixels
- previous change in preview.blend accidentally set camera clipping too low
for correct display of lamp preview
- refresh issue solved in preview when using Node shaders with ray-mirror
naming convention for Compositing:
- Render Result node -> Render Layers node (name only appears in Add menu)
- Compositor image -> Viewer Node image
I've also added a version patch (2.41 saved files only) to rename existing
"Compositor" Images.
The buttons uiBlock was stored in a Node, for retrieval of node buttons,
however that won't work when multiple windows show same Nodes.
Now implemented more correct unique Block names (as all over in UI), and
use that name to retrieve buttons with API call uiGetBlock().
Compositor:
Viewer Nodes inside of Groups now work too. To not frustrate interactive
speed, the following rules apply:
- Making a Group editable (or closing) doesn't signal recalculation of
composite
- clicking on an Input socket always checks changes and calulcates
- When there are Viewers inside an edited Group, Viewers in the main tree
are not executed.
Also added: a "hide unused sockets" icon in the header of Viewer nodes.
This allows cleanup of Groups, to prevent these sockets get reveiled.
This will free all Node output buffers, while compositing, when not needed
anymore. Saves a whole lotta memory, and will enable to use many many more
nodes (or high resolution images).
When multiple output nodes exist (Material), the active Output flag could
get copied and wasn't reset properly. Now the depenendency sorting code
ensures only 1 output node is the active output for execution.
This prevents eternal loops. It prints error message in console.
Note that the Shader nodes dont need this, since they're just executed in
presorted order. The compositing nodes use threading, with a call asking
for the next job... if this includes cyclic nodes, the 'next job' will
always return NULL.
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.
- 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
- 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
(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.
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 :)
- 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.