From BlenderWiki
[edit] 2.49b Release
[edit] Improvements
- UV Map node now has better handling of edge cases (where UV values meet sky background)
[edit] 2.46 Release
Juho
Curve Selection Tool Refactor: This commit refactors curve selection system to use certain curve selections functions that encapsulate setting of selection flags. New function to select adjacent control points was introduced too. Refactoring made it possible to simplify certain existing selection functions quite a bit. New functionality was delivered as well. Select more/less works now with NURBS as expected. Also two new curve selection functions were added: Select Every Nth and Select Random.
See http://wiki.blender.org/index.php/BlenderDev/Curve_Selection_Tools for further information.
"Render to image editor" to render to Buttons Window as the last alternative: "Render to image editor" renders to Buttons Window only if no other suitable windows are available. Other window types are prioritized before Buttons Window.
"Combine RGB" and "Separate RGB" material nodes: These nodes allow the user to separate and combine RGB color channels as in the composite node editor. However they don't contain Alpha channel as it is treated separately in case of material nodes. "Combine RGB" allows the user to use values beyond standard float range ([0.0, 1.0]) if value input node is used to feed the value to it.
Autocompletion to Geometry input node: This commit adds autocompletion and "red alert" feature to text input fields (UV and VCol) of the Geometry material input node. The functionality is similar to one found in UV part of the "Map Input" panel found in Material buttons context of the Buttons Window.
Hue Saturation Value node - port to material node system
This commit ports Hue Saturation Value node to the material node system.
Unlike in composite version, each value is an input. Composite node version
will be updated later to use the same scheme.
Crop Compositing Node:
This commit adds a new node, crop, to the compositor. This node can be used to crop input image. It has two modes of operation. It can either crop image size (Crop Image Size option) or crop while retaining original size of the image. This latter mode can be used to preview the crop.
Use X1, Y1, X2, Y2 controls to manage the area to be cropped.
Note that I added a check for image preview min and max values to node_update. This is because it could give inappropriate values in certain cases when Crop Image Size option was toggled (values such as x1=0, y1=0, x2=60, y2=0 would result in eternal loop due to bad min and max (min bigger than max!)). The check makes sure that min and max values are always valid.
Toggle links tool for Node Editor
This commit adds a new tool, Toggle Links, to the node editor. This tool
allows the user to toggle the status (linked/not linked) between desired
sockets. The tool can be used either by using the f key or the menus.
This functionality is analogue to one found in object editing modes except for its additional toggle functionality.
To use this tool, the user has to first select an input and an output socket. Selecting is done by clicking with right mouse button on a socket. After the tool has been invoked, the link between those two sockets is toggled. The result may vary based on existing linkage.
There can be only one input and one output selected at maximum in a node tree. This means that if the user selects a socket while one of the same type is already selected, the old one will be deselected.
The tool complements the current way of connecting nodes. One possible use for it is to use it to review output of nodes by using a viewer node. Just select wanted input socket of a viewer node, set it visible and use selection of an output socket in conjuction with f key to show the output in the viewer node. Select another output and hit f to see its output and so on.
Directional Blur Node
Directional Blur node allows the users to do various blur operations on the input
image. It essentially offers three different kind of ways of blurring in one node.
It is possible to blur using a certain direction, spin and zoom. These three ways
can be used in conjunction.
The node contains following controls:
- Iterations, Wrap
- Center: X, Y
- Distance, Angle
- Spin
- Zoom
Iterations is used to determine the smoothness of the result. The more iterations, the smoother result. Low values are good for preview.
Wrap means that the image is wrapped as if it was tiled on both x and y directions. To see better what this means, try it with spin for instance.
Center values (X and Y) determine the location which is used as a pivot point for the operations. It is center (0.5) of the image by default.
Distance and angle are used to adjust directional blur. The result can be described as a sweep that varies based on given distance (bigger distance, longer sweep) and angle. Angle is given in degrees.
Spin produces rotating blur based on given angle. Yet again it is in degrees. Also negative values work.
Zoom causes the image to be zoomed towards set center point (Center values).
Thanks to Alfredo de Greef (eeshlo) for contribution.
Possible development ideas:
- Make an algorithm to extend image in case spin is used. Extend would temporarily
change the size of the canvas of the input image. Canvas would be filled based on colors on the edges of the input image. After the blur operation has been done, the image would be cropped back to normal size. The advantage of this would be nicer result of spin (no problems with image size) on a computational cost.
- Make values animatable. This is something that is better solved on more general
level. ("everything is animatable" paradigm)
- Provide an option to calculate automatic value for iterations. A good value that
produces a smooth result could be calculated based on direction deltas. This would be useful in conjuction of animatable values.
Bilateral Blur Node
Bilateral Blur node allows the user to blur images while retaining their
sharp edges. Blurring can be controlled by following controls:
- Iterations
- Color Sigma
- Space Sigma
Also image input to blur and a determinator image is provided. The node produces a blurred image as its output.
The more iterations are provided, the smoother the result. Use color and space sigmas to control the amount of blur. One way to use the determinator input is to feed a mix (add) of Z and normal passes to it.
Examples of usage: Ambient Occlusion smoothing - http://wiki.blender.org/index.php/Image:Bilateral_blur_example_01.blend Blurry Refraction - http://wiki.blender.org/index.php/Image:Bilateral_blur_example_02.blend Smoothed shadows and smoothed Ambient Occlusion combined - http://wiki.blender.org/index.php/Image:Bilateral_blur_example_03.blend
If you check out the examples, render the image and alter the values to see how they affect.
More information about the algorithm can be found at http://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/MANDUCHI1/Bilateral_Filtering.html .
Thanks to Vilem Novak for contributing the patch.
Conversion of "Toggle Link" tool to "Make Link"
This commit alters the behaviour of "Toggle Link" tool found in the node
editor so that it only makes link between selected sockets. Links cannot
be deleted by using the tool again as before. Instead deleting links can
be done by using the old method (drag with lmb).
The delete functionality may require further investigation to see if it should be improved.
Black and White level inputs to RGB Curves compositing node
This commit adds possibility to define black and white level of the
mapping curve of the RGB Curves node. This functionality is exactly
the same found in the Curves tool of the UV/Image Editor. It can be
used to extract wanted color ranges out of the input easily.
Thanks to Björn C. Schaefer for contribution!
Blur Node to support Relative (percent) values
This commit makes it possible to use relative values when using a Blur node. There
is a new toggle in the node that can be used to enable the feature.
Thanks to David Millan Escriva for contribution!
Custom Names for Nodes
This commit makes it possible to add a custom name to a node. The feature can be
accessed either by using a menu or shortcut ctrl-r. It currently works only when
a single node is selected. Invoking the feature gives a popup menu in which a new
name can be entered. If the given name is not empty, it will be shown like
"(myCustomName) NodeName" in the node header.
This feature is particularly useful when documenting complex node setups.
I also fixed the size of blur node. It was too short before due to my previous commit.
Thanks to David Millan Escriva for contribution!
Minor changes to node rename tool
Rename was changed to work on the last selected node. Also size of a couple of
character arrays was changed to avoid buffer overflows.
Custom name shows up now just fine in group header in case it is being edited as it did not before.
[edit] 2.43 Release
[edit] Documentation
See http://www.blender3d.org/cms/Imaging.834.0.html
[edit] Documentation
See http://mediawiki.blender.org/index.php/Manual/Compositing for overall look at all compositing nodes.
[edit] List of New Nodes
New composite nodes, and two new menus "Mattes" and "Distort".
[edit] Output Menu
- Split Viewer
[edit] Filter Menu
- Dialate/Erode Media:Derotest.blend
- Defocus See http://www.blender3d.org/cms/Composite__Defocus.836.0.html. Media:Doftest.blend
[edit] Convert Menu
- Math
- ID Mask See http://www.blender3d.org/cms/Composite__UV_Map__ID.830.0.html.
- Separate into YCC channels
- Combine YCC
- Separate into YUV channels
- Combine YUV
- Separate HSV channels
- Combine HSV channels
[edit] Matte Menu
tutorials: http://mediawiki.blender.org/index.php/Tutorials/Matte_nodes
- Difference Key
- Chroma Key
- Channel Key
- Luminance Key
- Color Spill correction
[edit] Distort
- Flip
- Rotate
- Map UV See http://www.blender3d.org/cms/Composite__UV_Map__ID.830.0.html.
- Displace
[edit] Node editor
Node editor: when adding a new node, automatic links are created:
- from all selected nodes
- only connections between highest order socket types; so if there's RGBA and Value sockets, only RGBA sockets are connected. This because in these cases the Value sockets usually are for user input. Example: Mix node.
[edit] Documentation
See http://www.blender3d.org/cms/Render_Passes.829.0.html.
[edit] Examples
Media:Passes_idmask_mapuv.blend - This file demonstrates how to use render passes with UV Mask node to alter specific objects of the rendered scene. Also use of Map UV node is covered.
Media:Renderlayer_lightgroup.blend - This file demonstrates the use of render layers and light groups to control the lighting of the scene in post production.
Media:Tidy_cornelius_passes.blend - This is just a tidying up of the nodes in the Cornelius monkey example that is already on the Blender.org page for ease of "reading."
(500px version)
[edit] Further Information
[edit] 2.42 Release
See CMS release notes for 2.42 at blender.org. Information about Vector Blur.
[edit] Compositing render in pipeline
- New Node "Composite" is output node that puts composited result back in render pipeline. - This then also displays in the render window while editing - But, only with Scene buttons option "Do Compositor" set - Then, just press F12 or render anims to see the magic!
For clarity, the former 'Output" node is renamed to "Viewer".
[edit] Curves
- Image curves are only applied now when curves panel is in use. Closing the panel will disable curves, reopen Panel enable curves. You can minimize the Curves panel to keep it active. That latter then works as visualization curves are being applied.
- Compositor output now also uses Image window curves, if active.
[edit] Interface/Nodes
Modification to allow adding a point in a curve button by LMB clicking/dragging directly on the curve, as in GIMP/Photoshop/etc.
- Put the Add->Group menu in the top info header too.
[edit] New Blur options
The existing Blur Node (compositor) now has an optional input image. This has to be a 'value buffer', which can be a Zbuffer, or any mask you can think of. The input values have to be in the 0-1 range, so another new node was added too "Map Value". The value input can also be used to tweak blur size with the (todo) Time Node.
[edit] Vector buffer support & preliminary vector-blur Node
Using the "Render Layer" panel "Vector" pass button, the motion vectors per pixel are calculated and stored. Accessible via the Compositor.
The vector-blur node is horrible btw! It just uses the length of the vector to apply a filter like with current (z)blur.
I'm committing it anyway, I'll experiment with it further, and who knows some surprise code shows up!
[edit] blur filters composite
Redoing the blur filters for composit;
http://www.blender.org/bf/filters/
I found out current blur actually doesn't do gauss, but more did regular quadratic. Now you can choose common filter types, but more specifically;
- set gamma on, to emphasize bright parts in blur more than darker parts - use the bokeh option for (current circlular only) blur based on true area filters (meaning, for each pixel it samples the entire surrounding).This enables more effects, but is also much slower. Have to check on optimization for this still... use with care!
[edit] Nodes
Log: Group Nodes made functional: each group now can be re-used (instanced) with SHIFT+G. This works as well for local groups as library-linked groups.
Also fixed that group nodes were copying internal data to the outside, which made it impossible to use the socket-buttons to set individual values for each group-instance.
Library-linked groups are prevented from editing.
But, try to open a group and it will give a request for 'make local'.
The make local rule is identical to other library data in blender, meaning: - if all users of the library data are local -> the library data is flagged 'local', and if needed a unique name is made - if there's mixed users (local and from other library data) it makes a full copy, and assigns this copy to all local users.
[edit] compositing
Compositing workflow upgrade;
You now can set a Preview panel in the Image window, to define a sub-rect of an image to be processed. Works like the preview in 3D Window. Just press SHIFT+P to get it activated. Very nice speedup!
This is how it works:
- The compositor still uses the scene image size (including % setting) for Viewer or Composite output size - If a preview exists, it calculates the cropped rect from its position in the Image window, and stores that in the Scene render data - On composite execute, it copies only this part from the 'generator nodes',right now Images or Render Results. That makes the entire composite tree only using small rects, so it will execute fast. - Also the render window will only display the cropped rect, and on F12 only the cropped part is being executed - On rendering in background mode, the cropping is ignored though.
Usability notes:
- translating or zooming view will automatically invoke a recalculation - if you zoom in on details, the calculated rect will even become smaller - only one Imagewindow can have this Preview Panel, to prevent conflicts of what the cropped area should be. Compositing is on Scene level, not local per image window. (Note; 3D Previews are local per window!) - Closing the preview panel will invoke a full-size recalculation - All passes/layers from rendering are nicely cropped, including Z and vectors. The work to make the compositor do cropping was simple, but getting the Image window displaying correctly and get all events OK was a lot of work...indeed, we need to refactor Image Window usage once.
Sorry for making the mess even bigger now. :) I've tried not to interfere with UV edit or Paint though... only when you're in compositing mode the panel will work.
[edit] nodes
Upgrade for Node type definitions: the min/max allowed values for input sockets were not used yet... now they're verified on read, and written in socket stack data on adding new nodes. Also the buttons in Nodes use these values now.
Special request from Nathan Vegdahl who seems to be messing around with my precious nodes! :)
[edit] compositor
- Compositor now frees memory of buffers internally used in groups immediately. This wasn't part of the event-based cache anyway
- New option: "Free Texture Images" (in render Output panel). This frees after each render of each scene all images and mipmaps as used by textures. As reference it prints total amount of MB freed.
- Render stage 'creating speed vectors' had no ESC checking yet
- Made drawing scanline updates during render draw 1 scanline less...dunno, still hunting for weird opengl crashes.
- 3D preview render didn't properly skip sequence or composit render.
[edit] blend type overlay
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
Added 'screen' to texture mixing menu as well.
[edit] composite nodes
- Added option 'convert to premul' to AlphaOver node in Compositor - Fixed mix mode "Overlay", it was missing a multiplication with 2 :)
[edit] composite and node stuff
Log: 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.
[edit] dither
Log: - 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.
[edit] 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 restored, 2 x faster
- Fixed some confusing code in Node Group handling... much stabler now
[edit] z combine node
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.
[edit] composite fix
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...
Brought back "mapping to translucency" for materials, was temporal replaced with tests with material layer mapping...
Log: Composite: filter node now includes image edge in calculation, the outer pixels even had alpha zero...
[edit] speed vector
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
[edit] start frame higher
Log: Composite: Image node now supports "start frame" values up to 10k.
[edit] link select
Added CTRL+L link copy and SHIFT+L link select for group-duplicators.
[edit] vectorbuffer
Added security to vectorbuffer code... before it gets used, it checks for leftover initialized max-speed values, and clears it. Also gives a giant print then... I want to know when it happens, and howto redo!
(error print = "tsk tsk! PASS_VECTOR_MAX left in buffer...")
A couple of render improvements;
- Bug fix: the upper tile in a collumn for Panorama render didn't put the mainthread to sleep properly. Now panorama renders 25% faster if you had set Y-Parts to 4.
- Enabling Compositing in Scene for first time now adds a "Composite" node too, so render output gets applied. - An attempt to render with "Do Composite" without "Composite" node will throw an error and stops rendering. In background mode it will just not render at all, and print errors. - Errors that prevent rendering now give a popup menu again. - Having MBlur or Fields option on will now normally render, but with an error print in console (not done yet...)
[edit] compositing
- Added pass rendering, tested now with only regular Materials. For Material nodes this is quite more complex... since they cannot be easily separated in passes (each Material does a full shade). In this commit all pass render is disabled though, will continue work on that later.
Sneak preview: http://www.blender.org/bf/rt.jpg (temporal image)
- What did remain is the 'Normal' pass output. Normal works very nice for relighting effects. Use the "Normal Node" to define where more or less light should be. (Use "Value Map" node to tweak influence of the Normal node 'dot' output.)
[edit] vector blur
Two significant improvements in vectorblur:
1) Accumulation buffer alpha handling Accumulating colors in an accumulation is simple; a weighting factor can make sure colors don't over- or undersaturate. For alpha this is a bit more complex... especially because the masks for vectorblur are anti-aliased themselves with alpha values. Up to now I just premultiplied the mask-alpha with the actual color alpha, which worked OK for solid masks, but not for transparent ones. I thought that would be an acceptable situation, since 'ztra' faces only get blurred with alpha==1.
However, it gives bad results when using 'mist' in Blender, which just gives pixels an alpha value based on camera distance. In these cases the alpha became oversaturated, accumulating into too high values.
The solution is to store the mask-alpha separately, only premultiply this alpha with the weighting factor to define the accumulation amount. This is the math:
blendfactor: the accumulation factor for a vectorblur pass passRGBA: color and alpha value of the current to be accumulated pass accRGBA: color and alpha value of accumulation buffer (initialized with original picture values) maskA: the mask's alpha itself
accRGBA = (1 - maskA*blendfactor)*accRGBA + (maskA*blendfactor)*passRGBA
This formula accumulates alpha values equally to colors, only using the mask-alpha as 'alpha-over' operation. It all sounds very logical, I just write this extensive log because I couldn't find any technical doc about this case. :)
2) Creating efficient masks with camera-shake
Vector blur can only work well when there's a clear distinction between what moves, and what doesn't move. This you can solve for example by rendering complex scenes in multiple layers. This isn't always easy, or just a lot of work. Especially when the camera itself moves, the mask created by the vectorblur code becomes the entire image. A very simple solution is to introduce a small threshold for moving pixels, which can efficiently separate the hardly-moving pixels from the moving ones, and thus create nice looking masks.
You can find this new option in the VectorBlur node, as 'min speed'. This mimimum speed is in pixel units. A value of just 3 will already clearly separate the background from foreground. Note; to make this work OK, all vectors in an image are scaled 3 pixels smaller, to ensure everything keeps looking coherent.
Test renders; 'Elephants Dream' scene with lotsof moving parts; rendered without OSA, image textures, shadow or color correction.
No vectorblur: http://www.blender.org/bf/vblur.jpg
With vectorblur, showing the alpha-saturation for mist: http://www.blender.org/bf/vblur1.jpg
New accumulation formula: http://www.blender.org/bf/vblur2.jpg
Same image, but now with a 3 pixel minimum speed threshold: http://www.blender.org/bf/vblur3.jpg
Next frame, without minimum speed http://www.blender.org/bf/vblur4.jpg
Same frame with speed threshold: http://www.blender.org/bf/vblur5.jpg
(Only 20 steps of vectorblur were applied for clarity).
Log: iImage based Vector Blur
After a couple of experiments with variable blur filters, I tried a more interesting, and who knows... original approach. :)
First watch results here: http://www.blender.org/bf/rt0001_0030.avi http://www.blender.org/bf/hand0001_0060.avi
These are the steps in producing such results:
- In preprocess, the speed vectors to previous and next frame are calculated. Speed vectors are screen-aligned and in pixel size. - while rendering, these vectors get calculated per sample, and accumulated in the vector buffer checking for "minimum speed". (on start the vector buffer is initialized on max speed).
- After render: - The entire image, all pixels, then is converted to quad polygons. - Also the z value of the pixels is assigned to the polygons - The vertices for the quads use averaged speed vectors (of the 4 corner faces), using a 'minimum but non-zero' speed rule. This minimal speed trick works very well to prevent 'tearing' apart when multiple faces move in different directions in a pixel, or to be able to separate moving pixels clearly from non-moving ones
- So, now we have a sort of 'mask' of quad polygons. The previous steps guaranteed that this mask doesn't have antialias color info, and has speed vectors that ensure individual parts to move nicely without tearing effects. The Z allows multiple layers of moving masks.
- Then, in temporal buffer, faces get tagged if they move or not - These tags then go to an anti-alias routine, which assigns alpha values to edge faces, based on the method we used in past to antialias bitmaps (still in our code, check the antialias.c in imbuf!)
- finally, the tag buffer is used to tag which z values of the original image have to be included (to allow blur go behind stuff).
- OK, now we're ready for accumulating! In a loop, all faces then get drawn (with zbuffer) with increasing influence of their speed vectors. The resulting image then is accumulated on top of the original with a decreasing weighting value. It sounds all quite complex... but the speed is still encouraging. Above images have 64 mblur steps, which takes about 1-3 seconds per frame.
Usage notes:
- Make sure the render-layer has passes 'Vector' and 'Z' on. - add in Compositor the VectorBlur node, and connect the image, Z and speed to the inputs. - The node allows to set amount of steps (10 steps = 10 forward, 10 back). and to set a maximum speed in pixels... to prevent extreme moving things to blur too wide.
Further tweak of Vector Blur and alpha;
- it now correctly pre-multiplies with alpha the RGB values for the antialised mask (alpha artefacts were visible) - The transparent layer will add speed vectors on top of the solid layer,cancelling out cases where the solid layer was not moving (like in its own antialising. This works fine, for as long you don't render in a single pass transparent faces that move on top of not-moving solid faces.







![[]](/skins/blender/open.png)
