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
2021-06-09Fix T88567: Cryptomatte only works for the first View Layer.Jeroen Bakker
The view layer was always set to 0. This patch increments it.
2021-06-09Fix T88666: Cryptomatte: EXR sequence does not update when scrubbing the ↵Jeroen Bakker
timeline. Cause is that initializing the cryptomatte session would reset the current frame of an image sequence. The solution is to always use the scene current frame so it resets to the correct frame. This was a todo that wasn't solved after it landed in master. Needs to be backported to 2.93.
2021-04-12Fix T74680: Incorrect mixing in Glare nodeSzymon Ulatowski
The mixing function was designed to give correct results for Mix values of -1, 0, and +1, but the behavior between these points was not linear. This is unavoidable, because the function depends on both Mix and Mix^2 (by multiplying value and mf) so they could not cancel out completely. The new formula simply calculates the weighted sum without trying to invent a smooth function. Value for MixGlareOperation is now passed directly without scaling because it is then easier to use. Note that the previous formula performed max() twice for both input image and the result, now there is just one max() per channel because the glare input can't be negative. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D7138
2021-04-12Fix T87252: File output node broken with more than 4 inputs.Jeroen Bakker
In recent refactor the operator sockets were migrated from a std::list to a blender::Vector. The way how the file output node created the sockets along mapping the sockets could lead to storing incorrect pointers. This patch fixes this by defining and mapping the sockets in separate loops.
2021-04-02Cleanup: remove loading blender namespace from Vector.Jeroen Bakker
2021-04-02Cleanup: Added leading `e` to enum types.Jeroen Bakker
2021-03-30Compositor: Fix Incorrect Attaching NodeSockets.Jeroen Bakker
Introduced by recent commit.
2021-03-30Cleanup: Replace std::vector with blender::Vector.Jeroen Bakker
2021-03-30Cryptomatte: Fix When Image based Cryptomatte Aren't On The First Render Layer.Jeroen Bakker
The image user wasn't updated to reflect the correct render layer.
2021-03-29Cleanup: use pragma once.Jeroen Bakker
2021-03-29Cleanup: Add namespace to compositor.Jeroen Bakker
2021-03-29Cleanup: Add `override` Keyword.Jeroen Bakker
2021-03-29Compositor: Add Anti-Aliasing nodeHabib Gahbiche
This is an implementation of Enhanced Subpixel Morphological Antialiasing (SMAA) The algorithm was proposed by: Jorge Jimenez, Jose I. Echevarria, Tiago Sousa, Diego Gutierrez This node provides only SMAA 1x mode, so the operation will be done with no spatial multisampling nor temporal supersampling. See Patch for comparisons. The existing AA operation seems to be used only for binary images by some other nodes. Using SMAA for binary images needs no important parameter such as "threshold", so we perhaps can switch the operation to SMAA, though that changes existing behavior. Notes: 1. The program code assumes the screen coordinates are DirectX style that the vertical direction is upside-down, so "top" and "bottom" actually represent bottom and top, respectively. Thanks for Habib Gahbiche (zazizizou) to polish and finalize this patch. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D2411
2021-03-26Cleanup: Replaced Typedef Enum With Enum Class.Jeroen Bakker
2021-03-24Cleanup: Add override keyword.Jeroen Bakker
2021-03-22Cleanup: clang-format, trailing spaceCampbell Barton
Minor manual tweak to prevent wrapping an array into columns.
2021-03-19Cleanup: Use enum class for DataType.Jeroen Bakker
2021-03-19Cleanup: enum class ChunkOrdering.Jeroen Bakker
2021-03-19Cleanup: Use enum class for CompositorQuality.Jeroen Bakker
2021-03-16Compositor: Redesign Cryptomatte node for better usabilityJeroen Bakker
In the current implementation, cryptomatte passes are connected to the node and elements are picked by using the eyedropper tool on a special pick channel. This design has two disadvantages - both connecting all passes individually and always having to switch to the picker channel are tedious. With the new design, the user selects the RenderLayer or Image from which the Cryptomatte layers are directly loaded (the type of pass is determined by an enum). This allows the node to automatically detect all relevant passes. Then, when using the eyedropper tool, the operator looks up the selected coordinates from the picked Image, Node backdrop or Clip and reads the picked object directly from the Renderlayer/Image, therefore allowing to pick in any context (e.g. by clicking on the Combined pass in the Image Viewer). The sampled color is looked up in the metadata and the actual name is stored in the cryptomatte node. This also allows to remove a hash by just removing the name from the matte id. Technically there is some loss of flexibility because the Cryptomatte pass inputs can no longer be connected to other nodes, but since any compositing done on them is likely to break the Cryptomatte system anyways, this isn't really a concern in practise. In the future, this would also allow to automatically translate values to names by looking up the value in the associated metadata of the input, or to get a better visualization of overlapping areas in the Pick output since we could blend colors now that the output doesn't have to contain the exact value. Idea + Original patch: Lucas Stockner Reviewed By: Brecht van Lommel Differential Revision: https://developer.blender.org/D3959
2021-03-08Cleanup: Change extension .cpp to .ccJeroen Bakker
2021-03-05Cleanup: use MIN2/MAX2 in compositor.Jeroen Bakker
2021-03-03Cleanup: clang tidyJacques Lucke
Warnings: * readability-inconsistent-declaration-parameter-name * readability-redundant-smartptr-get
2021-03-02Cryptomatte: Read metadata from multilayer OpenEXR.Jeroen Bakker
Currently the compositor reads cryptomatte meta-data from the render result. When loading a multilayer open exr file the meta-data was ignored. This patch will also load the cryptomatte meta-data from multilayer open exr files. This enabled workflows where the rendering and compositing are done in separate scenes or for future changes where the cryptomatte node will use the meta-data for name matching and color picking. Reviewed By: Sergey Sharybin Differential Revision: https://developer.blender.org/D10384
2021-02-14Cleanup: Source Code Typosluzpaz
Corrects approximately 36 spelling errors in source variable names. Differential Revision: https://developer.blender.org/D10347 Reviewed by Hans Goudey
2021-02-06Cleanup: compare with zero for flag checksCampbell Barton
This is done almost everywhere already, use this more straightforward convention.
2021-02-05Cleanup: correct spelling in commentsCampbell Barton
2021-01-13Compositor: "Save as Render" for the file output nodeRobert Guetzkow
This commit adds the "Save as Render" feature to the file output node, that allows to disable the application of the configured view transform and other color management settings on the image. If disable it uses the standard view transform instead. This feature was originally suggested in T83842 and is part of the color management improvements task in T68926. With this feature it is possible to toggle the application of the color management settings for each input socket of the File Output node individually. Reviewed By: brecht Maniphest Tasks: T68926, T83842 Differential Revision: https://developer.blender.org/D9921
2021-01-12Fix T64953: Add cryptomatte meta data to file output node.Jeroen Bakker
This change will try to add meta data when using a multilayered open exr file output node in the compositor. It adds the current scene meta data and converts existing cryptomatte keys so it follows the naming that is configured in the file output node. This change supports the basic use-case where the compositor is used to output cryptomatte layers with a different naming scheme to support external compositors. In this case the Multilayered OpenEXR files are used and the meta data is read from the render result. Meta data is found when render layer node is connected with the file output node without any other nodes in between. Redirects and empty node groups are allowed. The patch has been verified to work with external compositors. See https://devtalk.blender.org/t/making-sense-of-cryptomatte-usage-in-third-party-programs/16576/17 See patch for example files. Reviewed By: Sergey Sharybin Differential Revision: https://developer.blender.org/D10016
2021-01-05Compositor: Alpha ModeJeroen Bakker
{D9211} introduced pre-multiplying the color for the keying node. This pre-multiplication should also be done by other keying nodes and should be the default operation for alpha node. This patch will change the logic of keying nodes (Cryptomatte Node, Channel Matte, Chroma Matte, Color Matte, Difference Matte, Distance Matte, Luminance Matte) and breaks old files. The Set alpha node has a mode parameter. This parameter changes the logic to `Apply Mask` the alpha on the RGBA channels of the input color or only replace the alpha channel (old behavior). The replace mode is automatically set for older files. When adding new files the the multiply mode is set. Reviewed By: Sergey Sharybin Differential Revision: https://developer.blender.org/D9630
2021-01-04Cleanup: use 'pragma once'Campbell Barton
Add explanations for cases the header-guard defines are still used.
2020-12-23Cleanup: Clang formatHans Goudey
2020-12-19Compositor: New Exposure NodeAaron Carlisle
This new node increases the radiance of an image by a scalar value. Previously, the only way to adjust the the exposure of an image was with math node or using the scene's color management. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D9677
2020-12-14Cryptomatte: Data structure in compositor nodeJeroen Bakker
This changes the way how the mattes are stored in the compositor node. This used to be a single string what was decoded/encoded when needed. The new data structure stores all entries in `CryptomatteEntry` and is converted to the old `matte_id` property on the fly. This is done for some future changes in the workflow where a more structured approach leads to less confusing and easier to read code.
2020-11-30Cleanup hardcoded render percentage to factor conversionMonique Dewanchand
During revision of {D8952} one of the comments was to make a function that converts the render percentage to a factor. This to avoid code duplication. However the duplicated code was already all over the compositor code. So in order to avoid this code duplication for {D8952} I propose to first cleanup the duplicated code and build patch {D8952} based on this clean up. The method that converts the render percentage to a factor is put in the CompositorContext. Why? The CompositorContext keeps DNA information like the renderdata. DNA, and thus the CompositorContext, keeps the size of the render resolution in percentage (user oriented). The compositor needs the size of the render resolution as a factor. So the CompositorContext seems like the obvious place to have this conversion method. Why not in de NodeBase? The method could've been added to the nodebase, but I wanted to keep the nodebase as clean as possible and not put simple "conversion" methods into this base class. Also I didn't really like the call flow: you'd always have to get the renderdata size from the context and then convert. Putting it in the CompositorContext avoids this extra invoke of a call. Why not in the Converter? See nodebase. And the Converter seems more like a class for "structural" and complex node tree conversions. Not the simple conversions. Reviewed By: Sergey Sharybin Differential Revision: https://developer.blender.org/D9566
2020-11-09Cleanup: clang-formatCampbell Barton
2020-11-06Cleanup: Clang-Tidy modernize-use-nullptrSybren A. Stüvel
Replace `NULL` with `nullptr` in C++ code. No functional changes.
2020-11-06Cleanup: use ELEM macroCampbell Barton
2020-10-22Compositor: Ensure keying node result is pre-multipliedSergey Sharybin
Historically the result of the keying node was violating alpha pre-multiplication rules in Blender: it was simply overriding the alpha channel of input. This change makes it so keying node mixes alpha into the input, which solves the following issues: - The result is properly pre-multiplied, no need in separate alpha-convert node anymore. - Allows to more easily stack keying nodes. This usecase was never really investigated, but since previously alpha is always overwritten it was never possible to easily stack nodes. Now it is at something to be tried. Unfortunately, this breaks compatibility with existing files, where alpha-convert node is to be manually removed. From implementation side this is done as a dedicated operation since there was no ready-to-use operation. Maybe in the future it might be replaced with some sort of vector math node. Reviewed By: brecht Differential Revision: https://developer.blender.org/D9211
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
2020-09-30Cleanup: convert gforge task ID's to phabricator formatValentin
Cleanup old tracker task format to the new. e.g: [#34039] to T34039 Ref D8718
2020-09-12Cleanup: use C style doxygen commentsCampbell Barton
2020-09-04Cleanup: Clang-Tidy readability-inconsistent-declaration-parameter-name fixSebastian Parborg
No functional changes
2020-08-11Merge branch 'blender-v2.90-release' into masterSergey Sharybin
2020-08-11Fix T79563: Compositor's Stabilize 2D in invert mode does not work correctlySergey Sharybin
Is not only the values of translation/scale/rotation which are to be inverted, but also the order of operations. Differential Revision: https://developer.blender.org/D8518
2020-08-07Merge branch 'blender-v2.90-release' into masterJacques Lucke
2020-08-07Code Style: use "#pragma once" in source directoryJacques Lucke
This replaces header include guards with `#pragma once`. A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`), because they are used in other places. This patch has been generated by P1561 followed by `make format`. Differential Revision: https://developer.blender.org/D8466
2020-08-01Cleanup: use term init instead of initialize/initialiseCampbell Barton
The abbreviation 'init' is brief, unambiguous and already used in thousands of places, also initialize is often accidentally written with British spelling.
2020-06-27Docs: correct invalid doxygen params & referencesCampbell Barton
2020-05-08Cleanup: take includes out of 'extern "C"' blocksJacques Lucke
Surrounding includes with an 'extern "C"' block is not necessary anymore. Also that made it harder to add any C++ code to some headers, or include headers that have "optional" C++ code like `MEM_guardedalloc.h`. I tested compilation on linux and windows (and got help from @LazyDodo). If this still breaks compilation due to some linker error, the header containing the symbol in question is probably missing an 'extern "C"' block. Differential Revision: https://developer.blender.org/D7653