Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-06-23T39690: Modifications to Blender's 'temp dir' system.Bastien Montagne
Current temporary data of Blender suffers one major issue - default 'temp' dir on Windows is never automatically cleaned up, and can end being quite big when used by Blender, especially when we have to store per-process data (using getpid() in file names). To address this, this patch: * Divides tempdir paths in two, one for 'base' temp dir (the same as previous unique tempdir path), the other is a mkdtemp-generated sub-dir, specific to each Blender instance. * Only uses base tempdir when we need some shallow persistance accross Blender sessions - and we always reuse the same filename (quit.blend...) or generate small file (crash reports...). * Uses temp sub-dir for heavy files like pointcache or renderEXRs (Save Buffer option). * Erases temp sub-dir on quit or crash. To get this working it also adds a working 'recursive delete' to BLI_delete() under Windows. Note that, as in current code, the 'recover render result' hack-feature that was possible with SaveBuffer option is still removed. A real renderresult cache feature will be added soon, though. Reviewers: campbellbarton, brecht, sergey Reviewed By: campbellbarton, sergey CC: sergey Differential Revision: https://developer.blender.org/D531
2014-06-13Use advantage of SSE2 instructions in gaussian blur nodeSergey Sharybin
This gives around 30% of speedup for gaussian blur node. Pretty much straightforward implementation inside the node itself, but needed to implement some additional things: - Aligned malloc. It's needed to load data onto SSE registers faster. based on the aligned_malloc() from Libmv with some additional trickery going on to support arbitrary alignment (this magic is needed because of MemHead). In the practice only 16bit alignment is supported because of the lack of aligned malloc with arbitrary alignment for OSX. Not a bit deal for now because we need 16 bytes alignment at this moment only. Could be tweaked further later. - Memory buffers in compositor are now aligned to 16 bytes. Should be harmless for non-SSE cases too. just mentioning. Reviewers: campbellbarton, lukastoenne, jbakker Reviewed By: campbellbarton CC: lockal Differential Revision: https://developer.blender.org/D564
2014-06-05Fix subpixel precision in transform nodeSergey Sharybin
The node was using sampler from the callee node and passed it to the input nodes. Since the fact that compositor output node uses NEAREST interpolation (why it uses nearest is the whole separate story) it's not possible to have subpixel precision in such cases: <image> -> <translate> -> <output> For now solving by hard-coding translate node to use BILINEAR interpolation. It can't become worse in this node anyway and the sampling pipeline is to be re-visited from scratch.
2014-06-02Fix T40448: Blurring bug in the compositorSergey Sharybin
This commit pretty much reverts all the changes related on tile-ability of the fast gaussian blur. It's not tilable by definition and would almost always give you seams on the tile boundaries. Atmind already met the issue and tried to solve it by increasing some magic constant, which is pretty much likely simply made it so compositor switched to full-frame calculation in that particular .blend file. Fast gaussian is really not a production thing and need to be avoided. We're to improve speed of normal gaussian blur instead.
2014-06-01Fix T40459: Gauss table can be NULL when ending the blur node operation,Lukas Tönne
which must not be passed to MEM_freeN.
2014-05-29Fix T40414: Multiple input nodes in a group not working.Lukas Tönne
A node group can have multiple input nodes. In the compositor that means each of the input sockets has to be connected to the linked outputs, which is represented by a single link on the outside of the group.
2014-05-28Fix T40383: Keying node doesn't workSergey Sharybin
We should actually re-consider whether zero-sized kernels are allowed for edge detection.
2014-05-23Optimization of keying clip operationsSergey Sharybin
Gives around 20%-30% speedup by doing early exit from kernel traversal cycle.
2014-05-09Code cleanup: styleCampbell Barton
2014-05-07Nodes: add absolute value operation to all math nodesMatt Heimlich
Reviewed By: dingto, brecht Differential Revision: https://developer.blender.org/D507
2014-04-29Fix for wrong behavior of 'darken' blend mode with factor.Kevin Dietrich
The formula was not consistent across Blender and behaved strangely, now it is a simple linear blend between color1 and min(color1, color2). Reviewed By: brecht Differential Revision: https://developer.blender.org/D489
2014-04-29Accidentally left compositor debug option enabled, sorry.Lukas Tönne
(We should replace that with a proper build option really)
2014-04-29Fix T39936: Plane Track operation would not initialize resolutions forLukas Tönne
upstream nodes.
2014-04-29Fix T39539Jeroen Bakker
Initialization of not initialized memory when accessing the renderlayer directly
2014-04-25Fix T39799: Backdrop (compositor) ignores alpha.Lukas Tönne
This issue is because of a somewhat "special" behavior in old code, which got lost during rB09874df: There was a variant of the `relinkConnections` function which would leave the socket completely unconnected. This is not a valid state really (given that each unconnected input must otherwise connected to a constant `Set` type node), but was used as a way to distinguish connected alpha/depth sockets in composite and viewer output nodes. https://developer.blender.org/diffusion/B/browse/master/source/blender/compositor/intern/COM_InputSocket.cpp;28a829893c702918afc5ac1945a06eaefa611594$69 After the large cleanup patch ({D309}) every socket is now automatically connected to a constant, such that `getInputSocketReader` will never return a NULL pointer. This breaks the previous test method, which needs to be replaced by more explicit flags. Luckily this was done only for very few output nodes (Composite, Viewer, Output-File). These now use the regular SetValueOperation default in case "use alpha" is disabled, but set this to an explicit 1.0 value instead of mapping to the node socket.
2014-04-24Fix T39830: Viewer node update error in the compositor when using the ↵Sergey Sharybin
seperate/combine YCbCr nodes Mode of the YCC<->RGB was never set..
2014-04-24Fix T39786: Transform node gives bad result.Kevin Dietrich
Error caused by rB09874df1.
2014-04-23Fix T39848: Reroute nodes were not handled properly after compositorLukas Tönne
cleanup patch. These simply need a proxy node, which will be replaced by direct operation links afterward.
2014-04-17Style cleanupCampbell Barton
2014-04-16Fix for half pixel offset rasterizing masksCampbell Barton
2014-04-15Building with C++ guarded alloc works againCampbell Barton
2014-04-15Structural cleanup and improvements for the compositor.Lukas Tönne
Many parts of the compositor are unnecessarily complicated. This patch aims at reducing the complexity of writing nodes and making the code more transparent. == Separating Nodes and Operations == Currently these are both mixed in the same graph, even though they have very different purposes and are used at distinct stages in the compositing process. The patch introduces dedicated graph classes for nodes and for operations. This removes the need for a lot of special case checks (isOperation etc.) and explicit type casts. It simplifies the code since it becomes clear at every stage what type of node we are dealing with. The compiler can use static typing to avoid common bugs from mixing up these types and fewer runtime sanity checks are needed. == Simplified Node Conversion == Converting nodes to operations was previously based on "relinking", i.e. nodes would start with by mirroring links in the Blender DNA node trees, then add operations and redirect these links to them. This was very hard to follow in many cases and required a lot of attention to avoid invalid states. Now there is a helper class called the NodeConverter, which is passed to nodes and implements a much simpler API for this process. Nodes can add operations and explicit connections as before, but defining "external" links to the inputs/outputs of the original node now uses mapping instead of directly modifying link data. Input data (node graph) and result (operations graph) are cleanly separated. == Removed Redundant Data Structures == A few redundant data structures have been removed, notably the SocketConnection. These are only needed temporarily during graph construction. For executing the compositor operations it is perfectly sufficient to store only the direct input link pointers. A common pointer indirection is avoided this way (which might also give a little performance improvement). == Avoid virtual recursive functions == Recursive virtual functions are evil. They are very hard to follow during debugging. At least in the parts this patch is concerned with these functions have been replaced by a non-virtual recursive core function (which might then call virtual non-recursive functions if needed). See for example NodeOperationBuilder::group_operations.
2014-04-14Fix T39700: Plane deform still works foreverSergey Sharybin
Clamped the EWA sampling region to buffer size now. Solves the issue, but needs more tests to be sure weights are correct.
2014-04-11Fix T39206: Plane deform works incredibly slowSergey Sharybin
The issue was caused by the readEWA spending loads of time trying to sample regions outside of the buffer.Solved by adding an early exit check. We could also clamp the sampling region to the rect, but it's not so much clear whether weight will be correct in such case so left it for the future.
2014-04-05Fix issue for OPENCL problem on Macosx 10.9.2Monique Dewanchand
2014-04-01Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT defineCampbell Barton
2014-03-27T39307: The fast gaussian blur is not an accurate formula. When decidingJeroen Bakker
which tiles are selected for input there was always a constant for correcting the accuracy. It seems that the constant was not enough and has been adjusted. (2 => 3).
2014-03-19Code cleanup: double/floatCampbell Barton
2014-03-18Code cleanup: jitter, use 2d float arrayCampbell Barton
2014-03-15Fix T39189: Node editor Map Uv requires an scale node to work.Lukas Tönne
This is a regression caused by rB67134a7bf689279785e2e40b29cd24243813998b The UV coordinates read from the UV input must be scaled by the Image input size instead of the UV input size. Also now this node uses the UV input resolution instead of the Image resolution, since this is what determines the available resolution. The image is EWA-sampled anyway, it's resolution does not have a direct impact.
2014-03-12Code cleanup: de-duplicate switch statement, style editsCampbell Barton
2014-03-11New Corner Pin node: uses explicit corner values for a plane warp ↵Lukas Tönne
transformation. This was suggested by Christopher Barrett (terrachild). Corner pin is a common feature in compositing. The corners for the plane warping can be defined by using vector node inputs to allow using perspective plane transformations without having to go via the MovieClip editor tracking data. Uses the same math as the PlaneTrack node, but without the link to MovieClip and Object. {F78199} The code for PlaneTrack operations has been restructured a bit to share it with the CornerPin node. * PlaneDistortCommonOperation.h/.cpp: Shared generic code for warping images based on 4 plane corners and a perspective matrix generated from these. Contains operation base classes for both the WarpImage and Mask operations. * PlaneTrackOperation.h/.cpp: Current plane track node operations, based on the common code above. These add pointers to MovieClip and Object which define the track data from wich to read the corners. * PlaneCornerPinOperation.h/.cpp: New corner pin variant, using explicit input sockets for the plane corners. One downside of the current compositor design is that there is no concept of invariables (constants) that don't vary over the image space. This has already been an issue for Blur nodes (size input is usually constant except when "variable size" is enabled) and a few others. For the corner pin node it is necessary that the corner input sockets are also invariant. They have to be evaluated for each tile now, otherwise the data is not available. This in turn makes it necessary to make the operation "complex" and request full input buffers, which adds unnecessary overhead.
2014-03-07Fix for displace node regression (reported on IRC by Sebastian Koenig):Lukas Tönne
Was adding a (0.5, 0.5) offset, even for zero displacement.
2014-02-24Fix T38794: ScaleFixedSizeOperation was not taking offset into accountLukas Tönne
when calculating depending-area-of-interest.
2014-02-20Fix for bad imbuf creation by compositor viewers if resolution is (0,0).Lukas Tönne
This can happen if no image buffers are used to define a sensible resolution. Then the viewer will stiff create a float buffer in the output imbuf, which defies the usual ibuf->rect_float check and leads to invalid memory access. Float buffer should not be created in this case.
2014-02-19Code cleanup: styleCampbell Barton
2014-02-18Fix T38488: Single pixel line artifact with Rotate and Wrapped TranslateLukas Tönne
nodes. The Rotate node was calculating the center with a 1 pixel offset, which effectively shifts the image by 1 pixel on one or both axis for right-angle (90 degree) rotations. Note that the wrapping feature for translate nodes can still produce undesirable results for non-quadratic images. This is because of how the resolution calculation works atm: the Rotate node will keep the resolution of the input image, even if the resulting image is then cropped or leaves empty margins. There is no easy way to fix that without redesign.
2014-02-18Fix T38506: Bokeh blur node - size bugs with OpenCL.Lukas Tönne
The underlying cause for these issues is the insufficient sampling of the bokeh image. For smaller blur radius there will be very few samples taken, and with 1-pixel radius it boils down to just 4 samples: 2 on the left border (black), 1 in the center (black) and 1 at the top border (blue) ... For now have added the workarounds implemented in the CPU version of that node, which hide these artifacts. Ultimately would be better to have mipmap levels for the bokeh image input instead.
2014-02-17Fix T38487: Wrapped translate node in combination with other bufferedLukas Tönne
nodes (Blur) causes crash due to chained read/write buffer operations. The way read/write buffer operations are created for both the wrapped translate node and then the "complex" blur node creates a chain of buffers in the same ExecutionGroup. This leaves the later write buffer operations without a proper "executor" group and fails on assert. Solution for now is to check for existing output buffer operations like it already happens for inputs. This is extremely ugly code, but should become a lot more transparent after compositor cleanup ({D309}).
2014-02-13Fix T38529, Blur node size 0 doesn't work.Lukas Tönne
The blur operations were clamping the filter size to 1, which prevents no-op blur nodes. Further any value < 1 would also be ignored and in many combinations the filter scale setting ("Size") would only work in integer steps. Now most blur settings will work with smooth Size value scaling as well, meaning you can choose a reasonably large filter size (e.g. 10) and then use the Size factor to scale the actual blur radius smoothly. Note that non-integer filter sizes also depend on the filter type selected in the Blur node, e.g. "Flat" filtering will still ignore smooth filter sizes. Gaussian filters work best for this purpose.
2014-02-13Code cleanup: styleCampbell Barton
2014-02-05Fix T38340 and T38473: fixed Scene pointers in Composite and Defocus nodes ↵Lukas Tönne
don't get updated based on context. As discussed in T38340 the solution is to use the current scene from context whenever feasible. Composite does not use node->id at all now, the scene which owns the compositing node tree is retrieved from context instead. Defocus node->id is made editable by the user. By default it is not set, which also will make it use the contextual scene and camera info. The node->id pointer in Defocus is **not** cleared in older blend files. This is done for backward compatibility: the node will then behave as before in untouched scenes. File Output nodes also don't store scene in node->id. This is only needed when creating a new node for initializing the file format. Reviewers: brecht, jbakker, mdewanchand Reviewed By: brecht Differential Revision: https://developer.blender.org/D290
2014-02-03Code cleanup: white space and cmake was broken on all platformsCampbell Barton
2014-01-27Code cleanup: use booleans where appropriateCampbell Barton
2014-01-26Code Cleanup: style and correct API class refCampbell Barton
2014-01-22Fix T38011 and cleanup of Lens Distortion node code.Lukas Tönne
The area-of-interest calculation for that node didn't work reliably. It tries to estimate the distorted rectangular area based on min/max distortion and dispersion values, but this fails in some cases and leaves uninitialized buffer chunks. So now simply use the full input rect as the area, even though it may not be as efficient - at least it works ... Also cleaned up the code somewhat to make it understandable, using separate functions for common stuff instead of cryptic walls of math.
2014-01-16Code Cleanup: style and redundant castsCampbell Barton
2014-01-12Style Cleanup: whitespaceCampbell Barton
2014-01-09Code Cleanup: styleCampbell Barton
2014-01-01Fix deadlock happening when using Save Buffers for renderSergey Sharybin
Summary: Issue was caused by the same tile being written twice to the EXR file. This was happening because of partial update of work-in-progress tiles was merging result to the final render result in order to make color management pipeline happy. We need to avoid such a merges and keep memory usage as low as possible when Save Buffers is enabled. Now render pipeline will allocate special display buffer in render layer which will contain combined pass in the display space. This keeps memory usage as low as we can do at this moment. There's one weak thing which is changing color management settings during rendering would lead to lossy conversion. This is because render result's display buffer uses color space from the time when rendering was invoked. This is actually what was happening in previous release already actually so not a big issue. Reviewers: brecht Reviewed By: brecht Differential Revision: https://developer.blender.org/D162